summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim
diff options
context:
space:
mode:
authorAaron Barnes <[email protected]>2023-08-07 12:27:43 -0400
committerGitHub <[email protected]>2023-08-07 12:27:43 -0400
commit57452f0afc9f25118ef03aa317669331feaa8571 (patch)
treec617f1a97f6549642034de7d6f3b70723bc6ba75 /src/gpgpu-sim
parent712b6104e7399b2dd42c25b4cd788f0f36b5b39d (diff)
parenta42b72214b92b6a97f16c180ad09631cbe50da33 (diff)
Merge branch 'dev' into fix-stats
Diffstat (limited to 'src/gpgpu-sim')
-rw-r--r--src/gpgpu-sim/addrdec.cc2
-rw-r--r--src/gpgpu-sim/dram.cc1
-rw-r--r--src/gpgpu-sim/gpu-cache.h1
-rw-r--r--src/gpgpu-sim/gpu-sim.cc2
-rw-r--r--src/gpgpu-sim/local_interconnect.cc4
-rw-r--r--src/gpgpu-sim/mem_fetch.cc8
-rw-r--r--src/gpgpu-sim/shader.cc2
-rw-r--r--src/gpgpu-sim/shader.h2
-rw-r--r--src/gpgpu-sim/shader_trace.h2
9 files changed, 13 insertions, 11 deletions
diff --git a/src/gpgpu-sim/addrdec.cc b/src/gpgpu-sim/addrdec.cc
index f4f83f9..db27c82 100644
--- a/src/gpgpu-sim/addrdec.cc
+++ b/src/gpgpu-sim/addrdec.cc
@@ -584,7 +584,7 @@ unsigned next_powerOf2(unsigned n) {
n = n - 1;
// do till only one bit is left
- while (n & n - 1) n = n & (n - 1); // unset rightmost bit
+ while (n & (n - 1)) n = n & (n - 1); // unset rightmost bit
// n is now a power of two (less than n)
diff --git a/src/gpgpu-sim/dram.cc b/src/gpgpu-sim/dram.cc
index 662c2ed..53c8238 100644
--- a/src/gpgpu-sim/dram.cc
+++ b/src/gpgpu-sim/dram.cc
@@ -880,4 +880,5 @@ unsigned dram_t::get_bankgrp_number(unsigned i) {
} else {
assert(1);
}
+ return 0; // we should never get here
}
diff --git a/src/gpgpu-sim/gpu-cache.h b/src/gpgpu-sim/gpu-cache.h
index aa693b5..ad41320 100644
--- a/src/gpgpu-sim/gpu-cache.h
+++ b/src/gpgpu-sim/gpu-cache.h
@@ -499,6 +499,7 @@ struct sector_cache_block : public cache_block_t {
for (unsigned i = 0; i < SECTOR_CHUNCK_SIZE; ++i) {
if (sector_mask.to_ulong() & (1 << i)) return i;
}
+ return SECTOR_CHUNCK_SIZE; //error
}
};
diff --git a/src/gpgpu-sim/gpu-sim.cc b/src/gpgpu-sim/gpu-sim.cc
index ea50fa0..47c0b4a 100644
--- a/src/gpgpu-sim/gpu-sim.cc
+++ b/src/gpgpu-sim/gpu-sim.cc
@@ -80,7 +80,7 @@ class gpgpu_sim_wrapper {};
#include <sstream>
#include <string>
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+// #define MAX(a, b) (((a) > (b)) ? (a) : (b)) //redefined
bool g_interactive_debugger_enabled = false;
diff --git a/src/gpgpu-sim/local_interconnect.cc b/src/gpgpu-sim/local_interconnect.cc
index df6bd7b..fe7bc74 100644
--- a/src/gpgpu-sim/local_interconnect.cc
+++ b/src/gpgpu-sim/local_interconnect.cc
@@ -148,8 +148,8 @@ void xbar_router::RR_Advance() {
}
}
}
-
- next_node_id = (++next_node_id % total_nodes);
+ next_node_id = next_node_id + 1 ;
+ next_node_id = (next_node_id % total_nodes);
conflicts += conflict_sub;
if (active) {
diff --git a/src/gpgpu-sim/mem_fetch.cc b/src/gpgpu-sim/mem_fetch.cc
index 456d891..0d86046 100644
--- a/src/gpgpu-sim/mem_fetch.cc
+++ b/src/gpgpu-sim/mem_fetch.cc
@@ -84,10 +84,10 @@ mem_fetch::~mem_fetch() { m_status = MEM_FETCH_DELETED; }
#undef MF_TUP_END
void mem_fetch::print(FILE *fp, bool print_inst) const {
- if (this == NULL) {
- fprintf(fp, " <NULL mem_fetch pointer>\n");
- return;
- }
+ // if (this == NULL) { // doenst make sense!
+ // fprintf(fp, " <NULL mem_fetch pointer>\n");
+ // return;
+ // }
fprintf(fp, " mf: uid=%6u, sid%02u:w%02u, part=%u, ", m_request_uid, m_sid,
m_wid, m_raw_addr.chip);
m_access.print(fp);
diff --git a/src/gpgpu-sim/shader.cc b/src/gpgpu-sim/shader.cc
index 69992f7..229b305 100644
--- a/src/gpgpu-sim/shader.cc
+++ b/src/gpgpu-sim/shader.cc
@@ -481,7 +481,7 @@ shader_core_ctx::shader_core_ctx(class gpgpu_sim *gpu,
m_config = config;
m_memory_config = mem_config;
m_stats = stats;
- unsigned warp_size = config->warp_size;
+ // unsigned warp_size = config->warp_size;
Issue_Prio = 0;
m_sid = shader_id;
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index 9243077..381e2c9 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -351,8 +351,8 @@ class scheduler_unit { // this can be copied freely, so can be used in std
m_sfu_out(sfu_out),
m_int_out(int_out),
m_tensor_core_out(tensor_core_out),
- m_spec_cores_out(spec_cores_out),
m_mem_out(mem_out),
+ m_spec_cores_out(spec_cores_out),
m_id(id) {}
virtual ~scheduler_unit() {}
virtual void add_supervised_warp_id(int i) {
diff --git a/src/gpgpu-sim/shader_trace.h b/src/gpgpu-sim/shader_trace.h
index e7486d8..367262c 100644
--- a/src/gpgpu-sim/shader_trace.h
+++ b/src/gpgpu-sim/shader_trace.h
@@ -38,7 +38,7 @@
#define SCHED_PRINT_STR SHADER_PRINT_STR "Scheduler %d - "
#define SHADER_DTRACE(x) \
(DTRACE(x) && \
- (Trace::sampling_core == get_sid() || Trace::sampling_core == -1))
+ (Trace::sampling_core == (int)get_sid() || Trace::sampling_core == -1))
// Intended to be called from inside components of a shader core.
// Depends on a get_sid() function