Skip to content

Commit b7bada8

Browse files
committed
[Example] Fix reversed P2P direction logging (#1763)
Use the reverse peer-access check for GPU[j] -> GPU[i] so one-way P2P setups report the correct direction in both bindings examples. Made-with: Cursor
1 parent bd01457 commit b7bada8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cuda_bindings/examples/0_Introduction/simpleP2P_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main():
7373
)
7474
print(
7575
"> Peer access from {} (GPU{}) -> {} (GPU{}) : {}\n".format(
76-
prop[j].name, j, prop[i].name, i, "Yes" if i_access_j else "No"
76+
prop[j].name, j, prop[i].name, i, "Yes" if j_access_i else "No"
7777
)
7878
)
7979
if i_access_j and j_access_i:

cuda_bindings/examples/extra/isoFDModelling_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ def main():
649649
)
650650
print(
651651
"> Peer access from {} (GPU{}) -> {} (GPU{}) : {}\n".format(
652-
prop[j].name, j, prop[i].name, i, "Yes" if i_access_j else "No"
652+
prop[j].name, j, prop[i].name, i, "Yes" if j_access_i else "No"
653653
)
654654
)
655655
if i_access_j and j_access_i:

0 commit comments

Comments
 (0)