From c4c488b53f7a4a2bc8d3653ad56375bd91d64706 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 11 Sep 2014 11:32:24 -0400 Subject: [PATCH] P4 to Git Change 1075901 by gandryey@gera-dev-w7 on 2014/09/11 11:15:25 ECR #304775 - Make sure runtime detects USWC memory for subbuffers Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#110 edit --- rocclr/runtime/device/gpu/gpumemory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rocclr/runtime/device/gpu/gpumemory.cpp b/rocclr/runtime/device/gpu/gpumemory.cpp index d44f7013b3..b7b910f338 100644 --- a/rocclr/runtime/device/gpu/gpumemory.cpp +++ b/rocclr/runtime/device/gpu/gpumemory.cpp @@ -211,7 +211,8 @@ Memory::create( // Check if parent was allocated in system memory if ((view->resource_->memoryType() == Resource::Pinned) || // @todo Enable unconditional optimization for remote memory - ((view->resource_->memoryType() == Resource::Remote) && + (((view->resource_->memoryType() == Resource::Remote) || + (view->resource_->memoryType() == Resource::RemoteUSWC)) && (owner() != NULL) && (owner()->getMemFlags() & CL_MEM_ALLOC_HOST_PTR))) { // Marks memory object for direct GPU access to the host memory @@ -518,6 +519,7 @@ Memory::~Memory() } if ((owner() != NULL) && isHostMemDirectAccess() && + !(flags_ & SubMemoryObject) && (memoryType() != Resource::ExternalPhysical)) { // Unmap memory if direct access was requested unmap(NULL);