[PR #1540] [CLOSED] dq_q2_0: keep the Q2_0 signed-zero fix on every HIP arch (#1474) #3519

Closed
opened 2026-11-07 14:42:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1540
Author: @nekomario28
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: fix-1474-q2-zero-hip-guard


📝 Commits (1)

  • 3e67e7e dq_q2_0: keep the Q2_0 signed-zero fix on every HIP arch/version (#1474)

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 src/kernels/cuda/iq_kernels.cu (+4 -3)

📄 Description

Summary

  • hip_q2_zero fails on gfx1201 (R9700) with ROCm 7.10: the half path folds a negative scale times +0 to +0, but the dq_q2_0 workaround was gated to (__gfx1012__ && HIP_VERSION_MAJOR < 7) || __gfx1151__ — the arch list only covers the reports seen so far, and gfx1201 on HIP 7 falls outside it.
  • Drop the arch/version conditions, keep __HIPCC__. The workaround writes the scale's sign bit for code 1, which is value-identical on targets whose compiler never folds — this matches the reporter's proposed fix.

Fixes #1474.

Test plan

  • amdclang++ -x hip -fsyntax-only --offload-arch=gfx1201 on src/kernels/cuda/iq_kernels.cu with the build's compat flags: clean
  • ctest -R hip_q2_zero on the reporter's R9700 / ROCm 7.10 build: expect PASS (128 signed-zero failures → 0)
  • CUDA builds unaffected (#if defined(__HIPCC__) only)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1540 **Author:** [@nekomario28](https://github.com/nekomario28) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-1474-q2-zero-hip-guard` --- ### 📝 Commits (1) - [`3e67e7e`](https://github.com/Niko1221/Strata/commit/3e67e7e45d0c8e4d49c2da0397c1fe0cea4c4ac7) dq_q2_0: keep the Q2_0 signed-zero fix on every HIP arch/version (#1474) ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/kernels/cuda/iq_kernels.cu` (+4 -3) </details> ### 📄 Description ## Summary - `hip_q2_zero` fails on gfx1201 (R9700) with ROCm 7.10: the half path folds a negative scale times +0 to +0, but the `dq_q2_0` workaround was gated to `(__gfx1012__ && HIP_VERSION_MAJOR < 7) || __gfx1151__` — the arch list only covers the reports seen so far, and gfx1201 on HIP 7 falls outside it. - Drop the arch/version conditions, keep `__HIPCC__`. The workaround writes the scale's sign bit for code 1, which is value-identical on targets whose compiler never folds — this matches the reporter's proposed fix. Fixes #1474. ## Test plan - [x] `amdclang++ -x hip -fsyntax-only --offload-arch=gfx1201` on `src/kernels/cuda/iq_kernels.cu` with the build's compat flags: clean - [ ] `ctest -R hip_q2_zero` on the reporter's R9700 / ROCm 7.10 build: expect PASS (128 signed-zero failures → 0) - [ ] CUDA builds unaffected (`#if defined(__HIPCC__)` only) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:42:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3519
No description provided.