Repository navigation
test: realign seven stale doubles and oracles (#4969) - #4978
Merged
Merged
Conversation
Seven tests went red because their doubles/oracles predate library changes that behave as intended. This is test-only; no product code changes. - test_fusion_kernel_backends: gc.collect() before the weakref check; #4871 leaves transient Dynamo trace garbage that keeps the pre-fusion weight alive. The refs are still asserted dead afterwards. - test_failed_run_fence_4595: del qmodel + gc.collect() so #4829's finalizer runs before the no-leak assertion; a late finalizer must not recreate the released run dir. - test_exl3_projection_resume: add _release_deferred_hessian_sources() to the _Capture double (#4837). - test_kernel_audit_regressions: stub _needs_torch_fallback=lambda: False on the SimpleNamespace self (#4835). - test_moe_resave_preserves_experts_4589: accept the earlier RuntimeError "does not provide tensors" refusal (#4810); still assert no safetensors. - test_positional_mask_capture_4660: build the native oracle with the same mask-derived position_ids the capture uses (#4930). - test_qqq_kernel_memory_4387: snapshot the oracle weight/s_channel before the first forward, which may drop the checkpoint layout (#4856).
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.
Summary
Fixes the seven stale test doubles/oracles from #4969. Every item is a test
that went red after a library change that behaves as its commit intends; no
product code is touched.
What Changed
tests/module_tree/test_fusion_kernel_backends.py:gc.collect()before theweakref check in
_check_native_fusion; fix(mem): drop the reference cycles a single-device GPU load leaves behind (#4847) #4871 makes the module a graph inputof the compiled
dequantize_weight, so Dynamo leaves transient trace garbage(
LazyCache -> LazyVariableTracker -> ConstDictVariableof_buffers). Therefs are still asserted dead afterwards — the contract is unchanged.
tests/test_failed_run_fence_4595.py:del qmodel; gc.collect()before theno-leak assertion; since fix(looper): keep the offload root for completed layers of a cancelled run (#4807) #4829 a failed
quantize()hands the per-run dir tothe model's
weakref.finalizewhile completed layers are still disk-offloadedshells. The late-finalizer property (must not recreate the released dir) is
still asserted.
tests/test_exl3_projection_resume.py: add_release_deferred_hessian_sources()to the
_Capturedouble (perf(exl3): tile Hessian symmetrization and release the capture partial (#4818) #4837).tests/test_kernel_audit_regressions.py: give theSimpleNamespaceselfstub
_needs_torch_fallback=lambda: False(fix(exl3): reconstruct through the portable kernel when the trellis is off CUDA (#4789) #4835), so the wide-input routingunder test is still reached.
tests/test_moe_resave_preserves_experts_4589.py: accept the earlierRuntimeError: ... does not provide tensorsrefusal from fix(omni): save and load Qwen2.5-Omni checkpoints in the source HF key layout (#4758) #4810 alongside theValueError: Refusing to re-save; still assert nomodel.safetensors.tests/test_positional_mask_capture_4660.py: build the native oracle with thesame mask-derived
position_ids(cumsum(-1) - 1, pad = 1) the capture usessince fix(capture): derive position_ids from the mask for a padded calibration batch (#4861) #4930; keeps the whole-tensor replay comparison.
tests/test_qqq_kernel_memory_4387.py: snapshot the oracle weight ands_channelbefore the first forward, which may drop the checkpoint layoutfor the packed CPU cache (fix(qqq): replace the CPU checkpoint layout with the packed cache (#4805) #4856).
Per-item results
test_fusion_kernel_backends.py::test_native_fusion_shapes_oracle_ownership_and_invalidation[gate_up,qkv_gqa-cpu-TorchLinear-torch.float16]gc.collect()frees it, refs still deadtest_failed_run_fence_4595.py::test_failed_quantize_does_not_leak_offload_bundlestest_exl3_projection_resume.py::test_process_resumes_from_packed_checkpoint_without_requantizing_release_deferred_hessian_sourcesto the real capturetest_kernel_audit_regressions.py::test_exllamav3_wide_inputs_route_to_torch_reconstructionforward()calls_needs_torch_fallback()firsttest_moe_resave_preserves_experts_4589.py::test_resave_refuses_when_expert_shell_is_not_defusedRuntimeError, nothing writtentest_positional_mask_capture_4660.py::test_replayed_layers_reproduce_native_layer_output[eager,sdpa]position_idsfrom the masktest_qqq_kernel_memory_4387.py::test_qqq_torch_forward_is_bitwise_unchanged[-1,128]AttributeError: 'NoneType' ... 'to'B/scales; oracle built firstItem 7 note: this host has no AVX512 (
_qqq_cpu_kernel()returnsNone), so thefirst forward never takes the packed path and the node passes unmodified. The
stale-oracle failure was reproduced by forcing the exact AVX512 path
(
module._packed_weight_for_cpu(), which dropsB): the old oracle raisesAttributeError: 'NoneType' object has no attribute 'to'; the reordered testsnapshots the oracle first and survives the drop.
Tests
Full-file deltas vs unmodified
origin/main(55f9d9fc7):tests/module_tree/test_fusion_kernel_backends.pytests/test_failed_run_fence_4595.pytests/test_exl3_projection_resume.py(CUDA)tests/test_kernel_audit_regressions.pytests/test_moe_resave_preserves_experts_4589.pytests/test_positional_mask_capture_4660.pytests/test_qqq_kernel_memory_4387.pyThe 14 remaining
test_kernel_audit_regressions.pyfailures are the pre-existingAVX512-only nodes on this non-AVX512 host; the only delta is the target node.
Model Support / Module Plan
Not applicable — test-only realignment; no
MODEL_MAP, module-plan, or fusiondefinition changes.
Logic Flow Documentation
Not applicable — no control flow or tensor-lifecycle change in shipped code.
Review Requirements
I or an AI agent (such as Codex or Claude) have:
Kernel Accuracy Requirements
Not applicable — no kernel or fusion changes.
Notes
Lint:
ruff checkclean on all seven changed files.