Repository navigation
test: fix the GGUF packed oracle and HIP gates (#5325) - #6279
Merged
Merged
Conversation
The `contracts` job installs only pytest/pyyaml and collects this file with `--noconftest`, so the top-level `import torch` added with the #5113 item 10 gate turned that collection into ModuleNotFoundError. Move the import inside `_pinned_ci_torch_build`, where a missing torch simply means the pinned CUDA 13.2 build cannot be present (skip, not error).
Qubitium
marked this pull request as ready for review
November 29, 2026 08:07
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
added a commit
that referenced
this pull request
Nov 29, 2026
…ild (#6426) #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. Co-authored-by: agent <agent@local>
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.
Part of #5325 (items A10, A11, A17, A18)