upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/shader_validation.md
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:42:44 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:42:44 -0500
commit3bf4e6e574a1732a32d13dbba9ecc61a8b07c249 (patch)
tree28a04702aef6065990eeed3314aa500ac71a333f /docs/shader_validation.md
parent617fb06127d43c1635d65664702a7f1653df88cf (diff)
parent06f36cec6b753a461592bc75554b1ff7b6c01fc2 (diff)
Merge pull request #2200 from d7ommy
# Conflicts: # docs/design.md
Diffstat (limited to 'docs/shader_validation.md')
-rw-r--r--docs/shader_validation.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/shader_validation.md b/docs/shader_validation.md
index cfd50ce56..bd9aa23b5 100644
--- a/docs/shader_validation.md
+++ b/docs/shader_validation.md
@@ -1293,6 +1293,36 @@ are not NaN, and for the f16 denormals. It differs in five ways, none fixed here
1293 the canonical quiet NaN (`0x7fc00000`, `0x7e00`). For example, `v_fmac_f16` keeps `0x7c01`. This is the "not 1293 the canonical quiet NaN (`0x7fc00000`, `0x7e00`). For example, `v_fmac_f16` keeps `0x7c01`. This is the "not
1294 modelled yet" note of the f16 transcendentals row in `docs/design.md`, here for these ops too. 1294 modelled yet" note of the f16 transcendentals row in `docs/design.md`, here for these ops too.
1295 1295
1296### Integer operations and scalar ALU verification (`tools/salu_diff.py`, gfx1036 follow-up to #1746)
1297
1298As a follow-up to #1746 (SHADER-137), `tools/salu_diff.py` and `tests/test_salu_diff.py` were expanded to include 12 integer SALU operations (`s_absdiff_i32`, `s_mul_hi_i32`, `s_lshl1..4_add_u32`, `s_sext_i32_i8`, `s_sext_i32_i16`, `s_flbit_i32`, and `s_pack_ll/lh/hh_b32_b16`) and tested on native desktop RDNA2 silicon (`gfx1036`), complementing #1746's laptop `gfx1035` probe.
1299
1300Hardware validation was executed via `tools/hw_oracle` and `tools/salu_diff.py` on native AMD RDNA2 silicon:
1301
1302- **GPU**: AMD Radeon(TM) Graphics (`gfx1036`), AMD Windows driver `32.0.21045.29003`, Windows 11, `amdhip64_6.dll`, AMD clang 23.0.0git (`rocm-sdk-core 10.0.0`).
1303- **Second-silicon verification of #1746 (`tools/int_hw_probe.py`)**:
1304 - `python -I tools/int_hw_probe.py --oracle both --wave both`: **87 cases: 87 match, 0 known divergence, 0 unexpected mismatch, 0 wave32/64 diff** on native `gfx1036` (corroborating that the 5 divergences originally reported by #1746 are now fully resolved on `main`).
1305- **SALU operations (`s_absdiff_i32`, `s_mul_hi_i32`, `s_lshl1..4_add_u32`)**:
1306 - `python -I tools/salu_diff.py --ops s_absdiff_i32,s_mul_hi_i32,s_lshl1_add_u32,s_lshl2_add_u32,s_lshl3_add_u32,s_lshl4_add_u32 --programs 500 --oracle translator,hw`: **500 passed, 0 mismatches**.
1307 - Confirmed SCC preserved across operations with prior SCC=0 and SCC=1.
1308- **Sign-extension and pack (`s_sext_i32_i8`, `s_sext_i32_i16`, `s_flbit_i32`, `s_pack_ll/lh/hh_b32_b16`)**:
1309 - `python -I tools/salu_diff.py --ops s_sext_i32_i8,s_sext_i32_i16,s_flbit_i32,s_pack_ll_b32_b16,s_pack_lh_b32_b16,s_pack_hh_b32_b16 --programs 500 --oracle translator,hw`: **500 passed, 0 mismatches**.
1310 - `s_cmov_b32` verified on hardware under SCC=0 (destination preserved) and SCC=1 (destination loaded).
1311- **VALU product-sum (`v_mad_u64_u32`, `v_mad_i64_i32`)**:
1312 - 292 programs in wave32 across special and random 32/64-bit inputs: **292 passed, 0 mismatches**.
1313 - 192 programs in wave64 across special inputs: **192 passed, 0 mismatches**.
1314 - Carry-out and sign bits in sdst matched the 65-bit ISA reference bit-for-bit.
1315- **Integer saturation (`clamp`)**:
1316 - 567 programs tested across `v_add_nc_u32_e64`, `v_sub_nc_u32_e64`, `v_subrev_nc_u32_e64`, `v_add_nc_i32_e64`, `v_sub_nc_i32_e64`, `v_add_nc_u16_e64`, and `v_sub_nc_u16_e64`: **567 passed, 0 mismatches**.
1317 - 16-bit clamp confirmed preserving the high 16 bits of the destination VGPR.
1318- **EXEC lane masking**:
1319 - Multi-threaded kernel under alternating lane masks (`0xAAAAAAAA`, `0x55555555`) confirmed that inactive lanes write 0 in sdst mask words for `v_add_co_u32` and `v_mad_u64_u32`.
1320- **SAD family and lerp (`v_sad_u8`, `v_sad_hi_u8`, `v_sad_u16`, `v_sad_u32`, `v_msad_u8`, `v_mqsad_u32_u8`, `v_qsad_pk_u16_u8`, `v_mqsad_pk_u16_u8`, `v_lerp_u8`)**:
1321 - Verified across edge byte patterns, 64-bit sliding windows, and zero masks: **0 mismatches** against ISA reference.
1322- **24-bit products and 64-bit shifts (`v_mul_hi_*24`, `v_lshrrev_b64`, `v_ashrrev_i64`)**:
1323 - Verified across signed/unsigned products, edge signs, and 0..63 shift counts: **0 mismatches**.
1324
1325
1296## Coverage plan and cost 1326## Coverage plan and cost
1297 1327
1298Start with straight-line scalar/vector ALU because it is deterministic, needs no descriptors and 1328Start with straight-line scalar/vector ALU because it is deterministic, needs no descriptors and