From f118b10cc49bf771755f2afdee04cde0359d745e Mon Sep 17 00:00:00 2001 From: Amruth Date: Wed, 11 Apr 2018 12:07:34 -0700 Subject: clean up --- libcuda/cuda_runtime_api.cc | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'libcuda/cuda_runtime_api.cc') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 184325c..abdc345 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -349,15 +349,7 @@ 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 = 49152; -#if (CUDART_VERSION > 5000) - prop->sharedMemPerMultiprocessor = the_gpu->shared_mem_size(); -#endif + prop->sharedMemPerBlock = the_gpu->shared_mem_size(); prop->regsPerBlock = the_gpu->num_registers_per_core(); prop->warpSize = the_gpu->wrp_size(); prop->clockRate = the_gpu->shader_clock(); @@ -848,17 +840,8 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic if (device <= dev->num_devices() ) { prop = dev->get_prop(); switch (attr) { - case 2: - *value= prop->maxThreadsDim[0]; - break; - case 3: - *value= prop->maxThreadsDim[1]; - break; - case 4: - *value= prop->maxThreadsDim[2]; - break; case 5: - *value= prop->maxGridSize[0]; + *value= prop->maxGridSize[1]; break; case 6: *value= prop->maxGridSize[1]; @@ -866,12 +849,6 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic case 7: *value= prop->maxGridSize[2]; break; - case 8: - *value= prop->sharedMemPerBlock; - break; - case 9: - *value= prop->totalConstMem; - break; case 10: *value= prop->warpSize; break; @@ -884,14 +861,11 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic case 16: *value= prop->multiProcessorCount ; break; - case 34: - *value= 0; - break; case 39: *value= dev->get_gpgpu()->threads_per_core(); break; case 75: - *value= 9 ; + *value= 8 ; break; case 76: *value= 3 ; @@ -899,9 +873,6 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic case 78: *value= 0 ; //TODO: as of now, we dont support stream priorities. break; - case 81: - *value= prop->sharedMemPerMultiprocessor; - break; default: printf("ERROR: implement the attribute numbered %d \n",attr); abort(); @@ -1911,7 +1882,6 @@ void cuobjdumpParseBinary(unsigned int handle){ if (capability > max_capability) max_capability = capability; } if (max_capability > 20) printf("WARNING: No guarantee that PTX will be parsed for SM version %u\n", max_capability); - //max_capability=context->get_device()->get_gpgpu()->get_config().get_forced_max_capability(); cuobjdumpPTXSection* ptx = NULL; const char* pre_load = getenv("CUOBJDUMP_SIM_FILE"); -- cgit v1.3