Skip to content

Commit

Permalink
Merge pull request #1507 from nrspruit/fix_p2p_properties_init
Browse files Browse the repository at this point in the history
[L0] Fix to p2p properties init for pNext and stype
  • Loading branch information
aarongreig committed Apr 16, 2024
2 parents ee2feb2 + 9222315 commit fe9a05e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit fe9a05e

Please sign in to comment.