Skip to content

[SYCL][P2P] Fix info query for P2P #15873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 31, 2024
Merged
Changes from all commits
Commits
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
9 changes: 2 additions & 7 deletions sycl/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ bool device::ext_oneapi_can_access_peer(const device &peer,
return true;
}

size_t returnSize = 0;
int value = 0;

ur_exp_peer_info_t UrAttr = [&]() {
switch (attr) {
case ext::oneapi::peer_access::access_supported:
Expand All @@ -248,11 +245,9 @@ bool device::ext_oneapi_can_access_peer(const device &peer,
"Unrecognized peer access attribute.");
}();
auto Adapter = impl->getAdapter();
int value = 0;
Adapter->call<detail::UrApiKind::urUsmP2PPeerAccessGetInfoExp>(
Device, Peer, UrAttr, 0, nullptr, &returnSize);

Adapter->call<detail::UrApiKind::urUsmP2PPeerAccessGetInfoExp>(
Device, Peer, UrAttr, returnSize, &value, nullptr);
Device, Peer, UrAttr, sizeof(int), &value, nullptr);

return value == 1;
}
Expand Down
Loading