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
Cette révision appartient à :
@@ -552,7 +552,14 @@ bool CopyMemoryP2PCommand::validateMemory() {
|
||||
LogPrintfError("Can't allocate memory size - 0x%08X bytes!", memory2_->getSize());
|
||||
return false;
|
||||
}
|
||||
if (devices[0]->P2PStage() != nullptr) {
|
||||
bool p2pStaging = false;
|
||||
// Validate P2P memories on the current device, if any of them is null, then it's p2p staging
|
||||
if ((nullptr == memory1_->getDeviceMemory(queue()->device())) ||
|
||||
(nullptr == memory2_->getDeviceMemory(queue()->device()))) {
|
||||
p2pStaging = true;
|
||||
}
|
||||
|
||||
if (devices[0]->P2PStage() != nullptr && p2pStaging) {
|
||||
amd::ScopedLock lock(devices[0]->P2PStageOps());
|
||||
// Make sure runtime allocates memory on every device
|
||||
for (uint d = 0; d < devices[0]->GlbCtx().devices().size(); ++d) {
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur