Skip to content

test(docs): resolve stale contract line references (#5325) - #5950

Merged
Qubitium merged 1 commit into
mainfrom
test/5325-remaining-triage
Nov 20, 2026
Merged

Qubitium merged 1 commit into
mainfrom
test/5325-remaining-triage

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

main is red on three tests/test_docs_contract_refs.py nodes because the
cited definitions moved:

  • gptqmodel/models/fusion.py::_share_operands 444 -> 525
  • gptqmodel/quantization/gptq.py::compute_hessian_xtx 1277 -> 1888
    (per-call contexts now at 1944 and 1970)
  • gptqmodel/nn_modules/qlinear/torch.py::_gptq_gemm_uniform_group_for_current_g_idx
    1031 -> 1114

Update the documents and the CONTRACT_REFS registry together. The
compute_hessian_xtx entry now uses the symbol form, matching
hessian_inverse next to it: gptq.py keeps growing with every fix PR, and
the comment on the neighbouring entry already says line citations drift
within a merge.

Refs #5325

What Changed

  • docs/fusion-planner.md: _share_operands citation 444 -> 525.
  • docs/rocm-default-environment.md: cite
    gptqmodel/quantization/gptq.py::compute_hessian_xtx instead of three
    hardcoded line offsets.
  • docs/generate-cpu-offload-autograd.md: both torch.py:1031 citations
    -> 1114.
  • tests/test_docs_contract_refs.py: the three matching CONTRACT_REFS
    entries.

Out of scope: no production code. The other items named in #5325 were
re-checked on 23468baf1 and already pass on this host (see Tests); the
ROCm-only gates were not re-run because this host has no ROCm device.

Tests

env GPTQ_BYPASS_SAFETY_CHECKS=1 PYTHONPATH=. \
  python -m pytest tests/test_docs_contract_refs.py -q
# 33 passed

env GPTQ_BYPASS_SAFETY_CHECKS=1 PYTHONPATH=. \
  python -m pytest \
  "tests/test_concurrency_guards.py::test_cpu_bf16x3_capability_probe_respects_an_active_scope" \
  tests/test_pre_looper_failure_cleanup_4862.py tests/test_torch_cpu_avx512.py \
  "tests/test_cpu_int4_verify_cost_4884.py::test_transformed_state_dict_is_bounded_by_its_own_bytes" \
  "tests/test_torch.py::test_forward_observes_weight_mutation_and_state_load_clears_metadata" \
  "tests/test_torch.py::test_cached_dequant_offloads_g_idx_to_cpu_on_cuda" \
  "tests/test_kernel_audit_regressions.py::test_device_move_restores_checkpoint_layout" -q -rs
# 27 passed, 30 skipped (AVX512-BF16 skips: aarch64 host)

bash format/check.sh
# All checks passed!

git diff --check
# clean

test_packing_numeric_boundaries.py now collects 115 nodes, the FP8
fail-closed fixture declares weight_scale_semantics: "inverse", and the
PARO Triton tests carry torch.cuda.is_available() gates, so B1, B2 and B5
from #5325 are already resolved on main.

Red/green: on 23468baf1 the three test_contract_reference_resolves nodes
fail with abs(nearest - cited) <= LINE_WINDOW; with this change the file is
green.

Measured Impact

Docs/test-only change; no VRAM, performance, or accuracy behavior changes.

Metric (unit) Before After Change
test_docs_contract_refs.py failing nodes 3 0 -3
test_docs_contract_refs.py passing nodes 30 33 +3
Runtime VRAM / latency / accuracy unchanged unchanged 0

Logic Flow

Not applicable: no control flow, tensor lifecycle, or resolution order
changes. The change only corrects citations and the registry that checks
them.

Kernel Accuracy

Not applicable: no kernel, dispatch, or numerical path touched.

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