[Fix] Read TensorCast's WORLD placement under its current names (#41805)

This commit is contained in:
Cheng Wan
2026-09-30 13:25:03 -07:00
committed by GitHub
parent 4407a21f3c
commit e27b6e0971
4 changed files with 81 additions and 6 deletions
@@ -175,8 +175,8 @@ def build_tensorcast_session_options(
from sglang.srt.runtime_context import get_parallel
parallel = get_parallel()
world_rank = parallel.world_rank
world_size = parallel.world_size
world_rank = parallel.launch_world_rank
world_size = parallel.launch_world_size
rank_label = format_tensorcast_rank_label(world_rank, cast(int, world_size))
if config.transfer_mode == TensorcastTransferMode.ALLOCATOR:
@@ -214,8 +214,8 @@ def test_store_close_lifecycle_is_terminal_and_retains_allocator_roots_in_subpro
)
runtime_context.get_parallel = lambda: SimpleNamespace(
world_rank=0,
world_size=1,
launch_world_rank=0,
launch_world_size=1,
)
class FakeSession:
@@ -410,7 +410,7 @@ def test_registration_constructor_claim_is_final_local_step(
monkeypatch.setattr(
runtime_context,
"get_parallel",
lambda: SimpleNamespace(world_rank=0, world_size=1),
lambda: SimpleNamespace(launch_world_rank=0, launch_world_size=1),
)
def claim(options: object, *, owner: TensorcastStore) -> _FakeSession: