Repository navigation
tools: dpp_hw_probe measures the DPP bound_ctrl zero and unwritten VOPC lanes natively (TOOL-DPP-HW-PROBE) - #1773
Open
mcpeacebir-lang wants to merge 1 commit into
Conversation
…PC lanes natively (TOOL-DPP-HW-PROBE) Two groups of cases run through tools/hw_oracle, wave32 and wave64, each lane compared with the candidate models: - neg: src0 neg/abs against the 0 bound_ctrl:1 gives an invalid source lane (modifiers after the zero, or before it as Gen.dpp_insn emits); - vopc: the VCC/EXEC bit of a lane a VOPC compare in DPP form leaves unwritten (written 0, kept, or the compare of a 0 source), VCC preset to 0 and ones. LLVM has no gfx10 encoding for a VOPC compare in DPP form, so the compares are .long words: gfx11 words as llvm-mc encodes them for gfx1101, gfx10 opcodes from its gfx1030 e32 encodings. Exit 77 without the oracle or on another family. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 2026
mcpeacebir-lang
force-pushed
the
tool-dpp-hw-probe
branch
from
November 26, 2026 16:18
ba58fd2 to
bc647ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: TOOL-DPP-HW-PROBE (#1608 (comment))
What and why
Two DPP questions were measured by hand on an RX 7800 XT in #1608 (HW-DPP-NEG-INVALID-LANE, HW-VOPC-DPP-UNWRITTEN-LANES). Both stay open for RDNA2, which is what the translator targets. This turns those two runs into one command, so someone with a gfx103x card can repeat them through
tools/hw_oracle. @quartz-heron-58 asked for a link from the "DPP on a VOPC compare" row.tools/dpp_hw_probe.pyhas two case groups, each run in wave32 and wave64, one thread per lane,s_nop 7after every instruction:neg: does DPP apply src0'sneg/absto the 0 thatbound_ctrl:1gives an invalid source lane?v_add_f32_dpp/v_mul_f32_dppwith-src0,src0,|src0|; the sources are an out-of-row lane, or an EXEC-off lane withfi:0/fi:1. Each lane is compared with two models: modifiers after the zero (-0), or before it (+0, whatGen.dpp_insnemits).vopc: what does a VOPC compare in DPP form (v_cmp_{gt,lt}_f32into VCC,v_cmpx_*into EXEC) do to the bit of a lane DPP leaves unwritten? That is a lane withbound_ctrl:0and an invalid source, or onerow_mask/bank_maskturn off. VCC is preset to 0 and to all ones. Each lane is compared with three models: written 0, kept, or the compare of a 0 source. For every pair of models some run separates them (a unit test checks that).It prints the models every case matches. Exit codes: 1 when a case matches none, 77 without the oracle or on a family other than gfx10/gfx11.
--group,--waves,--jsonand--self-testfollow the other probes (ds_permute_probe.py).Encoding. LLVM has no gfx10 encoding for a VOPC compare in DPP form: AMD clang's llvm-mc says "dpp variant of this instruction is not supported" for gfx1030, as the design row notes. So the compares are emitted as
.longpairs: the VOPC word with src0 = 250 and the DPP16 word.tests/test_dpp_hw_probe.pycompares them whenLEONIDA_AMD_CLANGhas llvm-mc beside it;--self-testpins a few.v_cmp_lt/gt_f320x01/0x04,v_cmpx_lt/gt_f320x11/0x14). The DPP word has the same layout on gfx1030 (checked onv_max_f32_dpp).neggroup is plain assembler text: VOP2 DPP assembles for gfx10.New files only. No
docs/design.mdchange: #1647 is editing the "DPP on a VOPC compare" row, and @quartz-heron-58 said in #1608 that they will reword it after that lands. No translator change.Tested
python -I tests/test_dpp_hw_probe.py: 21 tests OK, 1 skipped (the llvm-mc check). WithLEONIDA_AMD_CLANGset to the clang fromrocm-sdk-core==10.0.0(AMD LLVM 23.0.0git): 21 OK, including the llvm-mc encoding check.python -I tools/dpp_hw_probe.py --self-test: OK.python -I tools/dpp_hw_probe.py --json report.jsononmained94fbef9:scripts/check_no_game_data.pyon both files: clean.compileallandgit diff --check: clean.tests/test_ci_registration.py,tests/test_text_write_line_endings.py: OK.test_runner_calls_all_tests.py,test_tool_stdout_encoding.pyandtest_runtime_paths.pyare red onmainalready (ci: fix the three repository checks that fail on main #1673). None of their failures names these files.Not run: RDNA2 itself (no gfx103x card here), which is what the tool is for. Nothing in the translator suite changes.
GPUs tested: AMD Radeon RX 7800 XT (gfx1101, RDNA3), AMD driver 32.0.32029.2010, Windows 11, through
tools/hw_oracle(amdhip64_7.dll, AMD clang fromrocm-sdk-core==10.0.0).AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code