-
Notifications
You must be signed in to change notification settings - Fork 9
[Instruction][TMA] Add TMA related instructions #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds TMA (Tensor Memory Accelerator) related instructions to the framework, enabling asynchronous tensor copy operations between global and shared memory. The PR introduces 5 new TMA instructions, utilities for linear expression decomposition, and tracking contexts for grid/block invariant variables and global tensor views.
- Add 5 new TMA instructions: cp_async_tensor_global_to_shared, cp_async_tensor_shared_to_global, cp_async_tensor_commit_group, cp_async_tensor_wait_group, fence_proxy_copy_async
- Introduce linear decomposition utility for extracting tensor access strides
- Add InvariantTrackingContext and GlobalViewContext for TMA code generation
Reviewed Changes
Copilot reviewed 49 out of 51 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
tests/lang/test_copy_async_tensor.py | Test case for TMA copy operations |
python/tilus/ir/utils/lineardec.py | Linear expression decomposition utility |
python/tilus/ir/instructions/cuda/cp_async_tensor.py | TMA instruction definitions |
python/tilus/backends/emitters/cuda/cp_async_tensor.py | TMA instruction code generation |
python/tilus/extensions/hidet/ir/primitives/cuda/tensor_map.py | TensorMap primitive definitions |
python/tilus/extensions/hidet/ir/primitives/cuda/copy_async_tensor.py | TMA primitive functions |
Comments suppressed due to low confidence (1)
python/tilus/extensions/hidet/transforms/lower_subbyte_type.py:1
- Unreachable code detected. Line 229 will never execute because line 228 always raises an exception.
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ac30f22
to
6c09780
Compare
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Yaoyao Ding <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Yaoyao Ding <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Yaoyao Ding <[email protected]>
bd6965b
to
88df482
Compare
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
Signed-off-by: Yaoyao Ding <[email protected]>
This PR adds the following TMA-related instructions:
Internally,