Repository navigation
Route TLE GPU through TileIR conversion - #75
Open
kateyijian wants to merge 2 commits into
Open
kateyijian wants to merge 2 commits into
kateyijian wants to merge 2 commits into
Conversation
kateyijian
commented
Aug 18, 2026
| # TLE GPU always enters through TileIR when the dialect is available. | ||
| # Convert the target-independent buffers to TritonGPU descriptors | ||
| # before the standard TTIR-to-TTGIR conversion. | ||
| tle.passes.add_convert_gpu_tile_to_ttgir(pm) |
| # Use provided layout | ||
| layout_handle = layout.to_ir(_semantic.builder) | ||
|
|
||
| if _tileir_available(_semantic.builder): |
| if _tileir_mode(): | ||
| if not hasattr(_semantic.builder, "create_tile_store_tensor"): | ||
| raise RuntimeError("TLE GPU TileIR mode requires a TileIR-enabled TLE builder") | ||
| if hasattr(_semantic.builder, "create_tile_store_tensor"): |
|
|
||
| def Tle_PipeWriterCommitOp : Tle_Op<"pipe.writer_commit"> { | ||
| let arguments = (ins | ||
| Variadic<TTG_MemDescType>:$fields, |
| // | ||
| // Copyright (c) 2025 The FlagOS Contributors | ||
|
|
||
| #include "tle/dialect/include/Transforms/Passes.h" |
| def Tle_PipeCreateOp : Tle_Op<"pipe.create"> { | ||
| let summary = "create a typed TLE GPU pipe"; | ||
| let arguments = (ins | ||
| Variadic<TTG_MemDescType>:$fields, |
|
|
||
| include "mlir/Pass/PassBase.td" | ||
|
|
||
| def TritonTleConvertGpuTileToTtgir |
Author
There was a problem hiding this comment.
| @@ -1,5 +1,6 @@ | |||
| # flagtree tle | |||
| add_triton_library(TritonTLETransforms | |||
| TleConvertGpuTileToTtgir.cpp | |||
| NVWSIR | ||
| ) | ||
|
|
||
| if(TARGET TileIRIR) |
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.
本次更新内容
本次修改完善 Triton 3.6 下 TLE GPU 经由 CommonIR 转换到 TTGIR 的完整路径:
主要改动
FLAGTREE_COMMON_IR;仅显式开启时构建 FLIR 和 CommonIR conversion,关闭时保留原始 TLE GPU 路径。_tileir_mode和分散的 builder 能力判断,由 C++ 暴露统一开关,Python 只读取一次。tle.gpu.alloc/copy/subview/local_ptr/to_tensor/store_tensor在 CommonIR 模式下生成对应 TileIR。TleOps.td中 pipe 输入为TTG_MemDescType,通过 FLIR 的tile.get_memdesc完成!tile.buf -> !ttg.memdesc桥接。CommonIRToTTGIR层,并统一 pass、目录和 Python binding 命名。triton-opt + FileCheck测试,验证 TileIR 能完整转换为 TTGIR 且无目标 GPU TileIR op 残留。验证结果
native_matmul_gpu.py:编译、CUBIN、精度 PASS。native_flash_gpu.py:编译、CUBIN、精度 PASS。说明