P4 to Git Change 1766106 by kjayapra@99_HIPWS_SLV_CHECKIN on 2019/04/04 18:07:26

SWDEV-144570 - Implementation of hipMemcpyToSymbol and simillar fns for PAL.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#24 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#89 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#37 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#102 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#46 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#135 edit


[ROCm/clr commit: 842094ccbf]
This commit is contained in:
foreman
2019-04-04 18:22:40 -04:00
parent 0a54fb3e5f
commit 6f5048ba0a
6 changed files with 169 additions and 8 deletions
@@ -107,6 +107,11 @@ Memory::Memory(Memory& parent, Flags flags, size_t origin, size_t size, Type typ
if (parent.getHostMem() != nullptr) {
setHostMem(reinterpret_cast<address>(parent.getHostMem()) + origin);
}
if (parent.getSvmPtr() != nullptr) {
setSvmPtr(reinterpret_cast<address>(parent.getSvmPtr()) + origin);
}
// Inherit memory flags from the parent
if ((flags_ & (CL_MEM_READ_WRITE | CL_MEM_READ_ONLY | CL_MEM_WRITE_ONLY)) == 0) {
flags_ |= parent_->getMemFlags() & (CL_MEM_READ_WRITE | CL_MEM_READ_ONLY | CL_MEM_WRITE_ONLY);