Skip to content

fix: reject mismatched TCMP/TSEL physical shapes - #291

Merged
VV0003 merged 1 commit into
linxfrom
fix/issue-290-compare-select-shape
Oct 26, 2026
Merged

VV0003 merged 1 commit into
linxfrom
fix/issue-290-compare-select-shape

Conversation

@VV0003

@VV0003 VV0003 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #290.

  • Reject TCMP operands whose physical Rows x Cols or BFractal layout differs.
  • Reject TCMP predicate destinations whose physical shape/layout differs from the source.
  • Reject TSEL mask/true-source physical shape/layout mismatches.
  • Preserve valid partial-column tiles when all operands share the same physical geometry.
  • Add positive and compile-fail regression coverage and document the shape contract.

ISA basis

The current PTO-SPEC normative comparison contract requires logical shape matching, including physical rows/columns, valid rows/columns, and layout. This patch moves the mismatch diagnostic from model-time assertion to the TileOP API compile-time boundary.

Validation

  • python3 test/test_issue290_compare_select_shape.py -v: 2/2 pass
  • python3 test/test_v058_engine_contract.py: 59/59 pass
  • Positive partial-column TCMP/TSEL fixture compiles
  • Mismatched physical-column TCMP fixture is rejected with the expected diagnostic
  • git diff --check pass

The broader local frontend gate remains blocked by the pre-existing Shared handle materialized to memory check, unrelated to this change.

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.

[TileOP API] validCol=1 部分列 tile 参与 TCMP/TSEL 触发维度断言——compare/select 形态契约需明确

1 participant