From 9558b4dc191191cc5ffd1a0fdcc21ebc99c97a2d Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 1 Jun 2018 14:57:43 -0400 Subject: [PATCH] P4 to Git Change 1562960 by skudchad@skudchad_test2_win_opencl on 2018/06/01 14:46:26 SWDEV-145570 - [HIP] - Rename SVManager to be more genric. The same functionality can be used for HIP without needing additonal map ReviewBoardURL = http://ocltc.amd.com/reviews/r/15054/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#83 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#220 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#306 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#591 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#419 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#92 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#104 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#87 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#53 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#29 edit --- opencl/api/opencl/amdocl/cl_memobj.cpp | 2 +- opencl/api/opencl/amdocl/cl_svm.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opencl/api/opencl/amdocl/cl_memobj.cpp b/opencl/api/opencl/amdocl/cl_memobj.cpp index 6a88d9d3ea..49e1852b94 100644 --- a/opencl/api/opencl/amdocl/cl_memobj.cpp +++ b/opencl/api/opencl/amdocl/cl_memobj.cpp @@ -404,7 +404,7 @@ RUNTIME_ENTRY_RET(cl_mem, clCreateBuffer, (cl_context context, cl_mem_flags flag amd::Context& amdContext = *as_amd(context); amd::Memory* mem = NULL; // check if the ptr is in the svm space, if yes, we need return SVM buffer - amd::Memory* svmMem = amd::SvmManager::FindSvmBuffer(host_ptr); + amd::Memory* svmMem = amd::MemObjMap::FindMemObj(host_ptr); if ((NULL != svmMem) && (flags & CL_MEM_USE_HOST_PTR)) { size_t svmSize = svmMem->getSize(); size_t offset = static_cast
(host_ptr) - static_cast
(svmMem->getSvmPtr()); diff --git a/opencl/api/opencl/amdocl/cl_svm.cpp b/opencl/api/opencl/amdocl/cl_svm.cpp index 237331bba2..3b00bf1c64 100644 --- a/opencl/api/opencl/amdocl/cl_svm.cpp +++ b/opencl/api/opencl/amdocl/cl_svm.cpp @@ -693,7 +693,7 @@ RUNTIME_ENTRY(cl_int, clEnqueueSVMMap, if ((queue->device()).isFineGrainedSystem()) { // leave blank on purpose for FGS no op } else { - svmMem = amd::SvmManager::FindSvmBuffer(svm_ptr); + svmMem = amd::MemObjMap::FindMemObj(svm_ptr); if (NULL != svmMem) { // make sure the context is the same as the context of creation of svm space if (hostQueue.context() != svmMem->getContext()) { @@ -826,7 +826,7 @@ RUNTIME_ENTRY(cl_int, clEnqueueSVMUnmap, amd::Memory* svmMem = NULL; if (!(queue->device()).isFineGrainedSystem()) { // check if the ptr is in the svm space - svmMem = amd::SvmManager::FindSvmBuffer(svm_ptr); + svmMem = amd::MemObjMap::FindMemObj(svm_ptr); // Make sure we have memory for the command execution if (NULL != svmMem) { // Make sure we have memory for the command execution @@ -1144,7 +1144,7 @@ RUNTIME_ENTRY(cl_int, clEnqueueSVMMigrateMem, for (cl_uint i = 0; i < num_svm_pointers; i++) { const void* svm_ptr = svm_pointers[i]; - amd::Memory* svmMem = amd::SvmManager::FindSvmBuffer(svm_ptr); + amd::Memory* svmMem = amd::MemObjMap::FindMemObj(svm_ptr); if (NULL != svmMem) { // make sure the context is the same as the context of creation of svm space if (hostQueue.context() != svmMem->getContext()) {