Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

hip_q2_zero fails on gfx1201 (R9700) with ROCm 7.10: Q2_0 signed-zero fix e9a5f8d is gated to gfx1012 / HIP < 7

Open Beginner friendly
#1,474 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@nekomario28 is already working on this.

Since Oct 8, 2026.

  • #1540 by @nekomario28 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
backend, testing

Research direction

Start in src/kernels/cuda/iq_kernels.cu at the dq_q2_0 workaround and compare its HIP guard with the proposed change. Reproduce with the hip_q2_zero test on a HIP build; the issue reports failure on gfx1201 with ROCm 7.10. Done means the signed-zero test passes on the affected setup, while checking whether the change affects other HIP builds.

Written by the indexing model from the issue text.

Description

hip_q2_zero fails on an R9700 (gfx1201) with setup's default ROCm:

index=65 got=0x0000 expected=0x8000
index=69 got=0x0000 expected=0x8000
index=73 got=0x0000 expected=0x8000
index=77 got=0x0000 expected=0x8000
hip_q2_zero: 1024 values, 128 failures

It's the symptom e9a5f8d fixed for gfx1012: Q2_0 dequant to half, with a negative scale and code 1, gives +0 instead of −0. The workaround in dq_q2_0 (src/kernels/cuda/iq_kernels.cu) only applies when this holds:

#if defined(__HIPCC__) && defined(__gfx1012__) && HIP_VERSION_MAJOR < 7

gfx1201 on HIP 7 never takes it, so the compiler still folds d * 0.0f to +0 there.

Proposed fix: drop the arch and version conditions and keep only __HIPCC__, so every HIP build keeps the scale's sign for code 1. The branch is one compare on a path that already does per-element work, and it matches the FP32/CPU paths.

Impact: probably small. Only the sign of zero changes in Q2_0 half dequant (I measured Coder IQ1_M, which doesn't use Q2_0, and its answers are unaffected). But the test fails on a supported card with the default toolchain.

Not checked: I only ran ctest on the 7.10 build. A 7.14.0a20260612 build of the same tag had no tests built, so I don't know whether the newer compiler does the same. #918 lists ctest results on gfx1151/Windows without hip_q2_zero among the failures, so this may depend on the arch or compiler.

Environment: Strata v0.1.40.3 (d5ea713), Linux (Ubuntu 24.04), AMD Radeon AI PRO R9700 (gfx1201, 32 GB), Ryzen 9 9900X, TheRock ROCm 7.10.0a20251120 (gfx120X-all wheels, setup's default), built by ./setup.sh --backend hip, then cmake -DSTRATA_BUILD_TESTS=ON + ctest --test-dir build-hip.

Dominant language
C++
Stars
11.6k
Forks
1k
Avg merge
7h 46m
Merged PRs (30d)
30

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.