Skip to content

[L0] Fix to p2p properties init for pNext and stype #1507

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 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions source/adapters/level_zero/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ template <> ze_structure_type_t getZeStructureType<ze_device_properties_t>() {
return ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
}
template <>
ze_structure_type_t getZeStructureType<ze_device_p2p_properties_t>() {
return ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES;
}
template <>
ze_structure_type_t getZeStructureType<ze_device_compute_properties_t>() {
return ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES;
}
Expand Down
4 changes: 2 additions & 2 deletions source/adapters/level_zero/usm_p2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp(
switch (propName) {
case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: {
bool p2pAccessSupported = false;
ze_device_p2p_properties_t p2pProperties;
ZeStruct<ze_device_p2p_properties_t> p2pProperties;
ZE2UR_CALL(zeDeviceGetP2PProperties,
(commandDevice->ZeDevice, peerDevice->ZeDevice, &p2pProperties));
if (p2pProperties.flags & ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS) {
Expand All @@ -55,7 +55,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp(
break;
}
case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: {
ze_device_p2p_properties_t p2pProperties;
ZeStruct<ze_device_p2p_properties_t> p2pProperties;
ZE2UR_CALL(zeDeviceGetP2PProperties,
(commandDevice->ZeDevice, peerDevice->ZeDevice, &p2pProperties));
propertyValue = p2pProperties.flags & ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS;
Expand Down