From 193a70577ad4cb5e08869c2dd6d41a476446d59a Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 6 Feb 2015 20:44:19 -0500 Subject: [PATCH] P4 to Git Change 1119795 by xcui@merged_opencl_jxcwin on 2015/02/06 20:33:37 EPR #413091 - Back out changelist 1119692 Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#10 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#117 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#206 edit [ROCm/clr commit: a1fb1864da7003d51a13c29a39366eabf7c73496] --- .../rocclr/runtime/device/gpu/gpumemory.cpp | 18 +----------------- .../rocclr/runtime/device/gpu/gpuresource.cpp | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp b/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp index e59e63b0b7..e9a4590329 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpumemory.cpp @@ -923,22 +923,6 @@ Memory::allocMapTarget( size_t offset = origin[0]; incIndMapCount(); - void *initHostPtr = NULL; - bool failed = false; - - if (!owner()->getSvmPtr()) { - initHostPtr = owner()->getHostMem(); - static const bool forceAllocHostMem = true; - if (NULL == initHostPtr) { - if (!owner()->allocHostMemory(NULL, forceAllocHostMem)) { - failed = true; - } - } - } - else { - owner()->commitSvmMemory(); - initHostPtr = owner()->getSvmPtr(); - } // If host memory exists, use it if ((owner()->getHostMem() != NULL) && isDirectMap()) { @@ -970,7 +954,7 @@ Memory::allocMapTarget( amd::Memory* memory = NULL; // Search for a possible indirect resource //For SVM implementation, we cannot use cached map. if svm space, use the svm host pointer - + void *initHostPtr = owner()->getSvmPtr(); cl_mem_flags flag = 0; bool canBeCached = true; if (NULL != initHostPtr) { diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp index d86b5e0263..a1e5db9988 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuresource.cpp @@ -346,7 +346,7 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap) desc.vaBase = 0; desc.minAlignment = 0; desc.section = GSL_SECTION_REGULAR; - if (NULL != params && NULL != params->owner_ && memType != Pinned) { //make sure params not NULL + if (NULL != params && NULL != params->owner_) { //make sure params not NULL mcaddr svmPtr = reinterpret_cast(params->owner_->getSvmPtr()); desc.vaBase = (svmPtr == 1)? 0:svmPtr; cal_.SVMRes_ = (svmPtr != 0);