From e911ffa47e79e65022dd56aeab47cb0e143ae06d Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 26 Jul 2016 19:03:01 -0400
Subject: [PATCH] P4 to Git Change 1295719 by cpaquot@hog-ocl on 2016/07/26
18:50:05
SWDEV-96959 - RQ conf test "mem_host_flags" failed with "GPU memory access fault" error
Use getHostMem instead of isHostMemDirectAccess since allocMapTarget uses that too.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/10933/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#4 edit
---
rocclr/runtime/device/rocm/rocvirtual.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/rocm/rocvirtual.cpp b/rocclr/runtime/device/rocm/rocvirtual.cpp
index cd6908fb2d..4f6b22de31 100644
--- a/rocclr/runtime/device/rocm/rocvirtual.cpp
+++ b/rocclr/runtime/device/rocm/rocvirtual.cpp
@@ -1206,7 +1206,7 @@ void VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand &cmd)
}
if (mapInfo->isUnmapWrite()) {
// Commit the changes made by the user.
- if (!devMemory->isHostMemDirectAccess()) {
+ if (devMemory->owner()->getHostMem() == nullptr) {
bool result = false;
if (cmd.memory().asImage() && !imageBuffer) {