Skip to content

Commit 068db00

Browse files
committed
Fixed the CI issue
1 parent e746fec commit 068db00

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/nvidia3.6-build-and-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

python/test/tle/unit/test_tle_get_node_rank.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
import triton.experimental.tle.language as tle
77
import triton.language as tl
88

9+
910
LOCAL_WORLD_SIZE = int(os.environ["LOCAL_WORLD_SIZE"])
1011
WORLD_SIZE = int(os.environ["WORLD_SIZE"])
1112
if 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()

0 commit comments

Comments
 (0)