From 88816ae021b8a9fa3798b1aaa394c22d09acb939 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 30 Jan 2017 15:38:27 -0500 Subject: [PATCH] P4 to Git Change 1367270 by gandryey@gera-w8 on 2017/01/30 15:31:49 SWDEV-112273 - [ROCm CQE][OCLonLC][QR][G] 2 of 9 tests failed with mem_host_flags due to CL#1366459 - Keep system memory for images with UHP allocations Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#38 edit [ROCm/clr commit: cfac74adbf3704b67d9214651e1df4475a2ec490] --- projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp index bde814d9c9..84dd70f527 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp @@ -1183,7 +1183,7 @@ Device::createVirtualDevice(amd::CommandQueue* queue) return NULL; } - if(profiling) { + if (profiling) { hsa_amd_profiling_set_profiler_enabled(virtualDevice->gpu_queue(), 1); } @@ -1417,7 +1417,9 @@ Device::createMemory(amd::Memory &owner) const amd::Coord3D(0, 0, 0), imageView->getRegion(), 0, 0, true); - owner.setHostMem(nullptr); + if (owner.getMemFlags() & CL_MEM_COPY_HOST_PTR) { + owner.setHostMem(nullptr); + } imageView->release(); }