Commit Graph

17 Commits

Author SHA1 Message Date
6a0a43449e tools/int_hw_probe.py: validate realpath JSON targets, --hw-arch, and blank --group 2026-11-26 20:53:00 +08:00
71c86830f5 tools/int_hw_probe: write --json atomically and reject trailing-separator paths 2026-11-25 21:08:25 +08:00
00583e05a3 Merge pull request #4228 from Vonsek
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design.md
2026-11-22 23:12:33 -05:00
4dafc809e3 int_hw_probe: valu_cvt_norm_f16, the f16 normalised conversions on RDNA2
67 programs for v_cvt_pknorm_i16/u16_f16 and v_cvt_norm_i16/u16_f16 (near-ties,
saturation, NaN, op_sel on the pk forms, neg/abs) run natively on gfx1036 and
compared with the translator: all bit-identical, wave32 and wave64. The two
design.md rows no longer say not GPU-verified.

AI-assisted.
2026-11-23 01:10:15 +01:00
d700b71c76 rdna2spirv: verify 16-bit add/sub clamp and op_sel, support VOP3 literals
- Clarify RDNA2 ISA status: GFX10.3 dropped reversed 16-bit integer subtraction (v_subrev_nc_u16 / v_subrev_nc_i16 do not exist on hardware; v_subrev_f16 is the only 16-bit reverse subtract opcode).
- In tools/rdna2spirv.py, correctly identify VOP3 encoding for 16-bit integer ops when 32-bit literal operands extend the instruction to 12 bytes, preserving the untouched destination half.
- Guard against non-VGPR destination when op_sel writes to destination high half.
- In tools/int_hw_probe.py, add v_add_sub_nc_i16_clamp covering signed saturation to [-32768, 32767], op_sel source selection, and untouched half preservation.
- In tests/semantic/test_alu_subrev_f16.py, add test_vop3_omod_and_clamp.
- In tests/semantic/test_valu_add_sub_nc_i16.py, add coverage for SGPR sources, literal constants, high-half preservation, and non-VGPR op_sel destination rejection.
- Update docs/design.md row 261 with RDNA2 ISA details and probe status.
2026-11-23 02:08:21 +03:00
a3892a127d Merge pull request #3117 from d7ommy
# Conflicts:
#	docs/design.md
2026-11-22 15:14:56 -05:00
2e90af2144 Merge pull request #2396 from CLHelper
# Conflicts:
#	docs/design.md
2026-11-22 15:10:40 -05:00
1d4c0d843c rdna2spirv: harden v_min3/v_max3/v_med3_{f16,i16,u16} clamp and expand test matrix 2026-11-22 22:42:53 +03:00
8e8046f0f0 Merge pull request #2629 from klarnet2009 2026-11-22 13:16:39 -05:00
ab5556f8c9 int_hw_probe: measure v_bfe_u32/v_bfe_i32 past bit 31 on RDNA2 (gfx1036)
The translator cuts a bitfield extract at bit 31 (bfe_width) and reads offset
and width from bits [4:0], but for the VALU form this rested on gfx1150 s_bfe
runs and LLVM's v_bfe fold; RDNA2 was unmeasured.

A new valu_bfe_past31 group in tools/int_hw_probe.py runs four 4-word cases
natively (VGPR, inline-constant and literal operands): offset + width > 32,
the sign of a field cut at bit 31, offset/width bits above [4:0], width 0.
On an AMD Radeon 610M (gfx1036) wave32 and wave64 give the same words and
all four cases match the translator, so no translator change is needed.

The measured words are pinned on the CPU in tests/test_int_hw_probe.py, the
contract table gets a v_bfe row, and the bfe_width docstring no longer says
RDNA2 is unmeasured.
2026-11-22 18:11:43 +00:00
0112358228 fix(tools): preflight --json path and guard OSError in int_hw_probe 2026-11-22 19:39:25 +02:00
14a31e45a2 Merge pull request #2087 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 11:41:41 -05:00
fe7edb58bd Address review on #2087: commit the s_cmov_b64 probe cases
Add the salu_cmov_b64 group (14 cases) to tools/int_hw_probe.py so the
gfx1036 measurement in docs/design.md is reproducible, name the command in
the row, drop the pointer to the duplicate row, and point the salu_diff.py
comment at the design.md counts instead of a second number.

AI-assisted.
2026-11-22 17:36:15 +01:00
ba24377527 int_hw_probe: verify packed u16/i16, min3/max3/med3_16, v_swaprel_b32 and v_pack_b32_f16 abs on RDNA2 2026-11-22 16:26:59 +01:00
4eb6155d3a int_hw_probe: the five gfx1035 divergences are fixed; docs index and four tools follow the repo rules
- int_hw_probe: VOP3 clamp on the carry-out add/sub ops (#1831) and v_cvt_rpi/flr's exact floor(x+0.5) and NaN
  sign saturation (#1856) now translate as gfx1035 measured, so KNOWN_DIVERGENCES is empty. The known-divergence
  test reports a synthetic entry. shader_validation.md says so, and design.md loses the stale duplicate
  v_cvt_flr/rpi row a "both" merge left that still called them open.
- docs/README.md: one Other languages line (fr, pt-BR, zh-CN, pl-PL, tr, ru, ja); docs/i18n/README.md: one row
  each for pt-BR and zh-CN (the newer).
- anim_rigs, d16_format_probe, pe_shader_containers: text writes name newline="\n" (#1615);
  pe_shader_containers guards stdout (#1428).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:22:53 -05:00
6a6704df15 anim_rigs, int_hw_probe: guard stdout like the other tools (#1428)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:46:20 -05:00
15359fba38 SHADER-137: RDNA2 hardware integer probe and gfx1035 measurements (wave32 & wave64) 2026-11-22 14:47:29 +01:00