fix(hw-oracle): assemble wave64 bodies in wave64 mode #1962

Merged
CouchRiv merged 1 commit from upstream-pr/1962 into main 2026-10-09 09:43:06 +00:00
CouchRiv commented 2026-10-09 02:55:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CouchRiv on 2026-10-09T02:55:58Z.


What

hw_oracle.py --wave64 can't assemble a body that uses vcc or an SGPR pair as a condition:

v_cmp_lt_f32 vcc, v4, v5
v_cndmask_b32 v10, v6, v7, vcc
k.s:29:3: error: operands are not valid for this GPU or mode
k.s:30:3: error: operands are not valid for this GPU or mode

The template sets the kernel to wave64, but assemble() calls clang without -mwavefrontsize64, so clang assembles the body as wave32, where vcc is 32 bits wide. clang now gets -mwavefrontsize64 on --wave64 runs. Wave32 runs are unchanged.

Tested

Linux (CachyOS), Radeon 610M (gfx1036), ROCm 7.2.4, clang 23.1.1.

  • The body above fails on main with the error above. With this change it runs, and a 70-row version that also uses s[8:9] as the condition gives the expected values on every row, including lanes 32-63 and a second wave.
  • The v_add_f16 example from HW_ORACLE.md still gives 00004000 and 00007e01 in wave32.
  • test_hw_oracle.py has a new test that assembles these conditions in both modes. It fails without the fix and skips when clang isn't installed.
  • check_conventions.py passes.

Python only, so no ctest run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4795362155 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1962). Originally posted by [CouchRiv](https://github.com/CouchRiv) on 2026-10-09T02:55:58Z. --- ### What `hw_oracle.py --wave64` can't assemble a body that uses `vcc` or an SGPR pair as a condition: ``` v_cmp_lt_f32 vcc, v4, v5 v_cndmask_b32 v10, v6, v7, vcc ``` ``` k.s:29:3: error: operands are not valid for this GPU or mode k.s:30:3: error: operands are not valid for this GPU or mode ``` The template sets the kernel to wave64, but `assemble()` calls clang without `-mwavefrontsize64`, so clang assembles the body as wave32, where `vcc` is 32 bits wide. clang now gets `-mwavefrontsize64` on `--wave64` runs. Wave32 runs are unchanged. ### Tested Linux (CachyOS), Radeon 610M (gfx1036), ROCm 7.2.4, clang 23.1.1. - The body above fails on `main` with the error above. With this change it runs, and a 70-row version that also uses `s[8:9]` as the condition gives the expected values on every row, including lanes 32-63 and a second wave. - The `v_add_f16` example from `HW_ORACLE.md` still gives `00004000` and `00007e01` in wave32. - `test_hw_oracle.py` has a new test that assembles these conditions in both modes. It fails without the fix and skips when clang isn't installed. - `check_conventions.py` passes. Python only, so no ctest run. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-09 03:11:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T03:11:04Z.


The reported local assembly regression and conventions check look useful, but this head currently has no upstream check runs (gh pr checks reports none). CONTRIBUTING says a fork PR with an action_required workflow needs maintainer approval before CI has actually run. Could you check whether the Build/Conventions workflows are waiting for approval and request a rerun if so?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073469194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1962#issuecomment-6073469194). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T03:11:04Z. --- The reported local assembly regression and conventions check look useful, but this head currently has no upstream check runs (`gh pr checks` reports none). CONTRIBUTING says a fork PR with an `action_required` workflow needs maintainer approval before CI has actually run. Could you check whether the Build/Conventions workflows are waiting for approval and request a rerun if so?
MarcZX10 commented 2026-10-09 03:14:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T03:14:25Z.


I checked the Actions API for this exact head: Build and Conventions are marked action_required, so upstream CI has not run. Per CONTRIBUTING, a maintainer needs to approve those workflow runs; please request that approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073509572 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1962#issuecomment-6073509572). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T03:14:25Z. --- I checked the Actions API for this exact head: Build and Conventions are marked `action_required`, so upstream CI has not run. Per CONTRIBUTING, a maintainer needs to approve those workflow runs; please request that approval.
CouchRiv commented 2026-10-09 03:14:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CouchRiv on 2026-10-09T03:14:49Z.


Yes, they're waiting for approval. All three runs on dc902b2 finished as action_required with no jobs, so CI hasn't run yet:

This is my first PR here, so a maintainer has to approve the workflows; I can't rerun them from the fork. Locally, test_hw_oracle.py (6 tests), check_conventions.py --base origin/main and git diff --check pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073514716 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1962#issuecomment-6073514716). Originally posted by [CouchRiv](https://github.com/CouchRiv) on 2026-10-09T03:14:49Z. --- Yes, they're waiting for approval. All three runs on dc902b2 finished as `action_required` with no jobs, so CI hasn't run yet: - Build: https://github.com/boykopovar/AnyPS5/actions/runs/37877499357 - Conventions: https://github.com/boykopovar/AnyPS5/actions/runs/37877499479 and https://github.com/boykopovar/AnyPS5/actions/runs/37877499859 This is my first PR here, so a maintainer has to approve the workflows; I can't rerun them from the fork. Locally, `test_hw_oracle.py` (6 tests), `check_conventions.py --base origin/main` and `git diff --check` pass.
CouchRiv commented 2026-10-09 03:21:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CouchRiv on 2026-10-09T03:21:39Z.


@adriadam10 could you approve the workflow runs for this PR and #1964? They're my first PRs here, so GitHub holds them as action_required with no jobs.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6073596680 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1962#issuecomment-6073596680). Originally posted by [CouchRiv](https://github.com/CouchRiv) on 2026-10-09T03:21:39Z. --- @adriadam10 could you approve the workflow runs for this PR and #1964? They're my first PRs here, so GitHub holds them as `action_required` with no jobs.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
boykopovar/AnyPS5!1962
No description provided.