Skip to content

refactor(ir): add AtomSched operation declarations - #186

Merged
zhen8838 merged 8 commits into
tile-ai:mainfrom
zhen8838:refactor/atomsched-stage2a-op-declarations
Sep 25, 2026
Merged

zhen8838 merged 8 commits into
tile-ai:mainfrom
zhen8838:refactor/atomsched-stage2a-op-declarations

Conversation

@zhen8838

Copy link
Copy Markdown
Collaborator

Why

  • Establish the Stage 2a IR declarations and package boundaries required before migrating AtomSched operations in Stage 2b.
  • Make mesh composition, scheduling patterns, memory effects, pointer views, and dynamic tuple selection explicit contracts instead of downstream overrides.

What

  • Add layered mesh composition, slicing, separation, and topology validation.
  • Move the pattern language into ir.pattern, rename constraints to clauses, and add match/constraint utilities plus mesh and layout patterns.
  • Add ParamDef.effect, PointerType, pointer-based memory operation declarations, and Copy/Fill/Cast scheduling metadata.
  • Make TupleGetItem.index an input and support dynamic tuple indexing through parsing, printing, evaluation, analysis, and CUDA emission.
  • Update specifications, fixtures, tutorials, and all affected call sites.

Contract

  • make_mesh now composes Mesh values; separate reverses layered composition, and multi-level meshes support per-level slicing.
  • tilefoundry.ir.core.pattern is removed in favor of tilefoundry.ir.pattern; DimVarRangePat is now RangePattern, including the public DSL export.
  • tilefoundry.ir.constraints is renamed to tilefoundry.ir.clause with the corresponding public type and metadata names.
  • Op inputs may declare ParamDef.effect; PointerType is part of the public Type union.
  • T.tensor_view consumes a pointer operand. Pointer-view trailing coordinates are explicitly unsupported.
  • TupleGetItem.index is a scalar input. Dynamic indices require a non-empty homogeneous tuple and conservatively read all tuple leaves.

Risk

  • Dynamic tuple CUDA emission uses C++20 aggregate CTAD for cute::array{...}; Stage 2b must validate it in a compiled dynamic-stage fixture.
  • Dimension arithmetic rendering remains duplicated between tuple indexing and tensor-view coordinates; Stage 2b should consolidate the two tables when it next changes tensor-view codegen.

@zhen8838
zhen8838 merged commit dfff826 into tile-ai:main Sep 25, 2026
1 check passed
@zhen8838
zhen8838 deleted the refactor/atomsched-stage2a-op-declarations branch September 25, 2026 16:54
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