P4 to Git Change 1781985 by gandryey@gera-win10 on 2019/05/13 11:54:40

SWDEV-189140 - Add P2P support in PAL path
	- PAL requires P2P resource open on the usage device. Add the new interface to open the resource
	- Add a hidden P2P device object creation into amd::Memory. It can be activated with OCL context that has a single device.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_p2p_amd.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#337 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#134 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.hpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#80 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#133 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#126 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#136 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#109 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#306 edit


[ROCm/clr commit: e16de03a2e]
Tento commit je obsažen v:
foreman
2019-05-13 12:19:10 -04:00
rodič ce4b3aa1d3
revize dec6780a42
13 změnil soubory, kde provedl 306 přidání a 157 odebrání
+2 -1
Zobrazit soubor
@@ -119,6 +119,7 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
switch (memoryType()) {
case Resource::Pinned:
case Resource::ExternalPhysical:
case Resource::P2PAccess:
// Marks memory object for direct GPU access to the host memory
flags_ |= HostMemoryDirectAccess;
break;
@@ -903,7 +904,7 @@ void Memory::mgpuCacheWriteBack() {
amd::ScopedLock lock(owner()->lockMemoryOps());
// Attempt to allocate a staging buffer if don't have any
if (owner()->getHostMem() == nullptr) {
if (!owner()->P2PAccess() && (owner()->getHostMem() == nullptr)) {
if (nullptr != owner()->getSvmPtr()) {
owner()->commitSvmMemory();
owner()->setHostMem(owner()->getSvmPtr());