Skip to content

test: fix the GGUF packed oracle and HIP gates (#5325) - #6279

Merged
Qubitium merged 2 commits into
mainfrom
fix/5325-gguf-rocm-issue
Nov 29, 2026
Merged

Qubitium merged 2 commits into
mainfrom
fix/5325-gguf-rocm-issue

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Part of #5325 (items A10, A11, A17, A18)

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
Qubitium marked this pull request as ready for review November 29, 2026 08:07
@Qubitium
Qubitium merged commit e2299af into main Nov 29, 2026
8 checks passed
@Qubitium
Qubitium deleted the fix/5325-gguf-rocm-issue branch November 29, 2026 08:07
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>
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