SWDEV-314254 - Fix for hipMemcpy3D test crash

Change-Id: Iac70bfe0d351cfb5b56fefc9a6487d3f26f2b4ef


[ROCm/clr commit: aedbad0109]
This commit is contained in:
Sarbojit Sarkar
2021-12-09 07:31:03 +00:00
کامیت شده توسط Sarbojit Sarkar
والد 9b2abd8370
کامیت 4630f3ade0
3فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
@@ -507,14 +507,14 @@ bool TwoMemoryArgsCommand::validatePeerMemory(){
// explicit allow access is needed for P2P access
device::Memory* mem1 = memory1_->getDeviceMemory(*srcDevices[0]);
if (!mem1->getAllowedPeerAccess() && srcDevices.size() == 1) {
void* src = reinterpret_cast<void*>(mem1->virtualAddress());
void* src = reinterpret_cast<void*>(mem1->originalDeviceAddress());
accessAllowed = srcDevices[0]->deviceAllowAccess(src);
mem1->setAllowedPeerAccess(true);
}
device::Memory* mem2 = memory2_->getDeviceMemory(*dstDevices[0]);
if (!mem2->getAllowedPeerAccess() && dstDevices.size() == 1) {
void* dst = reinterpret_cast<void*>(mem2->virtualAddress());
void* dst = reinterpret_cast<void*>(mem2->originalDeviceAddress());
accessAllowed &= dstDevices[0]->deviceAllowAccess(dst);
mem2->setAllowedPeerAccess(true);
}