Skip to content

Commit 7e7871e

Browse files
committed
Swap info types to int from uint32_t
Signed-off-by: JackAKirk <[email protected]>
1 parent 0055a3b commit 7e7871e

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

include/ur_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9817,9 +9817,9 @@ urUSMReleaseExp(
98179817
///////////////////////////////////////////////////////////////////////////////
98189818
/// @brief Supported peer info
98199819
typedef enum ur_exp_peer_info_t {
9820-
UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED = 0, ///< [uint32_t] 1 if P2P access is supported otherwise P2P access is not
9820+
UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED = 0, ///< [int] 1 if P2P access is supported otherwise P2P access is not
98219821
///< supported.
9822-
UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED = 1, ///< [uint32_t] 1 if atomic operations are supported over the P2P link,
9822+
UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED = 1, ///< [int] 1 if atomic operations are supported over the P2P link,
98239823
///< otherwise such operations are not supported.
98249824
/// @cond
98259825
UR_EXP_PEER_INFO_FORCE_UINT32 = 0x7fffffff

include/ur_print.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10308,9 +10308,9 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_in
1030810308

1030910309
switch (value) {
1031010310
case UR_EXP_PEER_INFO_UR_PEER_ACCESS_SUPPORTED: {
10311-
const uint32_t *tptr = (const uint32_t *)ptr;
10312-
if (sizeof(uint32_t) > size) {
10313-
os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")";
10311+
const int *tptr = (const int *)ptr;
10312+
if (sizeof(int) > size) {
10313+
os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")";
1031410314
return UR_RESULT_ERROR_INVALID_SIZE;
1031510315
}
1031610316
os << (const void *)(tptr) << " (";
@@ -10320,9 +10320,9 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_exp_peer_in
1032010320
os << ")";
1032110321
} break;
1032210322
case UR_EXP_PEER_INFO_UR_PEER_ATOMICS_SUPPORTED: {
10323-
const uint32_t *tptr = (const uint32_t *)ptr;
10324-
if (sizeof(uint32_t) > size) {
10325-
os << "invalid size (is: " << size << ", expected: >=" << sizeof(uint32_t) << ")";
10323+
const int *tptr = (const int *)ptr;
10324+
if (sizeof(int) > size) {
10325+
os << "invalid size (is: " << size << ", expected: >=" << sizeof(int) << ")";
1032610326
return UR_RESULT_ERROR_INVALID_SIZE;
1032710327
}
1032810328
os << (const void *)(tptr) << " (";

scripts/core/EXP-USM-P2P.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Changelog
6969
+-----------+---------------------------------------------+
7070
| 1.1 | Added USM_P2P_EXTENSION_STRING_EXP ID Macro |
7171
+-----------+---------------------------------------------+
72+
| 1.2 | Switch Info types from uint32_t to int |
73+
+-----------+---------------------------------------------+
7274

7375
Contributors
7476
--------------------------------------------------------------------------------

scripts/core/exp-usm-p2p.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ name: $x_exp_peer_info_t
2424
typed_etors: True
2525
etors:
2626
- name: UR_PEER_ACCESS_SUPPORTED
27-
desc: "[uint32_t] 1 if P2P access is supported otherwise P2P access is not supported."
27+
desc: "[int] 1 if P2P access is supported otherwise P2P access is not supported."
2828
- name: UR_PEER_ATOMICS_SUPPORTED
29-
desc: "[uint32_t] 1 if atomic operations are supported over the P2P link, otherwise such operations are not supported."
29+
desc: "[int] 1 if atomic operations are supported over the P2P link, otherwise such operations are not supported."
3030
--- #--------------------------------------------------------------------------
3131
type: function
3232
desc: "Enable access to peer device memory"

0 commit comments

Comments
 (0)