Skip to content

Commit

Permalink
[ORO-0] Get global memory size for CUDA (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
jammm authored Sep 1, 2022
1 parent 6ba85ab commit ac7f0ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Orochi/Orochi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,12 @@ oroError OROAPI oroGetDeviceProperties(oroDeviceProp* props, oroDevice dev)
props->memPitch = p.memPitch;
props->clockRate = p.clockRate;

cu2oro( cuDeviceTotalMem( &props->totalGlobalMem, deviceId ) );

e = cuDeviceGetAttribute( &props->pciDomainID, CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, deviceId );
e = cuDeviceGetAttribute(&props->pciBusID, CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, deviceId);
e = cuDeviceGetAttribute(&props->pciDeviceID, CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, deviceId);
e = cuDeviceGetAttribute(&props->multiProcessorCount, CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, deviceId);
// props->totalGlobalMem = p.totalGlobalMem;? todo. DeviceTotalMem instead?
e = cuDeviceGetAttribute( &props->warpSize, CU_DEVICE_ATTRIBUTE_WARP_SIZE, deviceId );
e = cuDeviceGetAttribute( (int*)&props->textureAlignment, CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, deviceId );
e = cuDeviceGetAttribute( &props->kernelExecTimeoutEnabled, CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, deviceId );
Expand Down

0 comments on commit ac7f0ab

Please sign in to comment.