From 2aed4cf401f3b3c031bb037ce776b0b035300b7c Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Mon, 17 Jun 2024 10:37:14 +0100 Subject: [PATCH] SWDEV-468133 - Fixed hipDeviceGetLimit for hipLimitMallocHeapSize Change-Id: I91bede414ebe46831509cbd24ffb53cf129d6a40 --- hipamd/src/hip_device_runtime.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hipamd/src/hip_device_runtime.cpp b/hipamd/src/hip_device_runtime.cpp index c453820f66..d6561b8277 100644 --- a/hipamd/src/hip_device_runtime.cpp +++ b/hipamd/src/hip_device_runtime.cpp @@ -514,9 +514,7 @@ hipError_t hipDeviceGetLimit(size_t* pValue, hipLimit_t limit) { switch (limit) { case hipLimitMallocHeapSize: - hipDeviceProp_tR0600 prop; - HIP_RETURN_ONFAIL(ihipGetDeviceProperties(&prop, ihipGetDevice())); - *pValue = prop.totalGlobalMem; + *pValue = hip::getCurrentDevice()->devices()[0]->InitialHeapSize(); break; case hipLimitStackSize: *pValue = hip::getCurrentDevice()->devices()[0]->StackSize();