Skip to content

[WIP][AscendNPU-IR][Expert] Support "expert mode" T.alloc_shared, T.alloc_fragment, T.alloc_workspace#643

Open
mmyy1217 wants to merge 1 commit intotile-ai:npuirfrom
mmyy1217:zuomin/exp/alloc_workspace
Open

[WIP][AscendNPU-IR][Expert] Support "expert mode" T.alloc_shared, T.alloc_fragment, T.alloc_workspace#643
mmyy1217 wants to merge 1 commit intotile-ai:npuirfrom
mmyy1217:zuomin/exp/alloc_workspace

Conversation

@mmyy1217
Copy link
Copy Markdown
Collaborator

@mmyy1217 mmyy1217 commented Mar 19, 2026

This change includes:

  1. Added T.alloc_workspace() Python API in tilelang/language/allocate.py.
  2. Updated T.alloc_shared() default scope to "shared.flat" to distinguish it from T.alloc_L1() ("shared.dyn").
  3. Implemented IsPureCopyScope for "shared.flat", "local.fragment", and workspace scopes to route copies strictly via pure memref.copy.
  4. Updated AllocateNode to emit pure memref.alloc for these pure copy scopes.
  5. Implemented workspace allocation support using memref_ext.alloc_workspace.
  6. Added expert mode test case for pure copies in testing/npuir/memory_ops/test_workspace_copy_exp.py.

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run bash format.sh in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work!

🚀

@mmyy1217 mmyy1217 force-pushed the zuomin/exp/alloc_workspace branch 3 times, most recently from 680a9ee to fd85935 Compare March 24, 2026 07:36
…e copy

Squashed commits:

- feat(npuir/expert): support pure memref copy routing and T.alloc_workspace

- feat(npuir/expert): support multi_buffer annotation in T.alloc_workspace

- fix(codegen): replace getResult() with getOperation()->getResult(0) for MarkOp

- feat(codegen): support multi_buffer for alloc_shared and alloc_fragment

- move workspace_copy_exp.py file out of CI
@mmyy1217 mmyy1217 force-pushed the zuomin/exp/alloc_workspace branch from fd85935 to 8d28a6e Compare March 24, 2026 11:07
@CeleNewYear CeleNewYear added the AscendNPU-IR Want to merge into the npuir branch label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AscendNPU-IR Want to merge into the npuir branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants