Use cudaDeviceGetAttribute instead of cudaGetDeviceProperties (#5570)
This commit is contained in:
parent
73142041b9
commit
a734f52807
@ -108,9 +108,11 @@ inline size_t TotalMemory(int device_idx) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
inline size_t MaxSharedMemory(int device_idx) {
|
inline size_t MaxSharedMemory(int device_idx) {
|
||||||
cudaDeviceProp prop;
|
int max_shared_memory = 0;
|
||||||
dh::safe_cuda(cudaGetDeviceProperties(&prop, device_idx));
|
dh::safe_cuda(cudaDeviceGetAttribute
|
||||||
return prop.sharedMemPerBlock;
|
(&max_shared_memory, cudaDevAttrMaxSharedMemoryPerBlock,
|
||||||
|
device_idx));
|
||||||
|
return size_t(max_shared_memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user