Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tests/smoke/blt_cuda_runtime_smoke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,24 @@ int main()
for (int i = 0; i < nDevices; i++)
{
cudaDeviceProp prop;
int memoryClockRate;
cudaGetDeviceProperties(&prop, i);

#if CUDART_VERSION >= 13000
cudaDeviceGetAttribute(&memoryClockRate, cudaDevAttrMemoryClockRate, i);
#else
memoryClockRate = prop.memoryClockRate;
#endif

printf("Device Number: %d\n", i);
printf(" Device name: %s\n", prop.name);
printf(" Memory Clock Rate (KHz): %d\n",
prop.memoryClockRate);
memoryClockRate);
printf(" Memory Bus Width (bits): %d\n",
prop.memoryBusWidth);
printf(" Peak Memory Bandwidth (GB/s): %f\n\n",
2.0*prop.memoryClockRate*(prop.memoryBusWidth/8)/1.0e6);
2.0*memoryClockRate*(prop.memoryBusWidth/8)/1.0e6);
}

return 0;
}