Add structured atomic lowering - #31
Draft
nhat-nguyen wants to merge 2 commits into
Draft
Conversation
nhat-nguyen
force-pushed
the
nhat/tts.atomic_rmw
branch
from
May 30, 2026 03:53
5af79a6 to
3b08132
Compare
added 2 commits
May 30, 2026 03:04
Add structured `tts.atomic_rmw` and `tts.atomic_cas` operations and lower eligible Triton atomics to them from pointer analysis. The RMW op also participates in the existing mask-dimension folder, and rewritten atomics now skip the erased op during the preorder walk. This combines the internal atomic RMW, RMW verifier, CAS, and walk-fix changes into one upstreamable feature patch. The scalar-splat atomic follow-up is left out because the GitHub base does not yet contain the separate scalar-store rewrite it extends. Tests: cmake --build /tmp/triton/build/cmake.macosx-26.2-arm64-cpython-3.12 --target triton-shared-opt Tests: lit -j1 -Dfilecheck=/Users/nhat/.triton/llvm/llvm-87717bf9-macos-arm64/bin/FileCheck -sv /tmp/triton/build/cmake.macosx-26.2-arm64-cpython-3.12/third_party/triton_shared/test --filter atomics Tests: lit -j1 -Dfilecheck=/Users/nhat/.triton/llvm/llvm-87717bf9-macos-arm64/bin/FileCheck -sv /tmp/triton/build/cmake.macosx-26.2-arm64-cpython-3.12/third_party/triton_shared/test/Conversion/TritonToStructured Tests: lit -j1 -Dfilecheck=/Users/nhat/.triton/llvm/llvm-87717bf9-macos-arm64/bin/FileCheck -sv /tmp/triton/build/cmake.macosx-26.2-arm64-cpython-3.12/third_party/triton_shared/test
nhat-nguyen
force-pushed
the
nhat/tts.atomic_rmw
branch
from
May 30, 2026 07:08
3b08132 to
985e260
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add structured
tts.atomic_rmwandtts.atomic_casoperations and lower eligible Triton atomics to them from pointer analysis.