File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ jobs:
132132 python3 -m pytest -s python/test/tle/unit \
133133 --ignore=python/test/tle/unit/test_tle_distributed_d2d.py \
134134 --ignore=python/test/tle/unit/test_tle_get_local_pe.py \
135- --ignore=python/test/tle/unit/test_tle_d2d_barrier.py
135+ --ignore=python/test/tle/unit/test_tle_d2d_barrier.py \
136+ --ignore=python/test/tle/unit/test_tle_get_node_rank.py \
136137 ## flagtree hints python tutorials
137138 python3 python/tutorials/hints/01/01-vector-add.py --only_unit_test
138139 # python3 python/tutorials/hints/02/02-fused-softmax.py --only_unit_test
Original file line number Diff line number Diff line change 66import triton .experimental .tle .language as tle
77import triton .language as tl
88
9+
910LOCAL_WORLD_SIZE = int (os .environ ["LOCAL_WORLD_SIZE" ])
1011WORLD_SIZE = int (os .environ ["WORLD_SIZE" ])
1112if WORLD_SIZE % LOCAL_WORLD_SIZE != 0 :
1213 raise ValueError ("WORLD_SIZE must be divisible by LOCAL_WORLD_SIZE" )
1314
14- DEVICE_MESH = tle .device_mesh (tle .MeshConfig (node = WORLD_SIZE // LOCAL_WORLD_SIZE , device = LOCAL_WORLD_SIZE ))
15+ DEVICE_MESH = tle .device_mesh (
16+ tle .MeshConfig (node = WORLD_SIZE // LOCAL_WORLD_SIZE , device = LOCAL_WORLD_SIZE )
17+ )
1518
1619
1720@triton .jit
@@ -49,7 +52,7 @@ def test_tle_get_node_rank():
4952 torch .cuda .synchronize ()
5053
5154 rank = dist .get_rank ()
52- expected_node_rank = int ( os . environ [ "GROUP_RANK" ])
55+ expected_node_rank = rank // LOCAL_WORLD_SIZE
5356 actual_node_ranks = node_rank_out .cpu ().tolist ()
5457 try :
5558 torch .testing .assert_close (
@@ -73,4 +76,5 @@ def test_tle_get_node_rank():
7376 tle .cleanup_communicator ()
7477
7578
76- test_tle_get_node_rank ()
79+ if __name__ == "__main__" :
80+ test_tle_get_node_rank ()
You can’t perform that action at this time.
0 commit comments