Repository navigation
test(5325): re-triage the GPU-host reds — 24 of 25 already green, fix the last two Marlin gates - #6426
Merged
Conversation
#6279 converted the node named in #5325 item 11 to ``requires_nvidia_cuda()`` but left two Marlin tests in the same file on ``skipif(not torch.cuda.is_available())``: - ``test_post_init_refreshes_a_materialized_cpu_snapshot_on_cuda`` - ``test_v1_grouped_checkpoint_loads_with_auto_cpu_offload`` HIP reuses the CUDA device namespace, so ``torch.cuda.is_available()`` is True on ROCm and both markers let the test run. ``utils/marlin.py`` then returns ``"Marlin kernel is not supported on ROCm."`` and ``marlin_validate_runtime_device`` raises ``ValueError``, so the tests fail instead of skipping. ``_marlin_layer_or_skip()`` does not cover this: it catches ``ImportError``/``ModuleNotFoundError`` only. Use the documented NVIDIA predicate so all three Marlin nodes in the file report the same skip reason. On a CUDA build the predicate is True, so the nodes run exactly as before.
This was referenced Nov 29, 2026
Qubitium
added a commit
that referenced
this pull request
Nov 29, 2026
…w-up) (#6439) `torch.cuda.is_available()` is true on ROCm because HIP reuses the CUDA device namespace, so a `skipif(not torch.cuda.is_available())` marker lets a Marlin-only test run. There is no ROCm Marlin kernel, so the load raises `ValueError: Marlin kernel is not supported on ROCm.` -- a failure where a skip is correct. #6426 fixed two nodes in `test_hf_bridge_cpu_offload_5022.py` and #6279 fixed one more; these three were left behind: - `test_hf_bridge_legacy_qzeros_marlin_6274.py`: `test_legacy_symmetric_checkpoint_loads_on_the_auto_marlin_kernel` loads with `{"": 0}` and asserts the selected kernel is `MarlinLinear`, so on ROCm it fails on the assertion instead of skipping. The sibling nodes in that file are device-agnostic and keep running on ROCm. - `test_openai_server_lifecycle.py`: `test_gpu_memory_does_not_grow_across_serve_cycles` loads with `backend=BACKEND.MARLIN`, and its gate additionally read `torch.cuda.get_device_capability(0)`, which reports an unrelated numeric pair on HIP (gfx1201 -> (12, 0)) -- the anti-pattern documented in `tests/accelerator_gates.py`. - `models/test_llama3_2_fusion.py`: `test_llama32_1b_fusion_save_reload` asserts AUTO selects `MarlinLinear`/`AwqMarlinLinear`. Its sibling `test_tiny_llama_fusion_after_fresh_quantization` quantizes through `BACKEND.GPTQ_TORCH` and is device-agnostic, so only the 1B node is gated. Use the documented `requires_nvidia_cuda()` predicate, matching #6426 and #6279. On an NVIDIA build it is True, so all three nodes run exactly as before; on HIP they skip with a reason that names the requirement. Not changed, after measurement: `tests/kernels/test_asymmetric_real_models.py` already skips on ROCm via `_require_candidate_backend()` -> `validate_device()` -> `NotImplementedError`, and `tests/test_requant_embed_endpoint_5116.py` gates generic CUDA-device tests that are valid on ROCm (it passes 13/13 on NVIDIA; its simulated-HIP failures come from Triton's AMD driver, not from gptqmodel's ROCm branches). Co-authored-by: agent <agent@local>
Qubitium
marked this pull request as ready for review
November 29, 2026 20:13
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.
Re-triage of #5325 on
main=a4471c53b(the issue was filed atc03416cc5). Tracking issue stays open.Finding: 24 of the 25 listed items are already fixed. One item was only partially fixed — two Marlin gates in the file named by item A11 were missed — and that is the whole diff here.
Status of every listed item
maintest_concurrency_guards.py::test_cpu_bf16x3_capability_probe_respects_an_active_scopea668dc8ef(#5564)test_kernel_audit_regressions.py::test_device_move_restores_checkpoint_layout[TorchAten/TorchFused]a668dc8ef(#5564)test_gemma3_vl_support.py,test_qwen3_5_moe_multimodal_support.py8c71625b5(#5565)test_lm_head.py::TestLmHeadLoad::test_eval/ModelTest.quantModelTestPrequantizedLoadContract3 passed)8e4013994(#6277)test_q4_exllama_v2.pyrivision=typo"rivision" not in calls8c71625b5(#5565)test_pre_looper_failure_cleanup_4862.pyx28e4013994(#6277)test_ci_free_threaded_lane.py::test_gate_passes_with_gil08c71625b5(#5565)test_hf_bridge_cpu_offload_5022.py::test_awq_marlin_uses_the_shared_offload_post_init;test_hf_bridge_v2_save_qzeros_4952.pye2299af57(#6279)test_post_init_refreshes_a_materialized_cpu_snapshot_on_cuda,test_v1_grouped_checkpoint_loads_with_auto_cpu_offloadtest_cpu_int4_verify_cost_4884.pyx2a668dc8ef(#5564)test_vlm_prepare_dataset_contract_4633.py(62) +test_vlm_pretokenized_calibration.py(17)8c71625b5(#5565)test_torch.pymutation/cache nodesa668dc8ef(#5564)test_torch_cpu_avx512.pyvbmi/xsave/fused-biasa668dc8ef(#5564)test_paro_training_gradients_4958.py::test_cuda_awq_gemm_is_reserved_for_inferencerequires_nvidia_cuda()e2299af57(#6279)test_gguf_all_formats.py::test_gguf_kernel_independent_packed_oraclee2299af57(#6279)test_packing_numeric_boundaries.pycollection errortests/fp8_test_utils3f38d5ee1(#5344)kernels/test_inference_numeric_range.pyFP8 nodes3f38d5ee1(#5344)test_fail_closed_checkpoint_5218.py::_fp8_checkpointdecodes 1e7x and still passesweight_scale_semantics: "inverse", drops the FP8lm_head, and nowassert_closes against the dense logitse6ad644a1(#5288) +3f38d5ee1(#5344)kernels/test_fp8_kernel.py,test_fp8_bias_range.pylean-epilogue oracleIS_ROCMmonkeypatch356a5e038(#6280)test_qqq_per_channel_checkpoint_5126.py(#5186),test_pangu_alpha_replay.py(#5169)QQQTorchLinear if IS_ROCM else QQQLinear;_gpu_dtype()returns fp16 on HIP356a5e038(#6280)kernels/test_paro_triton_cudagraph_5225.pyno GPU gatecc10a7a5c(#6255)test_docs_contract_refs.pystalehessian_inverseline3f38d5ee1(#5344)test_rehome_cpu_fallback_pairs.pyorder dependence_CUDA_SOURCE_ALLOWLISTpins the expected setcc10a7a5c(#6255)Measured on
main, 0 failures throughout: 1298 passed / 14 skipped (the A6+A9+A12+A13+A15+A18 batch), 485 passed / 65 skipped (B1 numeric range), 8 passed (A5+A14), 3 passed (A7), 4 passed / 2 skipped (A10), 25 passed on GPU (the A11 file).The one remaining defect
tests/test_hf_bridge_cpu_offload_5022.pyhas three Marlin tests. #6279 converted the one the issue names, but two others in the same file still used@pytest.mark.skipif(not torch.cuda.is_available(), ...):test_post_init_refreshes_a_materialized_cpu_snapshot_on_cuda(line 916)test_v1_grouped_checkpoint_loads_with_auto_cpu_offload(line 1092)HIP reuses the CUDA device namespace, so
torch.cuda.is_available()isTrueon ROCm and both markers let the test run.gptqmodel/utils/marlin.py:104then returns"Marlin kernel is not supported on ROCm."andmarlin_validate_runtime_deviceraisesValueError, so the nodes fail instead of skipping._marlin_layer_or_skip()does not cover this — it catchesImportError/ModuleNotFoundErroronly, not theValueErrorROCm raises.Predicate comparison on this host, with
torch.version.hippatched to simulate HIP:Change
Two lines: use the documented
requires_nvidia_cuda()predicate, matching the sibling node #6279 already converted. No product code, no assertion changed, no test deleted or skipped beyond what the predicate already implies.Verification
CUDA_DEVICE_ORDER=PCI_BUS_ID+CUDA_VISIBLE_DEVICES=1)CUDA_VISIBLE_DEVICES="")All three Marlin skips now report the same reason:
test_hf_bridge_cpu_offload_5022.py:361,:916,:1092→ Marlin needs an NVIDIA CUDA build.ruff check tests/test_hf_bridge_cpu_offload_5022.py→ clean.Left for the maintainer
torch.version.hipon this NVIDIA host, not by running on AMD hardware. The gates are correct by construction, but a real ROCm run is the only way to confirm the underlying kernels._cpu_fallback_sourcesstill walks the live registry, which is fine for a test but worth knowing if that helper is ever promoted to product code.Full report:
/root/openai-audit/triage-5325.md.