Skip to content

Fix constraints in isExpensiveCat#9995

Merged
neildhar merged 1 commit into
mainfrom
neildhar/pr9995
Apr 15, 2026
Merged

Fix constraints in isExpensiveCat#9995
neildhar merged 1 commit into
mainfrom
neildhar/pr9995

Conversation

@neildhar
Copy link
Copy Markdown
Collaborator

@neildhar neildhar commented Apr 10, 2026

isExpensiveCat does not reflect the constraint we have in lowering,
which is that the number of unique result elements per thread must be
equal to the total number of unique operand elements per thread. This
means that we can sometimes fold CatOp into layout conversions that
have destination layouts that violate this requirement.

Rename it to isLegalCatEncoding to reflect that it is actually a
correctness requirement, and update it to reflect the actual constraint.


Comment thread lib/Dialect/TritonGPU/IR/Dialect.cpp
Comment thread lib/Dialect/TritonGPU/IR/Dialect.cpp Outdated
isExpensiveCat does not reflect the constraint we have in lowering,
which is that the number of unique result elements per thread must be
equal to the total number of unique operand elements per thread. This
means that we can sometimes fold `CatOp` into layout conversions that
have destination layouts that violate this requirement.

Rename it to `isLegalCatEncoding` to reflect that it is actually a
correctness requirement, and update it to reflect the actual constraint.
@neildhar neildhar enabled auto-merge (squash) April 14, 2026 21:51
@neildhar neildhar merged commit 8324fad into main Apr 15, 2026
12 of 14 checks passed
@neildhar neildhar deleted the neildhar/pr9995 branch April 15, 2026 06:09
raymondtay pushed a commit to raymondtay/triton that referenced this pull request Apr 18, 2026
isExpensiveCat does not reflect the constraint we have in lowering,
which is that the number of unique result elements per thread must be
equal to the total number of unique operand elements per thread. This
means that we can sometimes fold `CatOp` into layout conversions that
have destination layouts that violate this requirement.

Rename it to `isLegalCatEncoding` to reflect that it is actually a
correctness requirement, and update it to reflect the actual constraint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants