Skip to content

test: realign seven stale doubles and oracles (#4969) - #4978

Merged
Qubitium merged 1 commit into
mainfrom
root/suite-triage-r17-4969
Nov 17, 2026
Merged

Qubitium merged 1 commit into
mainfrom
root/suite-triage-r17-4969

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

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

Per-item results

# Node Before After Reason
1 test_fusion_kernel_backends.py::test_native_fusion_shapes_oracle_ownership_and_invalidation[gate_up,qkv_gqa-cpu-TorchLinear-torch.float16] 2 failed, 6 passed, 151 deselected 8 passed, 151 deselected #4871 Dynamo trace garbage is cyclic; gc.collect() frees it, refs still dead
2 test_failed_run_fence_4595.py::test_failed_quantize_does_not_leak_offload_bundles 1 failed, 2 passed (file) 3 passed (file) #4829 finalizer owns the run dir until the model dies
3 test_exl3_projection_resume.py::test_process_resumes_from_packed_checkpoint_without_requantizing 1 failed, 13 passed (file, CUDA) 14 passed (file, CUDA) #4837 added _release_deferred_hessian_sources to the real capture
4 test_kernel_audit_regressions.py::test_exllamav3_wide_inputs_route_to_torch_reconstruction 1 failed, 67 passed (file) 1 passed; 68 passed (file) #4835 forward() calls _needs_torch_fallback() first
5 test_moe_resave_preserves_experts_4589.py::test_resave_refuses_when_expert_shell_is_not_defused 1 failed, 1 passed (file) 2 passed (file) #4810 refuses earlier with RuntimeError, nothing written
6 test_positional_mask_capture_4660.py::test_replayed_layers_reproduce_native_layer_output[eager,sdpa] 2 failed, 5 passed (file) 7 passed (file) #4930 derives position_ids from the mask
7 test_qqq_kernel_memory_4387.py::test_qqq_torch_forward_is_bitwise_unchanged[-1,128] forced packed path: AttributeError: 'NoneType' ... 'to' 2 passed (file: 8 passed, 3 skipped) #4856 first forward drops B/scales; oracle built first

Item 7 note: this host has no AVX512 (_qqq_cpu_kernel() returns None), so the
first 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 drops B): the old oracle raises
AttributeError: 'NoneType' object has no attribute 'to'; the reordered test
snapshots the oracle first and survives the drop.

Tests

# targeted nodes (CPU, CUDA_VISIBLE_DEVICES="")
pytest -q tests/module_tree/test_fusion_kernel_backends.py -k "cpu and TorchLinear and float16 and (gate_up or qkv_gqa)"  # 8 passed
pytest -q tests/test_failed_run_fence_4595.py::test_failed_quantize_does_not_leak_offload_bundles  # 1 passed
pytest -q tests/test_kernel_audit_regressions.py::test_exllamav3_wide_inputs_route_to_torch_reconstruction  # 1 passed
pytest -q tests/test_moe_resave_preserves_experts_4589.py::test_resave_refuses_when_expert_shell_is_not_defused  # 1 passed
pytest -q tests/test_positional_mask_capture_4660.py::test_replayed_layers_reproduce_native_layer_output  # 2 passed
pytest -q tests/test_qqq_kernel_memory_4387.py::test_qqq_torch_forward_is_bitwise_unchanged  # 2 passed

# item 3, with one visible CUDA device
CUDA_VISIBLE_DEVICES=3 pytest -q tests/test_exl3_projection_resume.py::test_process_resumes_from_packed_checkpoint_without_requantizing  # 1 passed

Full-file deltas vs unmodified origin/main (55f9d9fc7):

File origin/main this branch
tests/module_tree/test_fusion_kernel_backends.py 1 failed, 47 passed, 144 skipped 48 passed, 144 skipped
tests/test_failed_run_fence_4595.py 1 failed, 2 passed 3 passed
tests/test_exl3_projection_resume.py (CUDA) 1 failed, 13 passed 14 passed
tests/test_kernel_audit_regressions.py 15 failed, 67 passed 14 failed, 68 passed
tests/test_moe_resave_preserves_experts_4589.py 1 failed, 1 passed 2 passed
tests/test_positional_mask_capture_4660.py 2 failed, 5 passed 7 passed
tests/test_qqq_kernel_memory_4387.py 8 passed, 3 skipped 8 passed, 3 skipped

The 14 remaining test_kernel_audit_regressions.py failures are the pre-existing
AVX512-only nodes on this non-AVX512 host; the only delta is the target node.

  • Unit tests have been executed and passed, or the reason they are not applicable is documented.
  • I added a new simple/fast unit test for this change, or documented why that is not applicable.

Model Support / Module Plan

Not applicable — test-only realignment; no MODEL_MAP, module-plan, or fusion
definition 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:

  • Reviewed this PR.
  • Checked that the code matches existing project structure, APIs, and conventions.
  • Avoided unnecessary monkeypatching and used the project's normal extension points where possible.
  • Minimized and compacted the impacted code surface.
  • Considered and eliminated potential regressions.

Kernel Accuracy Requirements

Not applicable — no kernel or fusion changes.

Notes

Lint: ruff check clean on all seven changed files.

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).
@Qubitium
Qubitium merged commit 1addb9c into main Nov 17, 2026
9 checks passed
@Qubitium
Qubitium deleted the root/suite-triage-r17-4969 branch November 17, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant