From e85c8c464b3642c2e7c6a518d7d6e4f74dffe1ca Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 28 Nov 2014 18:11:36 -0500 Subject: [PATCH] P4 to Git Change 1101352 by gandryey@gera-dev-w7 on 2014/11/28 18:03:18 ECR #304775 - Make optimization for read map of USWC memory - If runtime detects USWC map with read operation, then it will switch to indirect map. This should improve map-read performance on APU(s) when USWC memory is used instead of frame buffer Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#72 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#8 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#269 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#89 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#172 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#234 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#486 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#134 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#112 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#43 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#340 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#88 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#45 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsamemory.cpp#42 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsamemory.hpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsavirtual.cpp#98 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsamemory.cpp#6 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsamemory.hpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.cpp#26 edit [ROCm/clr commit: c0216ada76c998231e12bb558248559f51bac6ab] --- projects/clr/opencl/api/opencl/amdocl/cl_memobj.cpp | 4 ++-- projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_memobj.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_memobj.cpp index aa2f90abdb..0a03c66320 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_memobj.cpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_memobj.cpp @@ -3236,7 +3236,7 @@ RUNTIME_ENTRY_RET(void *, clEnqueueMapBuffer, ( // Attempt to allocate the map target now (whether blocking or non-blocking) void* mapPtr = hostQueue.device().allocMapTarget( - *srcBuffer, srcOffset, srcSize); + *srcBuffer, srcOffset, srcSize, map_flags); if (NULL == mapPtr) { delete command; *not_null(errcode_ret) = CL_MAP_FAILURE; @@ -3500,7 +3500,7 @@ RUNTIME_ENTRY_RET(void *, clEnqueueMapImage, ( // Attempt to allocate the map target now (whether blocking or non-blocking) void *mapPtr = hostQueue.device().allocMapTarget( - *srcImage, srcOrigin, srcRegion, image_row_pitch, image_slice_pitch); + *srcImage, srcOrigin, srcRegion, map_flags, image_row_pitch, image_slice_pitch); if (NULL == mapPtr) { delete command; *not_null(errcode_ret) = CL_MAP_FAILURE; diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp index fcd815e0a3..20fe587d3f 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_svm.cpp @@ -780,7 +780,7 @@ RUNTIME_ENTRY(cl_int, clEnqueueSVMMap, ( return CL_OUT_OF_RESOURCES; } // Attempt to allocate the map target now (whether blocking or non-blocking) - void* mapPtr = (queue->device()).allocMapTarget(*svmMem, srcOffset, srcSize); + void* mapPtr = (queue->device()).allocMapTarget(*svmMem, srcOffset, srcSize, map_flags); if (NULL == mapPtr || mapPtr != svm_ptr) { return CL_OUT_OF_RESOURCES; }