From 1868de1f7da40932976ff63ffbbae8e71bc23512 Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras Date: Wed, 6 Dec 2023 14:17:57 +0000 Subject: [PATCH] SWDEV-436236 - Fixed integer division to float result in Heap::FindMemory Change-Id: Ic72cfdbe1f62fabd3e25d33bfa540d82a02480d0 [ROCm/clr commit: 2ede1c9adb76e04627fea8126f9cea9c03740574] --- projects/clr/hipamd/src/hip_mempool_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_mempool_impl.cpp b/projects/clr/hipamd/src/hip_mempool_impl.cpp index cd7513e36c..097236ae72 100644 --- a/projects/clr/hipamd/src/hip_mempool_impl.cpp +++ b/projects/clr/hipamd/src/hip_mempool_impl.cpp @@ -50,7 +50,7 @@ amd::Memory* Heap::FindMemory(size_t size, hip::Stream* stream, bool opportunist } // Check if size can match and it's safe to use this resource. // Runtime can accept an allocation with 12.5% on the size threshold - if ((it->first->getSize() >= size) && (it->first->getSize() <= (size / 8) * 9) && + if ((it->first->getSize() >= size) && (it->first->getSize() <= (size / 8.0) * 9) && check_address && (it->second.IsSafeFind(stream, opportunistic))) { memory = it->first; total_size_ -= memory->getSize();