Repository navigation
[AtomicOp](fix) Extend atomic min/max canonicalization - #1566
Merged
Merged
Conversation
Contributor
✅ DCO Check PassedCommits
|
Contributor
Author
|
/retry |
CHNJZ
force-pushed
the
atomic
branch
3 times, most recently
from
August 14, 2026 07:23
e580e2b to
defef8a
Compare
Signed-off-by: chnjz233 <jiangzheng26@huawei.com>
KanuaK
approved these changes
Aug 14, 2026
WuTYSFG
approved these changes
Aug 14, 2026
HinPeng
pushed a commit
that referenced
this pull request
Aug 15, 2026
…#1566) Signed-off-by: chnjz233 <jiangzheng26@huawei.com>
xuedinge233
pushed a commit
to xuedinge233/triton-ascend
that referenced
this pull request
Aug 17, 2026
…triton-lang#1566) Signed-off-by: chnjz233 <jiangzheng26@huawei.com>
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.
Background
PR [#1460](#1460) introduced
AtomicMaxMinCanonicalizerto fuse the integer atomic operations expanded from floating-pointatomic_min/atomic_maxback into a single floating-point atomic operation before discrete-mask conversion.However, the canonicalizer did not cover the following two IR forms.
Changes
Support scalar floating-point atomic min/max
Floating-point atomics whose value is produced by a scalar reduction use scalar types instead of
TensorType. Their positive sign mask is also represented as:Extend the canonicalizer to:
cmpi eq 0sign-mask form.Support pointers represented as
splat(bitcast(ptr))For tensor atomics constructed from a scalar base pointer, the pointer conversion may be represented as:
PR [AtomicOp](fix) Fuse expanded floating-point atomic min/max #1460 only recognized atomics whose pointer was directly defined by
tt.bitcast.Extend the canonicalizer to recognize both direct
bitcastandsplat(bitcast(ptr))forms, rebuild the corresponding floating-point pointer tensor, and remove dead pointer splat/bitcast operations after fusion.Test
atomic_max.atomic_minusing a splatted scalar base pointer.