From 7fc700c34848569fa340f7b72c36db43e49c8a21 Mon Sep 17 00:00:00 2001 From: kjayapra-amd Date: Thu, 13 May 2021 21:51:06 -0400 Subject: [PATCH] SWDEV-286346 - Implement Arena Memory Object for externally created memory. Change-Id: I1aae0d24b28eebaf7f67e941aaa475a53831e9b8 --- hipamd/rocclr/hip_memory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hipamd/rocclr/hip_memory.cpp b/hipamd/rocclr/hip_memory.cpp index 20555a0edc..b84f54d61b 100755 --- a/hipamd/rocclr/hip_memory.cpp +++ b/hipamd/rocclr/hip_memory.cpp @@ -49,6 +49,9 @@ amd::Memory* getMemoryObject(const void* ptr, size_t& offset) { ShouldNotReachHere(); } } + } else { + // If memObj not found, use arena_mem_obj. arena_mem_obj is null, if HMM and Xnack is disabled. + memObj = (hip::getCurrentDevice()->asContext()->svmDevices()[0])->GetArenaMemObj(ptr, offset); } return memObj; }