summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
authorSuchita Pati <[email protected]>2018-05-21 00:26:04 +0000
committertgrogers-purdue <[email protected]>2018-05-21 00:26:04 +0000
commit1b6389ab70211b622f02b149bfb20ae68a2e2552 (patch)
tree9e75d6d0474d1cfbf27501e2461022c593b6f740 /libcuda
parent0f8c407eea99e1622486127912a83ef3e0dcf397 (diff)
parentf405cb9484a8b0f961bd7c143bebf1fcb17546da (diff)
Merged in suchitapati/gpgpusim-cudnn-05-01-18 (pull request #7)
Support for -gpgpu_registers_per_block and addition of -save_embedded_ptx 1 to config files for mnistCUDNN Approved-by: tgrogers-purdue <[email protected]>
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc27
1 files changed, 8 insertions, 19 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index ef46f00..e3c2542 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -349,24 +349,13 @@ class _cuda_device_id *GPGPUSim_Init()
prop->maxGridSize[2] = 0x40000000;
prop->totalConstMem = 0x40000000;
prop->textureAlignment = 0;
- /*
-
- * TODO: Update the .config and xml files of all GPU config files with new value of sharedMemPerBlock.
-
- * Previously, this was thought as sharedMemPerMultiprocessor and is being used in many places.
-
- * Check whether all the instances of shared_mem_size(), gpgpu_shmem_size or sharedMemPerBlock are meant to use sharedMemPerBlock or sharedMemPerMultiprocessor.
-
- */
-
- prop->sharedMemPerBlock = the_gpu->shared_mem_per_block();
-
- #if (CUDART_VERSION > 5000)
-
- prop->sharedMemPerMultiprocessor = the_gpu->shared_mem_size();
-
- #endif
-
+// * TODO: Update the .config and xml files of all GPU config files with new value of sharedMemPerBlock and regsPerBlock
+ prop->sharedMemPerBlock = the_gpu->shared_mem_per_block();
+#if (CUDART_VERSION > 5000)
+ prop->regsPerMultiprocessor = the_gpu->num_registers_per_core();
+ prop->sharedMemPerMultiprocessor = the_gpu->shared_mem_size();
+#endif
+ prop->sharedMemPerBlock = the_gpu->shared_mem_per_block();
prop->regsPerBlock = the_gpu->num_registers_per_core();
prop->warpSize = the_gpu->wrp_size();
prop->clockRate = the_gpu->shader_clock();
@@ -912,7 +901,7 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic
*value= prop->sharedMemPerMultiprocessor;
break;
case 82:
- *value= prop->regsPerBlock;
+ *value= prop->regsPerMultiprocessor;
break;
default:
printf("ERROR: Attribute number %d unimplemented \n",attr);