diff --git a/include/ur_api.h b/include/ur_api.h index ca58a7ac66..f0ff2d5338 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -9817,9 +9817,9 @@ urUSMReleaseExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Supported peer info typedef enum ur_exp_peer_info_t { - UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED = 0, ///< [uint32_t] 1 if P2P access is supported otherwise P2P access is not + UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED = 0, ///< [int] 1 if P2P access is supported otherwise P2P access is not ///< supported. - UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED = 1, ///< [uint32_t] 1 if atomic operations are supported over the P2P link, + UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED = 1, ///< [int] 1 if atomic operations are supported over the P2P link, ///< otherwise such operations are not supported. /// @cond UR_EXP_PEER_INFO_FORCE_UINT32 = 0x7fffffff diff --git a/include/ur_print.hpp b/include/ur_print.hpp index 22c9683840..0439a12642 100644 --- a/include/ur_print.hpp +++ b/include/ur_print.hpp @@ -10308,9 +10308,9 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_in switch (value) { case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: { - const uint32_t *tptr = (const uint32_t *)ptr; - if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + const int *tptr = (const int *)ptr; + if (sizeof(int) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")"; return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; @@ -10320,9 +10320,9 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_in os << ")"; } break; case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: { - const uint32_t *tptr = (const uint32_t *)ptr; - if (sizeof(uint32_t) > size) { - os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")"; + const int *tptr = (const int *)ptr; + if (sizeof(int) > size) { + os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")"; return UR_RESULT_ERROR_INVALID_SIZE; } os << (const void *)(tptr) << " ("; diff --git a/scripts/core/EXP-USM-P2P.rst b/scripts/core/EXP-USM-P2P.rst index c244ddca3c..aa6c12ecb4 100644 --- a/scripts/core/EXP-USM-P2P.rst +++ b/scripts/core/EXP-USM-P2P.rst @@ -69,6 +69,8 @@ Changelog +-----------+---------------------------------------------+ | 1.1 | Added USM_P2P_EXTENSION_STRING_EXP ID Macro | +-----------+---------------------------------------------+ +| 1.2 | Switch Info types from uint32_t to int | ++-----------+---------------------------------------------+ Contributors -------------------------------------------------------------------------------- diff --git a/scripts/core/exp-usm-p2p.yml b/scripts/core/exp-usm-p2p.yml index 3293ab4e07..f3ba303c34 100644 --- a/scripts/core/exp-usm-p2p.yml +++ b/scripts/core/exp-usm-p2p.yml @@ -24,9 +24,9 @@ name: $x_exp_peer_info_t typed_etors: True etors: - name: UR_PEER_ACCESS_SUPPORTED - desc: "[uint32_t] 1 if P2P access is supported otherwise P2P access is not supported." + desc: "[int] 1 if P2P access is supported otherwise P2P access is not supported." - name: UR_PEER_ATOMICS_SUPPORTED - desc: "[uint32_t] 1 if atomic operations are supported over the P2P link, otherwise such operations are not supported." + desc: "[int] 1 if atomic operations are supported over the P2P link, otherwise such operations are not supported." --- #-------------------------------------------------------------------------- type: function desc: "Enable access to peer device memory" diff --git a/source/adapters/level_zero/usm_p2p.cpp b/source/adapters/level_zero/usm_p2p.cpp index 6e701aa803..756c76f8bc 100644 --- a/source/adapters/level_zero/usm_p2p.cpp +++ b/source/adapters/level_zero/usm_p2p.cpp @@ -41,7 +41,7 @@ ur_result_t urUsmP2PPeerAccessGetInfoExp(ur_device_handle_t commandDevice, UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet); - bool propertyValue = false; + int propertyValue = 0; switch (propName) { case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: { bool p2pAccessSupported = false;