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
Este cometimento está contido em:
@@ -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<address>(host_ptr) - static_cast<address>(svmMem->getSvmPtr());
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador