summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
authorPreyesh Dalmia <[email protected]>2019-04-18 17:26:40 -0500
committerPreyesh Dalmia <[email protected]>2019-04-18 17:26:40 -0500
commit73f1a8a424cff7d689c138eaa8a59780b86a76d1 (patch)
tree4e7d5552623a16da72c140aed7a2e9116b231971 /libcuda
parent4d6895995b1c5548a3b5ba2e2b203048cd41628b (diff)
changes for compute capabilty
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index 6f1ab08..9068700 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -354,8 +354,8 @@ struct _cuda_device_id *GPGPUSim_Init()
cudaDeviceProp *prop = (cudaDeviceProp *) calloc(sizeof(cudaDeviceProp),1);
snprintf(prop->name,256,"GPGPU-Sim_v%s", g_gpgpusim_version_string );
- prop->major = 5;
- prop->minor = 2;
+ prop->major = the_gpu->compute_capability_major();
+ prop->minor = the_gpu->compute_capability_minor();
prop->totalGlobalMem = 0x80000000 /* 2 GB */;
prop->memPitch = 0;
if(prop->major >= 2) {
@@ -1120,11 +1120,11 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic
case 41:
*value= 0;
break;
- case 75:
- *value= 7 ; //cudaDevAttrComputeCapabilityMajor for Volta architecture
+ case 75:// Major compute capability version number
+ *value= prop->major ;
break;
- case 76:
- *value= 0 ; //cudaDevAttrComputeCapabilityMinor for Volta architecture
+ case 76:// Minor compute capability version number
+ *value= prop->minor ;
break;
case 78:
*value= 0 ; //TODO: as of now, we dont support stream priorities.