[AMD] CanonicalizePointers: Handle different base pointers and offsets#9541
Merged
Conversation
Contributor
Author
|
cc @AlexAUT |
AlexAUT
reviewed
Feb 23, 2026
AlexAUT
left a comment
Contributor
There was a problem hiding this comment.
Thanks for fixing this, looks reasonable to me. cc @yangshuxin since he also touched this pass IIRC.
yangshuxin
reviewed
Feb 23, 2026
`scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `intersect` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops.
antiagainst
approved these changes
Mar 12, 2026
raymondtay
pushed a commit
to raymondtay/triton
that referenced
this pull request
Mar 22, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops.
jvican
pushed a commit
to jvican/triton
that referenced
this pull request
Mar 27, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops.
AlexAUT
pushed a commit
to AlexAUT/triton
that referenced
this pull request
Mar 27, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops.
gshtras
added a commit
to ROCm/vllm
that referenced
this pull request
Mar 30, 2026
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
jayfurmanek
pushed a commit
to ROCm/triton
that referenced
this pull request
Mar 31, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops.
naromero77amd
pushed a commit
to ROCm/triton
that referenced
this pull request
Apr 1, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops. (cherry picked from commit dd998b6)
naromero77amd
pushed a commit
to ROCm/triton
that referenced
this pull request
Apr 1, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops. (cherry picked from commit dd998b6)
jayfurmanek
added a commit
to ROCm/triton
that referenced
this pull request
Apr 1, 2026
triton-lang#9541) (#935) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops. Co-authored-by: Volkan Keles <volkan.keles@amd.com>
naromero77amd
pushed a commit
to ROCm/triton
that referenced
this pull request
Apr 7, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops. (cherry picked from commit dd998b6)
atalman
pushed a commit
that referenced
this pull request
Apr 10, 2026
…nters and offsets (#9541) (#9950) Upstream cherry-pick `dd998b6` onto `release/3.7.x`. Testing will be done here: pytorch/pytorch#179636 --------- Co-authored-by: Volkan Keles <volkan.keles@amd.com> Co-authored-by: Thomas Raoux <thomas.raoux@openai.com>
plognjen
pushed a commit
to plognjen/triton
that referenced
this pull request
Apr 14, 2026
triton-lang#9541) `scf.if` and `arith.select` ops can have different base pointers accross branches. In that case, `FatPtrAttrs` can't keep `smallTensorBase` or pick one of the branches. Instead, replace `smallTensorBase` (Value) with `isSmallTensor` (bool) in `FatPtrAttrs` and add a conservative `merge` function for combining attrs. Also, handle different scalar offsets properly when handling `arith.select` ops.
Merged
1 task
5 tasks
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.
scf.ifandarith.selectops can have different base pointers accross branches. In that case,FatPtrAttrscan't keepsmallTensorBaseor pick one of the branches. Instead, replacesmallTensorBase(Value) withisSmallTensor(bool) inFatPtrAttrsand add a conservativemergefunction for combining attrs. Also, handle different scalar offsets properly when handlingarith.selectops.