Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
59d6646
Implement dpctl.SyclDevice peer access
ndgrigorian May 3, 2025
7d2d20f
Add backend validation for peer access
ndgrigorian May 4, 2025
fc50e3b
Directly use `get_backend()` from sycl_device
ndgrigorian May 5, 2025
e08c2c9
Tweak docstrings
ndgrigorian May 6, 2025
3af91a8
Simplify logic checking backends for peer access
ndgrigorian May 6, 2025
dfca713
link method for disabling peer access to enabling method
ndgrigorian May 6, 2025
bdfee1b
Fix copy paste errors in peer device interface header
ndgrigorian May 6, 2025
4b3e9f1
Clarify which device has invalid backend in peer_access methods
ndgrigorian May 6, 2025
a21d585
Use ostringstream to output backend names instead of integers
ndgrigorian May 6, 2025
b8c899e
Use ostringstream in kernel bundle interface
ndgrigorian May 6, 2025
bb1f1d9
Adds Python tests for peer_access methods
ndgrigorian May 7, 2025
7106845
parametrize test_peer_device_arg_validation
ndgrigorian May 7, 2025
8563cb0
Factor out peer access validation
ndgrigorian May 12, 2025
9e7031e
Factor common code out of C-API peer access functions
ndgrigorian May 12, 2025
da45cdb
Add C-API tests for peer access functions
ndgrigorian May 12, 2025
ba7222f
Add check that backend types are the same in _CallPeerAccess
ndgrigorian May 12, 2025
417889d
Inline _CallPeerAccess helper function
ndgrigorian May 13, 2025
59377b4
Inline _check_peer_access helper function
ndgrigorian May 13, 2025
09a1ef6
Clean up peer access functions in libsyclinterface
ndgrigorian May 14, 2025
eff82ba
Add helper for raising more specific errors in peer access methods
ndgrigorian May 14, 2025
2fe0c96
Add tests for dpctl peer access enum helper utilities
ndgrigorian May 14, 2025
c76b521
Add an additional libsyclinterface test for peer access to self
ndgrigorian May 14, 2025
629a4b4
Adds a Python test for peer access to self raising ValueError
ndgrigorian May 14, 2025
101366f
Fix typo in peer access tests
ndgrigorian May 14, 2025
178ce96
Change peer access test description
ndgrigorian May 14, 2025
321582f
Fix a typo
ndgrigorian May 14, 2025
56bd37f
Refactor separate can_access_peer methods into a single method
ndgrigorian May 14, 2025
6a34d74
Update docstring of `can_access_peer`
ndgrigorian May 14, 2025
7317df9
Further tweak `can_access_peer` docstring
ndgrigorian May 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add check that backend types are the same in _CallPeerAccess
  • Loading branch information
ndgrigorian committed May 13, 2025
commit ba7222f4ca95f7eead071cb8d7cdf3a406ca4835
19 changes: 10 additions & 9 deletions libsyclinterface/source/dpctl_sycl_device_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,17 +908,18 @@ bool _CallPeerAccess(device dev, device peer)
auto BE1 = dev.get_backend();
auto BE2 = peer.get_backend();

if ((BE1 != sycl::backend::ext_oneapi_level_zero &&
BE1 != sycl::backend::ext_oneapi_cuda &&
BE1 != sycl::backend::ext_oneapi_hip) ||
(BE2 != sycl::backend::ext_oneapi_level_zero &&
BE2 != sycl::backend::ext_oneapi_cuda &&
BE2 != sycl::backend::ext_oneapi_hip) ||
(dev == peer))
if ((BE1 == BE2) &&
(BE1 == sycl::backend::ext_oneapi_level_zero ||
BE1 == sycl::backend::ext_oneapi_cuda ||
BE1 == sycl::backend::ext_oneapi_hip) &&
(BE2 == sycl::backend::ext_oneapi_level_zero ||
BE2 == sycl::backend::ext_oneapi_cuda ||
BE2 == sycl::backend::ext_oneapi_hip) &&
(dev != peer))
{
return false;
return true;
}
return true;
return false;
}

bool DPCTLDevice_CanAccessPeer(__dpctl_keep const DPCTLSyclDeviceRef DRef,
Expand Down