Repository navigation
[Fix] Read TensorCast's WORLD placement under its current names - #41805
Merged
Merged
Conversation
ch-wan
requested review from
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann and
yizhang2077
as code owners
September 30, 2026 03:06
This was referenced Sep 30, 2026
ch-wan
force-pushed
the
cheng/hot-fix/tensorcast-world-placement
branch
from
September 30, 2026 04:24
96e0a09 to
f573c0e
Compare
The TensorCast host allocator read `get_parallel().world_rank` and `world_size` when no placement is passed. Those names had been split into `launch_world_rank` / `launch_world_size` before the backend landed, so both production paths (`TensorcastStore.__init__` and `get_tensorcast_host_allocator_from_runtime`) raised AttributeError. The package's TensorCast tests did not notice because they replace `get_parallel` with a namespace carrying the old names. Read the two names under their current spelling, and add a census over the whole package: every `get_parallel().<name>` read, directly or through a name bound to the context, must name a declared parallel field. On the parent it reports exactly these two reads. The one read of an undeclared name that remains, the KV-shard control plane's enable flag, is listed with its reason, and the census fails once it is no longer read.
ch-wan
force-pushed
the
cheng/hot-fix/tensorcast-world-placement
branch
from
September 30, 2026 20:24
f573c0e to
eed1566
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack (oldest at bottom):
Motivation
When no placement is passed in, the TensorCast host allocator reads
get_parallel().world_rankandget_parallel().world_size. Those names had already been split intolaunch_world_rank/launch_world_sizewhen the backend landed, so both production paths (TensorcastStore.__init__andget_tensorcast_host_allocator_from_runtime) raiseAttributeError. The package's own TensorCast tests miss this: they replaceget_parallelwith a namespace that carries the old names.Modifications
launch_world_rank/launch_world_size, and give the in-package test stubs the same names.test_runtime_context.py: everyget_parallel().<name>read in the package, direct or through a name bound to the context, must name a declared parallel field. The one remaining read of an undeclared name, the KV-shard control plane's enable flag (mem_cache/page_interleave.py, currently unreachable), is listed with its reason. The census fails once that read goes away, so the exception cannot go stale.Accuracy Tests
Not applicable: no model output changes.
main, the census reports exactly the two TensorCast reads; on this PR it passes.test/registered/unitat this PR's head, compared withmain: no new failures.tensorcastinstalled).Speed Tests and Profiling
Not applicable.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): 🚫 Run #36772466190
Latest PR Test (Extra): 🚫 Run #36772465602
Latest PR Test (AMD ROCm 10): 🚫 Run #36772465942