diff --git a/projects/clr/hipamd/api/hip/hip_device_runtime.cpp b/projects/clr/hipamd/api/hip/hip_device_runtime.cpp index 636ec612c1..e0bed1742c 100644 --- a/projects/clr/hipamd/api/hip/hip_device_runtime.cpp +++ b/projects/clr/hipamd/api/hip/hip_device_runtime.cpp @@ -339,7 +339,7 @@ hipError_t hipDeviceGetLimit ( size_t* pValue, hipLimit_t limit ) { } if(limit == hipLimitMallocHeapSize) { hipDeviceProp_t prop; - hipGetDeviceProperties(&prop, 0); + hipGetDeviceProperties(&prop, ihipGetDevice()); *pValue = prop.totalGlobalMem; HIP_RETURN(hipSuccess);