Skip to content

Commit 1858fea

Browse files
igchorkbenzie
authored andcommitted
Fix p2p access checking (#17919)
The order of arguments to zeDeviceCanAccessPeer was incorrect causing problems on platforms with both discrete and integrated GPUs. Relying on incorrecnt information zeContextMakeMemoryResident was being called for memory that was inaccesible on a device.
1 parent 9e24c65 commit 1858fea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/adapters/level_zero/v2/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ filterP2PDevices(ur_device_handle_t hSourceDevice,
2525

2626
ze_bool_t p2p;
2727
ZE2UR_CALL_THROWS(zeDeviceCanAccessPeer,
28-
(hSourceDevice->ZeDevice, device->ZeDevice, &p2p));
28+
(device->ZeDevice, hSourceDevice->ZeDevice, &p2p));
2929

3030
if (p2p) {
3131
p2pDevices.push_back(device);

0 commit comments

Comments
 (0)