Skip to content

Add typed PredicateCell composition, views and selection (spec #406) - #297

Merged
VV0003 merged 1 commit into
linxfrom
fix/predicatecell-composition
Oct 29, 2026
Merged

VV0003 merged 1 commit into
linxfrom
fix/predicatecell-composition

Conversation

@VV0003

@VV0003 VV0003 commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adopt PTO-ISA/pto-spec#406 for explicit typed PredicateCell composition. Refs PTO-ISA/pto-spec#349 (remains open for runtime and broader adoption).

Required compiler: LinxISA/llvm-project commit 1ff282e03713b9138aab5b75e916efe7e0cc3bc2, published to dev-llvm15_56 before this PR. Existing CI resolves that branch SHA when building the matching toolchain.

  • Add logical_and/or/xor returning U8-basis PredicateCell, and explicit logical_numeric<6/7/8> returning Numeric U8 for mixed S8/U8 inputs. Numeric results cannot masquerade as typed predicates.
  • Add basis-independent select/select_scalar and typed CELL-aligned subview.
  • Add restricted closed two-writer concatenate; no arbitrary OPEN parent or masked-logical MERGE API.
  • Admit static M16 compare/composition/select/views; indexed memory remains M32-only. Keep FP32/S32/U32 payload limits and S64/U64 byte offsets.
  • Update generic predicate adapters documentation and options in the same PR; element-if only cross-references the separate explicit API.

ISA contract

At spec merge 149c3a56c130bb6a13cb9f91e1565f084103cb96, double PredicateCell U8 logical inputs produce U8-basis PredicateCell, mixed Numeric produces Numeric U8, typed views preserve basis, and select consumers do not require predicate basis to equal payload type. No new opcode or relaxed model checks.

Validation layers

  • Source/object compilation: typed adapter suite 15/15 PASS, including cross-basis selection, mixed numeric result typing/rejection, M16 positive and memory negative profiles.
  • Assembly form/encoding: checks TAND/TOR/TXOR/TSEL/TSELS and masked memory forms, two SUBVIEW/two ASSEMBLE modifiers; typed views/assembly object and assembly-to-object roundtrip pass. No predicate TCVT workaround.
  • Engine-contract suite 59/59 PASS.
  • LLVM related CodeGen/MC 338 PASS / 1 XFAIL / 39 pre-existing FAIL, compared by test name against ccd4275: zero new failures.
  • Full Python discovery before final two additional focused cases: candidate 147 tests, baseline 139 tests, both 2 FAIL / 1 ERROR / 7 SKIP with identical failure/error names: test_reject_unsupported_dtype, test_weight_bundle_uses_shared_nk_contract, import test_static_valid_shape_lowering. Do not claim this suite is green. Final 15-case suite includes the two subsequently added cases.
  • Rebased cleanly onto latest linx c5a8d19 (feat(tileop): support PTO spec #398 and #399 #296); rerun focused adapters/engine-contract before branch publication.

Not claimed

No model/benchmark/ISA modifications; no runtime or TopK numerical PASS. Canonical/defined bytes, inactive no-event behavior, ZERO/MERGE pinned-Q wait/trap recovery still need current-model execution evidence. Main SDK installation is not overwritten with headers requiring a newer compiler. Do not close spec #349 based on compilation alone.

Merge only through the existing required gate and auto-merge workflow; no direct push to linx.

Adopt PTO spec #406 for logical PredicateCell results, mixed Numeric U8 outputs, basis-independent selection, CELL-aligned typed views and closed two-writer concatenation. Keep indexed memory restricted to M32 and document matching LLVM requirements.
@VV0003
VV0003 merged commit 8202387 into linx Oct 29, 2026
2 checks passed
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