Skip to content

Commit 5389e20

Browse files
aarongreigkbenzie
authored andcommitted
Merge pull request #1507 from nrspruit/fix_p2p_properties_init
[L0] Fix to p2p properties init for pNext and stype
1 parent 86490e2 commit 5389e20

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

source/adapters/level_zero/common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ template <> ze_structure_type_t getZeStructureType<ze_device_properties_t>() {
254254
return ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
255255
}
256256
template <>
257+
ze_structure_type_t getZeStructureType<ze_device_p2p_properties_t>() {
258+
return ZE_STRUCTURE_TYPE_DEVICE_P2P_PROPERTIES;
259+
}
260+
template <>
257261
ze_structure_type_t getZeStructureType<ze_device_compute_properties_t>() {
258262
return ZE_STRUCTURE_TYPE_DEVICE_COMPUTE_PROPERTIES;
259263
}

source/adapters/level_zero/usm_p2p.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp(
4141
switch (propName) {
4242
case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: {
4343
bool p2pAccessSupported = false;
44-
ze_device_p2p_properties_t p2pProperties;
44+
ZeStruct<ze_device_p2p_properties_t> p2pProperties;
4545
ZE2UR_CALL(zeDeviceGetP2PProperties,
4646
(commandDevice->ZeDevice, peerDevice->ZeDevice, &p2pProperties));
4747
if (p2pProperties.flags & ZE_DEVICE_P2P_PROPERTY_FLAG_ACCESS) {
@@ -55,7 +55,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp(
5555
break;
5656
}
5757
case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: {
58-
ze_device_p2p_properties_t p2pProperties;
58+
ZeStruct<ze_device_p2p_properties_t> p2pProperties;
5959
ZE2UR_CALL(zeDeviceGetP2PProperties,
6060
(commandDevice->ZeDevice, peerDevice->ZeDevice, &p2pProperties));
6161
propertyValue = p2pProperties.flags & ZE_DEVICE_P2P_PROPERTY_FLAG_ATOMICS;

0 commit comments

Comments
 (0)