summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-02-25 23:51:20 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:19:04 -0700
commitdc51fed5c95016d2d7dfd258e955d238586c9a29 (patch)
tree384beeeae5b48dc1e09c01867120e02407b8a347 /src
parent153c67bccf4b18957240122f57597b827f634578 (diff)
Adding a check for copmliance between the runtime simulation config and MAX_THREAD_PER_SM. Also decreased LOCAL_MEM_SIZE_MAX to 8kB to make it fit within our allotted memory space (otherwise the simulator may mistaken global memory access as local memory accesses).
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11520]
Diffstat (limited to 'src')
-rw-r--r--src/abstract_hardware_model.h2
-rw-r--r--src/gpgpu-sim/shader.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index 6c2b190..2fdebfc 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -268,7 +268,7 @@ protected:
#define GLOBAL_HEAP_START 0x80000000
// start allocating from this address (lower values used for allocating globals in .ptx file)
#define SHARED_MEM_SIZE_MAX (64*1024)
-#define LOCAL_MEM_SIZE_MAX (16*1024)
+#define LOCAL_MEM_SIZE_MAX (8*1024)
#define MAX_STREAMING_MULTIPROCESSORS 64
#define MAX_THREAD_PER_SM 2048
#define TOTAL_LOCAL_MEM_PER_SM (MAX_THREAD_PER_SM*LOCAL_MEM_SIZE_MAX)
diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h
index fbecac3..f8b0e58 100644
--- a/src/gpgpu-sim/shader.h
+++ b/src/gpgpu-sim/shader.h
@@ -918,6 +918,11 @@ struct shader_core_config : public core_config
printf("GPGPU-Sim uArch: error while parsing configuration string gpgpu_shader_core_pipeline_opt\n");
abort();
}
+ if (n_thread_per_shader > MAX_THREAD_PER_SM) {
+ printf("GPGPU-Sim uArch: Error ** increase MAX_THREAD_PER_SM in abstract_hardware_model.h from %u to %u\n",
+ MAX_THREAD_PER_SM, n_thread_per_shader);
+ abort();
+ }
max_warps_per_shader = n_thread_per_shader/warp_size;
assert( !(n_thread_per_shader % warp_size) );
max_sfu_latency = 32;