From 33eef6d95e6c1ad6bea6654712627ccdeb395fef Mon Sep 17 00:00:00 2001 From: Anusha GodavarthySurya Date: Thu, 5 Jan 2023 20:20:08 +0000 Subject: [PATCH] SWDEV-364576 - use hipLimitMallocHeapSize to set initial heap buffer size Change-Id: I2f1d3b229bc28571ce6c55f93f8ef73dda516b50 --- hipamd/src/hip_device_runtime.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hipamd/src/hip_device_runtime.cpp b/hipamd/src/hip_device_runtime.cpp index 871a9420fc..6e8dfdb4f0 100644 --- a/hipamd/src/hip_device_runtime.cpp +++ b/hipamd/src/hip_device_runtime.cpp @@ -489,6 +489,11 @@ hipError_t hipDeviceSetLimit ( hipLimit_t limit, size_t value ) { HIP_RETURN(hipErrorInvalidValue); } break; + case hipLimitMallocHeapSize: + if (!hip::getCurrentDevice()->devices()[0]->UpdateInitialHeapSize(value)) { + HIP_RETURN(hipErrorInvalidValue); + } + break; default: LogPrintfError("UnsupportedLimit = %d is passed", limit); HIP_RETURN(hipErrorUnsupportedLimit);