From 009cd3f18d0dcb8e3e518162cfaa78a93eb9ad0b Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 8 Nov 2018 14:07:09 -0500 Subject: [PATCH] P4 to Git Change 1704468 by zukhan@zukhan-lc-win10 on 2018/11/08 13:59:26 SWDEV-164783 - [ROCm QA][G][QR] Wimpyfull ->Buffer->sub_buffers_read_write_dual_devices test is failing - Problem looks to be due to a change made in rocmemory.cpp in allocMapTarget() function. - The issue was that Vlad modified the host memory that was being returned by using 'mapMemory_' vs 'owner()' as a pointer to use 'getHostMem()'. - Added the old logic back in while also maintaining Vlads logic, and the test is now passing. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#40 edit [ROCm/clr commit: 33f1e46cc30491918bbc45556c790d3112c5214b] --- projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp b/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp index f99b19b740..a5f425cfc9 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocmemory.cpp @@ -121,10 +121,13 @@ void* Memory::allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& reg } void* mappedMemory = nullptr; + void* hostMem = owner()->getHostMem(); if (owner()->getSvmPtr() != nullptr) { owner()->commitSvmMemory(); mappedMemory = owner()->getSvmPtr(); + } else if (hostMem != nullptr) { // Otherwise, check for host memory. + return (reinterpret_cast
(hostMem) + origin[0]); } else { mappedMemory = reinterpret_cast
(mapMemory_->getHostMem()) + origin[0]; }