Commit Graph
58 Commits
Author SHA1 Message Date
Ranveer Soni 835689e5df docs(coordination): add infrastructure QA campaign ledger.
Tracks commits, smoke status and limitations for the QA tooling campaign.

Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-24 17:08:18 +05:30
Ranveer Soni 55e1818ccd docs(coordination): record agent-queue disposable smoke evidence.
Documents live Actions results for claim, overlap refusal, release,
progress, denial and a successful audit (#180).

Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-24 17:08:18 +05:30
Ranveer Soni 4038cdbe41 docs(coordination): record infrastructure QA ownership manifest.
Lists hard exclusions, active claims, approved tooling paths and
existing scripts that must be wrapped rather than duplicated (#180).

Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-24 16:57:34 +05:30
elforeign ad424d690a isa, validation: reject undeclared implicit XML operands; runtime vcc_lo for VOP2 (#215)
Review follow-up: the generator now rejects a form whose XML lists an
implicit operand other than SCC (for example the VCC carry of
v_add_co_ci_u32 or the VCC select of v_cndmask_b32), since the
vocabulary can only declare VCC and EXEC unchanged. New known-answer
tests read a lane-derived vcc_lo as VOP2 SRC0 (also on native Metal)
and require the forms to be refused inside a runtime s_cbranch_vccz skip
region. The LLVM comparison normalises inline SRC0 for the registry VOP2
forms as for VOPC; docs and counts follow.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 05:11:31 -06:00
elforeign 5ba0496c63 isa, decoder, shader: twelve VOP2 vector integer forms through the semantic registry (#215)
Adds v_mul_{i32_i24,hi_i32_i24,u32_u24,hi_u32_u24}, v_min/max_{i32,u32},
v_xnor_b32 and v_{add,sub,subrev}_nc_u32 as registry data under a new
vop2_vgpr operand rule (VGPR destination; SRC0 a VGPR, s0-s105, vcc_lo,
an inline integer or a literal; VGPR VSRC1). Vector forms select a
per-lane VectorBinary from their declared operation and signedness, and
the shader lowers each VectorBinary through one typed MSL template; SUBREV
declares source_order = reversed. Variant names are now unique per
generated enum. The decoder shares the VOPC SRC0 decode, and the
translator binds a result to the slot it was pushed at, since operand
constants may now be pushed first. The oracle merged from
task/215-vop2-oracle supplies the reference side; a new LLVM-assembled
fixture computes every lane from its own input.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 05:06:48 -06:00
elforeign 3392c226ce validation: SCC stays unset across SOP2 forms that do not write it; compiler rejections at the SOP2 word (#215)
Review follow-up: four programs run BFM, MUL or MUL_HI and then CSELECT
with SCC never written, and every interpreter and the compiler must
refuse the CSELECT. The native test now also requires the compiler to
reject each program at the same word as the interpreters, so a later
failure cannot stand in (shown by a translator that turns an unset SCC
into false, which only this check catches).

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 04:56:28 -06:00
elforeign 00f79c10d2 isa, decoder, shader: sixteen SOP2 integer forms through the semantic registry (#215)
Adds s_min/max_{i32,u32}, s_cselect_b32, s_bfm_b32, s_mul_i32,
s_mul_hi_{u32,i32}, s_bfe_{u32,i32}, s_absdiff_i32 and
s_lshl1..4_add_u32 as registry data over new shared primitives. The
vocabulary gains a selected_src0 SCC effect (min and max: S0 won the
strict compare), the select's SCC input (carry_in = scc, required for
cselect), a declared shift_amount for the shift-and-add forms, and a
check that BFE's S1 descriptor is unsigned in the XML. The generated
ScalarAluOp::evaluate now returns an optional SCC, so forms whose XML
shows no SCC output leave it unchanged in the translator. The decoder
picks them up through the generated SOP2 table; the oracle merged from
task/215-sop2-arith-oracle supplies the reference side. A new
LLVM-assembled fixture chains all sixteen.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 04:51:33 -06:00
elforeign 2e0e5a36f6 isa, decoder, shader: SOP1 unary integer forms through the semantic registry (#215)
Adds eleven SOP1 forms as registry data: complement, bit reverse, bit
counts, find-first and find-last searches, sign extension and absolute
value. Sign extension declares source_bits, which the generator checks
against the XML's 8- and 16-bit source operands; forms whose XML shows
no SCC output must declare SCC unchanged. The decoder dispatches them
through the generated SOP1 table after s_mov_b32, and the translator
folds them with ScalarUnaryOp::evaluate. The separately written oracle
from task/215-sop1-oracle supplies the reference side.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 04:27:14 -06:00
elforeign b5d0382e89 semantics, docs: review follow-ups for the SOPC compares (#215)
Malformed relations and operand rules are diagnostics instead of
Python exceptions; the fixture now really carries a SOPC literal (LLVM
had encoded 0xffffffff as inline -1); the reference-interpreter table
and registry field table describe the current forms; the docs and
changelog state separately that the 348 rejections run on the CPU
interpreters and the compiler, not on Metal.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 04:20:16 -06:00
elforeign cd59e081d9 isa, decoder: SOPC integer compares through the semantic registry (#215 stage D)
Adds a compare operation with a declared relation and the sopc_scalar
operand rule, so all twelve s_cmp_*_{i32,u32} forms are registry data.
The decoder dispatches them through the generated OP table and the
translator resolves SCC with ScalarCompareOp::test; the hand-written
s_cmp_eq_u32 path and its opcode constant are gone. A new LLVM-assembled
fixture records every compare's SCC, and the separately written oracle
from task/215-stage-d-oracle supplies the reference side.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 04:16:09 -06:00
elforeign d8f9669280 semantics: require exact XML number formats and a sane count width (#215)
Review follow-up: a shift count must be FMT_NUM_U32 and other sources
must have the format their signedness implies, so a float format no
longer passes; a negative shift_count_bits is a diagnostic instead of a
crash. The stage C rows cite the guide pages where the forms are listed,
and the scalar ALU page names which suite covers which forms.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 04:08:15 -06:00
elforeign ff191d89bd isa: declare eight more SOP2 logical and shift forms in the registry (#215 stage C, WIP)
Adds andn2, orn2, nand, nor, xnor, lshl, lshr and ashr as registry
primitives with a declared shift-count width that the generator applies
as a mask and checks against the XML's unsigned count operand. The forms
reach the decoder and translator through the generated dispatch with no
per-form Rust. The independent oracle side lands separately.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 03:55:00 -06:00
elforeign 0609012903 docs: bring the registry guide in line with the post-review rules (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 03:41:10 -06:00
elforeign b541dce0cc Merge branch 'feat/semantic-registry-s4' into feat/semantic-registry 2026-11-24 03:40:09 -06:00
elforeign 52ecece126 docs, tests: semantic registry contributor guide and generator unit tests (#215)
Contributors had no written path for adding a form through the registry,
and the generator's rejection rules had no direct tests: a disabled check
would only show up if the real registry happened to break it.

The new unit tests feed small in-memory registries and a hand-written
snapshot that each break one rule, check that the real registry passes,
that render is deterministic and independent of key order, and that the
CLI's validate, generate and --check modes exit as documented. Each of
44 deliberate generator mutations makes at least one test fail.

The guide covers the files, every field and its allowed values, what the
validator checks, what the generator does not do, the commands, and a
worked example on s_addc_u32.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 03:39:17 -06:00
elforeign 1eeb614ea2 Merge remote-tracking branch 'origin/main' into feat/semantic-registry 2026-11-24 03:36:34 -06:00
elforeign afd936b20b semantics: close validation gaps found in review; check generated files in CI (#215)
The generator now rejects float widths, reserved variant names,
out-of-range pages and opcodes, Wave32 restrictions the decoder cannot
enforce yet, operand rules whose unsupported list differs from what the
decoder rejects, and undeclared or empty guide documents. The coverage
report reads decoder support from the compiled FORM_IDS table instead of
the registry, needs a decoding row before counting reference or Metal
evidence, and fails on unimplemented lowering. CI runs both --check
modes and the coverage unit tests so a stale generated file fails.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 03:36:18 -06:00
Ranveer Soni ee6c9ac067 fix(docs): synchronize generated status tables
Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-24 15:03:22 +05:30
elforeign 1680e6b19c docs: describe the semantic registry and link the coverage report (#215)
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 03:32:41 -06:00
elforeign 3eef0ecfa8 Merge remote-tracking branch 'origin/main' into feat/semantic-registry 2026-11-24 03:32:10 -06:00
elforeign e616583c3f audit: add the semantic coverage report (#215 stage F slice)
Counts identified, encoding-validated, declared, decoder, IR/MSL,
reference and Metal evidence per encoding family, reading evidence only
from docs/status.toml so registry requirements never count as results.
Unrecognized inputs fail instead of being skipped. --check never writes.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 03:31:57 -06:00
Ranveer Soni 08c4451e68 docs: add draw, blend and depth contract sections to the interface contracts 2026-11-24 15:01:17 +05:30
Ranveer Soni 2ab189ddbe docs: refresh the engineering progress page for the current state 2026-11-24 15:01:17 +05:30
Ranveer Soni fa94b56ba3 docs: refresh the documentation index for the current state 2026-11-24 15:01:17 +05:30
elforeign 0749330868 shader: Wave32 VOPC integer compares with VCC/EXEC rules
Adds v_cmp_{lt,eq,le,gt,ne,ge}_{i32,u32}_e32 across the chain: opcodes
generated from the pinned AMD XML, one typed VectorCompare instruction
(relation + signedness, table-driven decode), the reference interpreter,
the independent semantic-review interpreter, typed IR and MSL.

Rules (RDNA 2 ISA guide 3.9, 2.1, 3.3; contract in
docs/shaders/vector-compare.md): VCC_LO[n] = EXEC_LO[n] & test(lane n),
always fully written, so empty EXEC gives 0 and reads no source; VCC_HI
becomes unknown; EXEC, SCC and VGPRs are unchanged. A lane-derived
VCC_LO may feed only s_cbranch_vccz, v_mov_b32 vN, vcc_lo and another
compare's SRC0, so EXEC never becomes data-dependent. A runtime
s_cbranch_vccz is wave-uniform: the skipped code may hold only integer
vector ALU instructions with initialized destinations, checked whether
or not it is taken, and lowers to selects at the join.

The Metal kernel makes no SIMD-group, threadgroup or barrier assumption:
each thread rebuilds its RDNA wave's mask by recomputing the 32 lanes'
operands from their input words, bounded by threads_per_grid. The
reference now runs lockstep Wave32 waves; absent lanes of a final
partial wave contribute 0.

Verified with an original LLVM-assembled fixture and 251 programs
(every form on 10 boundary values in both operand orders, partial and
empty EXEC, both runtime branch edges in one dispatch, mask chains,
32 pinned rejections) against exact integer definitions. Translator,
reference and second interpreter agree on CPU; all 252 programs match
on native Metal with validation; LLVM agrees on every encoding.
Breaking any implementation (signedness, EXEC masking, empty EXEC,
absent-lane bound, join polarity or uniformity) fails the tests.

Fixes #186

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 02:22:19 -06:00
elforeign 425327a0f2 shader: add s_add_i32 and s_sub_i32 with signed-overflow SCC
#185 left both forms unsupported because the pinned XML says only
"carry-out" for them. The AMD RDNA 2 ISA reference guide (GPUOpen,
section 12.1 SOP2 Instructions, p. 101-102, and section 5.3 Scalar
Condition Code, p. 33) defines SCC for both as signed overflow:
add overflows when the operands share a sign that the result lacks;
subtract when the operands' signs differ and the result's sign differs
from S0's. The guide also confirms the unsigned rules used in #185.

Adds both forms to the generated opcodes, the decoder, the reference
(exact signed result must fit in i32), the independent interpreter (the
guide's sign-bit rule over its ripple adder) and the translator, plus
400 boundary programs, eight hand-worked overflow and no-overflow cases
(-1 + 1 and 0 - 1 carry or borrow but do not overflow) and two signed
overflows in the scalar ALU fixture. Inverting the overflow rule in any
one implementation fails three tests. s_min_i32 and the other SOP2
forms stay unsupported.

Refs #185

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 01:48:52 -06:00
elforeign 96e2baeb75 Merge remote-tracking branch 'origin/main' into feat/sop2-scalar-alu
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
2026-11-24 01:40:26 -06:00
elforeign 994efd38f9 shader: decode and execute SOP2 scalar add, subtract and bitwise forms
Adds s_add_u32, s_sub_u32, s_addc_u32, s_subb_u32, s_and_b32, s_or_b32
and s_xor_b32 across the chain: generated opcodes from the pinned AMD
XML, a typed ScalarAlu instruction, decoding, the reference interpreter,
the independent semantic-review interpreter and the translator, which
resolves scalar state and SCC as it already does for s_mov/s_cmp.
v_mov_b32_e32 may now read a normal SGPR, so results reach vector code
as constants.

SCC: the XML states carry-out for additions, carry-in for ADDC/SUBB and
nonzero results for bitwise forms. For subtraction it says carry-out
without fixing the polarity; LLVM's lowering of usubo and of 64-bit
subtraction to s_sub_u32/s_subb_u32 requires SCC to be the borrow.
s_add_i32/s_sub_i32 stay unsupported: no pinned source settles whether
their SCC is the carry or signed overflow.

Verified with an original LLVM-assembled fixture and 1,400 boundary
programs (every form, 10x10 operands, SCC clear and set) against exact
integer definitions; translator, reference (exact integers) and
independent interpreter (bit-serial ripple adder) all agree, and all
1,401 programs match on native Metal with validation. LLVM agrees on
every encoding. Breaking any one implementation fails the tests.

Fixes #185
Independent review fixes: both interpreters now require a known SGPR
for v_mov_b32 from an SGPR even in an inactive lane, as translation
does; alias, literal and inline cases also assert the translated result
and run on Metal; rejections are pinned to the SOP2 word's offset; GPU
status is recorded as local evidence with acceptance pending.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 01:38:54 -06:00
elforeign 1784836639 audit: compare Cargo test inventories between two commits
Testing the old #166 and #165 heads silently ran without 12 BC texture
tests that main already had, because those heads predated the merge
that added them; nothing flagged the smaller inventory.

scripts/audit/test_inventory.py lists every test (and the ignored set)
of a base and a candidate commit, each in a temporary detached worktree
it always removes, and reports removed, added, newly ignored and newly
un-ignored tests keyed by package, target and name. Unexplained losses
exit 1; an --allow file with a reason per key explains intended ones.

951189c -> 5450612: removed 12 (all xenora-texture bc_formats), exit 1.
0cac6c4 -> 0cac6c4: 219 tests each side, no change, exit 0.

Fixes #208

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 01:37:54 -06:00
Ranveer Soni 184149561a Merge pull request #222 from elforeign/docs/plain-reply-claims
docs: claim by plain reply, one-week stale rule
2026-11-24 13:06:34 +05:30
Ranveer Soni 01deb3f8a8 Merge branch 'main' into feat/gpu-compatibility-expansion 2026-11-24 12:55:06 +05:30
elforeign 8fdb569052 docs: claim by plain reply, one-week stale rule
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 01:23:57 -06:00
elforeign 6b479a6617 agent queue: fix review findings in replies, verification and issue forms
From independent review of the queue follow-up:
- Bot replies echoed user text (/blocked reasons, /reassign logins,
  file patterns) verbatim. Markers count when the bot posts them, so a
  reason containing an approval or done marker became a bot marker and
  could approve an acceptance command or hide another user's claim.
  Echoed text now has angle brackets and backticks escaped.
- /verified accepted a 7-character prefix and ignored extra arguments;
  a commit with the same short prefix is cheap to make. Require exactly
  one full 40-character SHA, with one parser shared by decide and the
  check.
- After a verification, the job looked up the check run by the pull
  request head SHA, but pull_request_target runs carry the base branch
  SHA, so it found nothing and || true hid it. The verify job now
  evaluates the same advisory check itself and no longer needs
  actions: write.
- The issue form renders Files inside a ```text fence and the parser
  took "text" as a path, so any two form-created tasks overlapped.
  Fence lines are skipped.
- A command still unanswered after lease_hours now gets a "Not decided"
  reply (window 2 x lease_hours) instead of being dropped silently.

Each fix has a test shown to fail with the fix reverted.

Refs #210, #211

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 01:05:28 -06:00
elforeign e70780f30a Merge remote-tracking branch 'origin/main' into feat/agent-task-queue
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
2026-11-24 01:00:40 -06:00
elforeign ef481368d6 Merge remote-tracking branch 'origin/main' into feat/gpu-compatibility-expansion
Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
2026-11-24 01:00:40 -06:00
Ranveer Soni 97598903e2 Merge branch 'main' into feat/gpu-compatibility-expansion 2026-11-24 12:26:13 +05:30
elforeign 9fda5aab18 agent queue: re-run the check only after an accepted verification
The verify job re-ran the pull request check after any /verified
comment, including refused ones: the author's own, a non-verifier's, a
stale or unknown head or a malformed SHA. decide now marks only an
accepted verification of the current head, and the job re-runs the check
only when should-rerun confirms it. A test checks that what re-runs the
check is exactly what the check counts.

Replay decides a comment listed twice only once. Tests cover duplicate
and out-of-order listings, and every arrival order of a five-claim burst
grants exactly one of two overlapping claims.

Fixes #210, fixes #211

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 00:56:00 -06:00
elforeign e37c8566c6 agent queue: start runs only for commands and replay cancelled claims
Every pull request comment started the verify job, which gathered state
and re-ran the pull request check, so ordinary review discussion re-ran
verification. Gate the verify job on comments that start with /verified
and the claim job on comments that start with /.

Claim runs share one concurrency group with cancel-in-progress: false.
GitHub keeps one waiting run per group and cancels it when a newer run
queues, so with the run deciding only its own comment, a /claim posted
while another claim was being decided could be dropped without a reply.
Each run now replays every command of the last lease_hours that has no
bot reply, oldest first, updating labels in memory between commands; the
hourly audit does the same, so a cancelled run's command is answered by
the run that replaced it at the latest within the hour. Replies carry a
done marker that counts only from the Actions bot.

The pull request check is advisory until a live smoke test and the
migration of existing issues: problems are a warning and the job passes.

Tests model the concurrency group (the old event-only design loses the
cancelled claim; replay answers all four commands), in-order overlap
decisions, bot-only markers and the workflow triggers.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 00:46:21 -06:00
elforeign 1493dcf83b isa: check identification against LLVM and add literal-only forms
The extension-word length rules were written by hand because the XML
gives none, so they needed an outside oracle. An LLVM test now compares
names and lengths for one instruction per family and extension word.
It found five instructions the XML lists only under a literal encoding,
which the first table omitted; they are now base forms that always carry
a literal.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 00:20:26 -06:00
elforeign 62c933051b isa: generate complete gfx1030 instruction metadata and identification
The decoder knew 25 hand-matched forms, so any other instruction stopped
decoding with no record of what it was or how long it was. A two-stage
generator now reduces AMD's public RDNA 2 XML to all 1,460 base forms,
with a committed snapshot so CI can check the generated table offline.
identify() finds any form's exact length, including literal, SDWA, DPP
and NSA words, and the shaders CLI reports discovered against executable
forms so metadata coverage is never read as GPU support.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 00:11:00 -06:00
elforeign e35df04069 Expand the agent task queue to cpu/gpu/runtime/shared/qa with deterministic checks
The queue now has three engineering tracks plus shared and qa work. Queue
rules move from shell/awk in workflows into a standard-library Python package
so they are testable offline: claim decisions (dependencies, cycles, file
overlap, area permission), leases renewed only by the holder, reassign and
release, acceptance-command approval by hash, pull request ownership/overlap/
stale/verification checks and a machine-readable summary. Workflows apply the
decisions with minimal permissions, never put user text in run blocks and
never check out pull request code. The sync script fetches the real upstream
so interface changes during work are reported.

Not yet run on GitHub.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-24 00:09:38 -06:00
elforeign a89f9d8d06 coordination: add GitHub issue task queue for parallel agents
CPU and GPU work proceed in parallel, largely through coding agents.
Tasks posted as issues with owned file lists and an acceptance command
can be claimed through a serialised workflow, so work is picked up
without relaying prompts by hand and two claims never edit one file.

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
2026-11-23 23:58:25 -06:00
Ranveer Soni 0be6220e47 feat(add): x17things, as well as more d3d12 testing 2026-11-24 09:49:53 +05:30
Ranveer Soni d12d04bb8f fix: restore status audit and generated progress assets 2026-11-23 17:22:53 +05:30
Ranveer Soni 0597ad06d1 feat: expand native guest execution and RDNA2 Metal graphics 2026-11-23 17:11:02 +05:30
Ranveer Soni 3133d8eddc docs: overhaul project documentation and maintenance checks
Signed-off-by: Ranveer Soni <git@ranveersoni.me>
2026-11-23 11:08:43 +05:30
Ranveer Soni 6ccb23da1d feat: implement native guest execution and Metal rendering pipeline 2026-11-23 10:43:49 +05:30
Ranveer Soni 4b9a4cecf3 docs: record Phase 01 continuation and validation results 2026-11-22 18:55:18 +05:30
Ranveer Soni 5c479005b0 test: harden independent Phase 01 oracle and record assurance 2026-11-22 18:48:08 +05:30
Ranveer Soni aff46b0904 test: add native semantic mutation campaign 2026-11-22 18:31:17 +05:30