Skip to content

[AMD][BACKEND][TDM] Handle Negative Offsets as Fully Out-of-Bounds Tiles#10310

Merged
antiagainst merged 1 commit into
triton-lang:mainfrom
AlexAUT:tdmNegativeOffsets
May 15, 2026
Merged

[AMD][BACKEND][TDM] Handle Negative Offsets as Fully Out-of-Bounds Tiles#10310
antiagainst merged 1 commit into
triton-lang:mainfrom
AlexAUT:tdmNegativeOffsets

Conversation

@AlexAUT
Copy link
Copy Markdown
Contributor

@AlexAUT AlexAUT commented May 14, 2026

For TDM, negative offsets must be treated as fully OOB, as partial OOB handling on the left is not supported.
Previously, we adjusted the tensor shape tensor_shape = tensor_shape - offset. For negative offsets this increased the tensor dimension, leading to OOB reads by the HW.

To fix this, we now clamp the tensor shape to zero for negative offsets, which treats the entire tile as OOB (zero-fill).

@AlexAUT AlexAUT marked this pull request as ready for review May 14, 2026 15:12
@antiagainst antiagainst merged commit 70ff039 into triton-lang:main May 15, 2026
8 of 9 checks passed
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