Skip to content

[IR][Buider] (2/N) New IR builder for spmw - #30

Open
Fangtangtang wants to merge 17 commits into
spmw-builder-tmpfrom
spmw-builder-exp
Open

[IR][Buider] (2/N) New IR builder for spmw#30
Fangtangtang wants to merge 17 commits into
spmw-builder-tmpfrom
spmw-builder-exp

Conversation

@Fangtangtang

@Fangtangtang Fangtangtang commented Mar 16, 2026

Copy link
Copy Markdown
Owner

Description

follows cornell-zhang#570.

This PR introduces a new (experimental) MLIR IR builder.

Design Overview

The builder adopts a two-phase design:

  1. AST preprocessing (ast_preprocessor)
  2. MLIR construction (ir_builder)

These two components are intended to serve as core infrastructure. They are expected to remain relatively stable over time and should not be modified frequently once the design matures.

In contrast, the builtin/ directory contains components related to syntax and semantic extensions. This part is designed to be highly extensible and is expected to evolve rapidly.
Note that some of the existing implementations under builtin/ are not yet fully tested, they primarily serve as current feature support and examples for future semantic extensions.

For more details, please refer to the README files in the corresponding directories.

Examples

New test cases are added under tests/exp/:

  • tests/exp/basic/: basic syntax and usage examples. These tests are lowered to the CPU backend for functionality validation.

  • tests/exp/spmw/: tests and examples for the new SPMW programming interface. (Currently without backend codegen or execution validation.)

Checklist

Please make sure to review and check all of these items:

  • PR's title starts with a category (e.g. [Bugfix], [IR], [Builder], etc)
  • All changes have test coverage (It would be good to provide ~2 different test cases to test the robustness of your code)
  • Pass the formatting check locally
  • Code is well-documented

@Fangtangtang Fangtangtang changed the title [feat] experimental builder [IR][Buider] (2/N) New IR builder for spmw Mar 16, 2026
@Fangtangtang
Fangtangtang marked this pull request as ready for review March 20, 2026 14:34
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