[TLE][BACKEND] Add AMD tile and cumsum lowering - #939
Open
zihaomu wants to merge 3 commits into
Open
Conversation
Route thread-id, barrier, and shuffle lowering through target behavior capabilities instead of backend identity. Keep backend-owned TargetInfoBase copies source-compatible and preserve the existing HCU behavior.
Register shared-memory scratch allocation and AMD LLVM patterns for extract_tile, insert_tile, and exclusive_cumsum. Report any unsupported TLE operations that remain after AMD lowering with their operation names and target architecture.
Exercise dynamic and static tile operations plus the cumsum correctness matrix on AMD. Add an AMD FileCheck lowering regression and unit coverage for residual unsupported TLE diagnostics.
zihaomu
requested review from
Galaxy1458,
i3wanna2,
menchunlei,
sunnycase and
zhzhcookie
as code owners
August 8, 2026 10:23
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.
What
tle.extract_tile,tle.insert_tile, andtle.exclusive_cumsum.TargetInfoBasecopies source-compatible with the shared capability API.Why
The shared TLE lowering previously emitted NVIDIA-specific thread-id, barrier, and shuffle operations unless the target identified as HCU. AMD therefore could not lower these portable tile operations even though its target interface already provides the required primitives.
This change lets the AMD backend reuse the shared lowering while preserving existing behavior for NVIDIA, HCU, Iluvatar, Metax, and MThreads.
Testing
13 passed, 4 skipped2 passedtriton-opt + FileCheckregression for extract_tile, insert_tile, and exclusive_cumsum: passedlibtriton.solink: passedgit diff --check: passedmerge-treeagainst current upstreammain: conflict-freeCross-backend validation
An HCU-equivalent wheel build compiled the changed
TargetInfo.cppandTritonGPUToLLVM.cpp. It later stopped in the unchangedTargetUtils.cppbecause the local LLVM package does not contain HCU-specific GPU enums (GK_GFX928,GK_GFX936, and related targets). The upstream HCU/Iluvatar/Metax/MThreads CI jobs remain the final cross-backend gate.