Skip to content

fix(lowering): bind ring stages and unify compilation passes - #277

Merged
zhen8838 merged 11 commits into
tile-ai:mainfrom
zhen8838:fix/lowering-stage-address
Oct 28, 2026
Merged

zhen8838 merged 11 commits into
tile-ai:mainfrom
zhen8838:fix/lowering-stage-address

Conversation

@zhen8838

@zhen8838 zhen8838 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Why

What

  • Keep ring stages as a tuple of bound TensorViews and bind each selected stage once per consuming scope.
  • Share default_pipeline across finalize, compile and scaffold. Resolve the core host-entry pass through Target.resolve, with CUDA supplying an @bind implementation.
  • Make Module.entry the host starting point and carry analyzed shared-memory peaks into host launches.
  • Link all CPU hosts on the call paths, with the root host first.

Contract

  • Both InsertHostEntryPass.create(target, options) and ConvertHIRToTIR.create(target, options) support target-owned implementations.
  • link_program removes entries; the loader binds the first linked host, and build requires a CPU host root.
  • Full lowering requires memory-analysis metadata. ConvertHIRToTIR is a no-op for skeletons or modules without HIR; a CPU host root being lowered must launch exactly one HIR callee.

Risk

Comment thread docs/spec/parser.md Outdated
Comment thread src/tilefoundry/ir/tir/memory/tensor_view.py Outdated
Comment thread src/tilefoundry/parser/pattern_nodes.py Outdated
Comment thread src/tilefoundry/passes/transforms/convert_hir_to_tir.py Outdated
Comment thread targets/nvidia/tilefoundry_nvidia/cuda/codegen/module.py
Comment thread targets/nvidia/tilefoundry_nvidia/cuda/docs/spec/passes.md
Comment thread tests/nvidia/cuda/fixtures/schedule/tir/gemm_8192x17408x5120_tma_store.py Outdated
@zhen8838 zhen8838 changed the title fix(lowering): represent ring stages as byte-offset views fix(lowering): bind ring stages and unify compilation passes Oct 28, 2026
@zhen8838
zhen8838 merged commit 000fbab into tile-ai:main Oct 28, 2026
2 checks passed
@zhen8838
zhen8838 deleted the fix/lowering-stage-address branch October 28, 2026 08:55
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