Skip to content

Converge PTOAS on PTO ISA 0.57.1 - #3

Merged
zhoubot merged 4 commits into
mainfrom
codex/pto-isa-0.57.1
Aug 2, 2026
Merged

zhoubot merged 4 commits into
mainfrom
codex/pto-isa-0.57.1

Conversation

@zhoubot

@zhoubot zhoubot commented Jul 30, 2026 •

Copy link
Copy Markdown

Summary

  • enforce the exact PTO ISA 0.57.1 contract: 120 public operations (98 TEPL, 9 TMA, 13 CUBE), exact roles/arity, and no retired D-class surface
  • lock the normative PTO-ISA/pto-spec release identity, encoding projection, hardware profile, and numeric-vector hashes
  • model ACCCVT with implicit ACC and keep the public bytecode catalog synchronized
  • fix alloc_tile optional-operand encoding, structured-control-flow variable results/operands, A5 MX low-precision verification, and canonical stage9 byte re-encoding

Depends on PTO-ISA/pto-spec#19

Validation

  • 16/16 CTest, including stage9 and recent-operation round trips
  • 9/9 frozen targeted lit tests
  • 3/3 additional MX/TSORT lit tests
  • exact 120-operation manifest role/arity check plus 20 dialect-only operations
  • PTO dialect/opcode coverage (140 ODS operations / 175 v0 bytecode entries)
  • byte-for-byte PTOBC re-encode checks
  • git diff --check

The LLVM 21 full-lit baseline is 75/218 passing, one more than before this closure pass. The remaining 143 failures are classified existing gaps: 55 unsupported EmitC lvalues, 53 unlowered/deleted PTO operations, 27 output/FileCheck drift cases, 6 LLVM casting assertions, and 2 subview result-type expectation mismatches.

Final LinxISA superproject repinning and end-to-end bring-up are tracked in LinxISA/linx-isa#161.

Final merged-source refresh (2026-08-02)

  • Normative source is the merged Publish the normative PTO ISA 0.57.1 contract PTO-ISA/pto-spec#19 squash commit 2f3f605e289b09d56ef5a9ba39fc80b52948a5f5.
  • Final release identity: content 748c1c6ac1bd5482d219cd08b8f0a871c7eda2b8f8afb1e81d498ec742e8abe8; encoding projection 9705a984e2e48e0d4e856d3fbcfa07041c8578dd326d81f1c90279e826354c32.
  • The final merge keeps the 120-operation names/selectors, command masks/matches, hardware profile, and numeric vectors unchanged; it refreshes source identity plus Bundle/restart/system-register semantic metadata. Embedded locks/ELF identity constants were refreshed where applicable, and focused gates were rerun before promotion.

The dialect and bytecode layer still admitted retired operations and underspecified direct-operation roles, allowing non-normative IR to survive into downstream lowering. Replace those surfaces with the exact 120-operation contract, make ACCCVT use an implicit accumulator, enforce TPREFETCH bounds, and reserve deleted bytecode identities.\n\nConstraint: PTO-ISA/pto-spec is the sole normative source and all deleted D-class operations must disappear.\nRejected: Keep dialect aliases or remap old bytecodes | both would preserve an unintended compatibility ABI.\nConfidence: high\nScope-risk: broad\nDirective: Keep the 120-entry role/arity snapshot exact and regenerate only from the locked PTO 0.57.1 manifest.\nTested: LLVM 23 build; targeted lit 9/9; targeted CTest 3/3; exact 120/120 manifest roles and arity; PTOBC coverage and roundtrip; injected contract-drift failures; git diff check\nNot-tested: complete repository test suite
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

RuoyuZhou added 2 commits July 31, 2026 02:40
PTOAS previously pinned only the encoding-era release fields. Validate the complete canonical catalog, content, hardware-profile, and numeric-vector identity while keeping numeric execution outside the assembler's conformance claim.

Constraint: PTO-ISA/pto-spec commit 0141ec89 is the sole 0.57.1 source
Rejected: Infer numeric execution support from assembler identity | PTOAS does not execute Tile arithmetic
Confidence: high
Scope-risk: narrow
Directive: Keep the PTOAS lock byte-identical to the LinxISA 0.57.1 lock
Tested: source-tree and 120-contract checks; exact 98/9/13 inventory; opcode coverage; clean pto-opt+ptobc build; 14 relevant CTests; Python compile; git diff check
Not-tested: full pre-existing CTest/lit baselines with known unrelated failures
Close the remaining PTOBC operand-mask and structured-control-flow schema gaps, keep MX verification consistent with A5 low-precision inputs, and make stage9 compare canonical generic MLIR so default attributes survive byte re-encoding.

Constraint: PTOAS consumes the frozen 0.57.1 public operation contract while LLVM 21 still has unrelated EmitC and lowering baseline failures.

Rejected: Relax byte-for-byte stage9 comparison | it would hide schema drift in optional operands and structured-control-flow results.

Confidence: high

Scope-risk: moderate

Directive: Keep alloc_tile optional-mask bits in ODS operand order and validate new variable-result ops with byte-for-byte round trips.

Tested: 16/16 CTest; 9/9 frozen targeted lit; 3/3 MX and TSORT lit; exact 120-op manifest; opcode coverage; git diff --check

Not-tested: 143 pre-existing full-lit failures across LLVM 21 EmitC, unlowered ops, FileCheck drift, assertions, and subview expectations
@zhoubot
zhoubot marked this pull request as ready for review August 2, 2026 12:09
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@zhoubot
zhoubot merged commit cf2d287 into main Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant