Repository navigation
Conversation
The disk and CPU offload flags reach the n-gram embedding through ple_policy(), which resolves VLLM_PLE_DISK_OFFLOAD and VLLM_PLE_CPU_OFFLOAD from the environment; setting the envs module attribute no longer reaches it. Set the environment instead. The two hand-built CPU-offload modules also need the layer_name that forward_impl uses for its diagnostic labels since 19cbb40. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ly7LM3m9fa6DRJPYQjnt95 Signed-off-by: Peuqui <43776522+Peuqui@users.noreply.github.com>
- test_sm70_decode_graph: CudaGraphManager now captures through a shared capture_context and passes stream= to torch.cuda.graph (629063e); the hand-built manager sets the context and the graph fake accepts keywords. - test_host_result, test_gguf_pinned_policy: the hybrid PLE flag is read through ple_policy, not a module-level envs import; the fakes provide the policy (or clear the environment) instead of patching module.envs. - test_ple_offload_worker: set VLLM_PLE_CPU_OFFLOAD in the environment that ple_policy reads, give the runner fake a kernel_config for the fast-lane check, and the connector fake its fast_lane attribute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ly7LM3m9fa6DRJPYQjnt95 Signed-off-by: Peuqui <43776522+Peuqui@users.noreply.github.com>
This was referenced Oct 15, 2026
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.
Purpose
Four tests in tests/models/qwen4_exp/test_ple.py fail on main 6f3557c (they already failed on be3722b):
test_ngram_embedding_disk_offload_allocates_only_meta_tableandtest_ngram_gpu_offload_retains_only_fp8_global_scalesetple_module.envs.VLLM_PLE_DISK_OFFLOAD/VLLM_PLE_CPU_OFFLOADas module attributes. The n-gram embedding reads both flags throughple_policy(), which resolves them from the environment (resolve_legacy_fieldscalls the env registry reader), so the attribute never reaches it: the first test sees_disk_offloadFalse; the second skips the CPU-offload branch ofload_weightsthat keeps only the weight scale, and the regular loader then fails on the missinglayer_multipliersbuffer. The tests now set the environment variables withmonkeypatch.setenv.test_ngram_cpu_offload_padding_does_not_overwrite_real_tokensandtest_ngram_fp8_cpu_offload_preserves_quantized_outputbuild the module with__new__and fail withAttributeError: 'Qwen4ExpNGramEmbedding' object has no attribute 'layer_name', whichforward_impluses for its diagnostic labels since 19cbb40. The tests now setlayer_name.A second commit repairs the remaining stale fakes in the same PLE offload area and the SM70 decode-graph test (20 more failures on main 6f3557c):
tests/compile/test_sm70_decode_graph.py::test_shared_capture_context_reaches_target_and_draft(8 cases):CudaGraphManagernow captures through a sharedcapture_contextand passesstream=totorch.cuda.graph(629063e); the hand-built manager sets the context and the graph fake accepts keywords.tests/kernels/ple/test_host_result.py::test_mtp_mapped_result_transport_admission(4) andtests/models/qwen4_exp/test_gguf_pinned_policy.py(5): the hybrid PLE flag is read throughple_policy, not a module-levelenvsimport, somonkeypatch.setattr(module.envs, ...)raised AttributeError; the fakes now provide the policy or clear the environment variable.tests/v1/worker/test_ple_offload_worker.py(3):VLLM_PLE_CPU_OFFLOADis set in the environment thatple_policyreads, the runner fake gets akernel_configfor the fast-lane check, and the connector fake itsfast_laneattribute.No runtime code changes.
Not a duplicate: the open PRs that edit these files (#1199 and #1094, #1023, #1020 for test_ple.py / test_ple_offload_worker.py) do not touch the repaired tests or fakes; gh pr list --state all --search "test_ple", "test_sm70_decode_graph", "test_host_result", "capture_context", "stale fakes" finds no other PR for them.
AI assistance was used for this change. I reviewed every line and ran the tests below.
Test Plan
Path coverage
N/A, test-only change: no runtime path is selected differently.
Test Result
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ly7LM3m9fa6DRJPYQjnt95