From a1bba9ca4c4940c2d9df0ee3d5447af327152acd 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 [ROCm/hip commit: 871c167fd031a024664c0ff17fb4cee68b772e22] --- projects/hip/rocclr/hip_memory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/hip/rocclr/hip_memory.cpp b/projects/hip/rocclr/hip_memory.cpp index 20555a0edc..b84f54d61b 100755 --- a/projects/hip/rocclr/hip_memory.cpp +++ b/projects/hip/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; }