fix memory limit check for HIP
This commit is contained in:
parent
5645b0290d
commit
e77a34158c
@ -54,7 +54,7 @@ HIPStream<T>::HIPStream(const int ARRAY_SIZE, const int device_index)
|
||||
// Check buffers fit on the device
|
||||
hipDeviceProp_t props;
|
||||
hipGetDeviceProperties(&props, 0);
|
||||
if (props.totalGlobalMem < 3*ARRAY_SIZE*sizeof(T))
|
||||
if (props.totalGlobalMem < std::size_t{3}*ARRAY_SIZE*sizeof(T))
|
||||
throw std::runtime_error("Device does not have enough memory for all 3 buffers");
|
||||
|
||||
// Create device buffers
|
||||
|
||||
Loading…
Reference in New Issue
Block a user