Olympus: expand RDNA2 ISA compatibility #4

Closed
bmjask wants to merge 1 commit from upstream-pr/5 into main
bmjask commented 2026-11-21 16:39:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-21T16:39:37Z.


Adds test-backed RDNA2 ISA translations, including scalar and vector operations, typed buffers, 64-bit atomics/math, relative moves, double frexp/rounding/division fixup, and half division fixup.

Coverage reaches 1036/1157 instructions (89.5%). Deterministic translation tests and DXC validation are included; supported GPU paths are exercised where hardware permits.

<!-- greyfinch-sync:ivall/xcl:issue:6531540865 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/5). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-21T16:39:37Z. --- Adds test-backed RDNA2 ISA translations, including scalar and vector operations, typed buffers, 64-bit atomics/math, relative moves, double frexp/rounding/division fixup, and half division fixup. Coverage reaches 1036/1157 instructions (89.5%). Deterministic translation tests and DXC validation are included; supported GPU paths are exercised where hardware permits.
upstream-sync closed this pull request 2026-11-24 06:56:41 +00:00
ivall commented 2026-11-24 07:00:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-21T16:56:26Z.


Thanks, lots of useful instructions here! I merged the version I reviewed (06a4a49) into main in 3bd4dfe, with fixes in e819d36 – on a real GPU (RX 9070) a few of the new GPU tests failed:

  • v_ceil_f64: -floor_d(-x) gave -0.0 for 1.5625 → now truncate and +1 below x, no f64 negation
  • v_sqrt_f64 / v_rsq_f64 ran in f32 precision (HLSL's sqrt has no f64 overload and 1.0 is an f32 literal) → sqrt_d refines the f32 root with two f64 Newton steps
  • gpu_v_swaprel_b32: the relative target was outside the program's VGPRs (same rule as gpu_v_movrel) → the test now uses v15 directly

The later pushes still have the old ceil/sqrt, and the new v_div_fixup GPU tests fail here as well (gpu_div_fixup_f16: half_bits(inf) gives 0, and the f64 one fails too). Could you run the gpu_* tests on real hardware and send v_div_fixup as a new PR on top of current main? Closing this one since what I reviewed is in main.

<!-- greyfinch-sync:ivall/xcl:comment:7066078671 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/5#issuecomment-7066078671). Originally posted by [ivall](https://github.com/ivall) on 2026-11-21T16:56:26Z. --- Thanks, lots of useful instructions here! I merged the version I reviewed (06a4a49) into main in 3bd4dfe, with fixes in e819d36 – on a real GPU (RX 9070) a few of the new GPU tests failed: - `v_ceil_f64`: `-floor_d(-x)` gave `-0.0` for 1.5625 → now truncate and +1 below x, no f64 negation - `v_sqrt_f64` / `v_rsq_f64` ran in f32 precision (HLSL's `sqrt` has no f64 overload and `1.0` is an f32 literal) → `sqrt_d` refines the f32 root with two f64 Newton steps - `gpu_v_swaprel_b32`: the relative target was outside the program's VGPRs (same rule as `gpu_v_movrel`) → the test now uses v15 directly The later pushes still have the old ceil/sqrt, and the new `v_div_fixup` GPU tests fail here as well (`gpu_div_fixup_f16`: `half_bits(inf)` gives 0, and the f64 one fails too). Could you run the `gpu_*` tests on real hardware and send `v_div_fixup` as a new PR on top of current main? Closing this one since what I reviewed is in main.
ivall commented 2026-11-24 07:00:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-21T16:59:10Z.


Sorry – I closed this too early while you were still pushing updates, and GitHub won't let me reopen it because the branch was force-pushed since. Please just open a new PR from the same branch; it'll get a normal review and won't be closed on you. The notes above still apply (what's already on main, what I changed).

<!-- greyfinch-sync:ivall/xcl:comment:7066117684 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/5#issuecomment-7066117684). Originally posted by [ivall](https://github.com/ivall) on 2026-11-21T16:59:10Z. --- Sorry – I closed this too early while you were still pushing updates, and GitHub won't let me reopen it because the branch was force-pushed since. Please just open a new PR from the same branch; it'll get a normal review and won't be closed on you. The notes above still apply (what's already on main, what I changed).

Pull request closed

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
xcl-dev/xcl!4
No description provided.