mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add debug flag to override zeDeviceCanAccessPeer return value.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
22dbae1771
commit
3384b2fed0
@@ -72,6 +72,11 @@ ze_result_t DeviceImp::canAccessPeer(ze_device_handle_t hPeerDevice, ze_bool_t *
|
||||
DeviceImp *pPeerDevice = static_cast<DeviceImp *>(Device::fromHandle(hPeerDevice));
|
||||
uint32_t peerRootDeviceIndex = pPeerDevice->getNEODevice()->getRootDeviceIndex();
|
||||
|
||||
if (NEO::DebugManager.flags.ForceZeDeviceCanAccessPerReturnValue.get() != -1) {
|
||||
*value = !!NEO::DebugManager.flags.ForceZeDeviceCanAccessPerReturnValue.get();
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
if (this->crossAccessEnabledDevices.find(peerRootDeviceIndex) != this->crossAccessEnabledDevices.end()) {
|
||||
*value = this->crossAccessEnabledDevices[peerRootDeviceIndex];
|
||||
} else if (this->getNEODevice()->getRootDeviceIndex() == peerRootDeviceIndex) {
|
||||
|
||||
Reference in New Issue
Block a user