[KMCompiler][TLE] Common IR triton35 - #974
Draft
zhongsanming wants to merge 85 commits into
Draft
Conversation
* fix(test): pass combine_batch * fix(test): replace PP * fix(test): pass BLOCK_M, BLOCK_N, DIM * fix(test): add tl.constexpr * fix(test): fix workspace type
* fix(test): remove vid and HALF_M * feat(test): add fa dummy * feat(test): comment code * feat(test): add linalg_ir dump * fix(third_party): comment add_triton_to_annotation
Co-authored-by: zsm <zsm@compiler-dev.com>
* fix CANN enum name and numpy import * add solution for some issue --------- Co-authored-by: zhongsanming <sanming.zhong@compiler-dev.com>
* feat(test): add matmul raw * feat(test): add test and dump * feat(test): use one loop * feat(test): use prologue * feat(test): remove unused variables * fix(test): use mat_c_l0c * feat(test): use sub_view * fix(test): preload 2 buffer * fix(test): fix gcd * fix(test): add out-of-bounds check
* feat(test): add matmul_add_residual * feat(test): add matmul_add_residual_cv * fix(test): remove mat_c_l0c * feat(test): add matmul_prefetch * convert tile.subview to memref.subview (#16) Co-authored-by: zhongsanming <zhongsanming@compiler-dev.com> --------- Co-authored-by: zhongsanming <116532846+zhongsanming@users.noreply.github.com> Co-authored-by: zhongsanming <zhongsanming@compiler-dev.com>
* test(test): add matmul subview * test(test): add no sync fa * test(test): add gpu pass fa * test(test): add fa_serial * test(test): add missing sync * fix(test): recover sub function * refactor(test): remove used variables * fix(third_party): add tile::MemorySpace::Global * fix(CMakeLists.txt): add no-dangling-assignment-gsl
* fix(test): fix L0C to UB error * fix(test): fix L0C to UB error * test(test): add fa 4func * test(test): add fa serial * test(test): add matmul_low_dim
* fix(test): fix cube use ub error * refactor(test): use tl.load
* fix(test): fix cube use ub error * refactor(test): use tl.load * fix(test): remove l1 alloc and copy, fix sync error
Co-authored-by: zhongsanming <zhongsanming@compiler-dev.com>
* fix(test): fix cube use ub error * refactor(test): use tl.load * fix(test): fix fa compile error * fix(test): fix rebase error
zhongsanming
marked this pull request as ready for review
August 13, 2026 06:00
zhongsanming
requested review from
Galaxy1458,
sunnycase and
zhzhcookie
as code owners
August 13, 2026 06:00
zhongsanming
marked this pull request as draft
August 13, 2026 07:24
zhongsanming
force-pushed
the
common-ir-poc-triton35
branch
from
August 13, 2026 07:25
73e293d to
e59ce83
Compare
kateyijian
reviewed
Aug 14, 2026
|
|
||
| registry.insert< | ||
| mlir::triton::TritonDialect, mlir::cf::ControlFlowDialect, | ||
| mlir::triton::tile::TileIRDialect, mlir::hivm::HIVMDialect, |
Collaborator
There was a problem hiding this comment.
- 使用宏进行隔离 (目前只影响ascend 后端)
| @@ -0,0 +1,184 @@ | |||
| # 2× L1 缓冲区在 Linalg 降级流水线中被意外消除 | |||
| >(); | ||
| DLTIDialect, // flagtree tle raw | ||
| mlir::triton::tle::TleDialect, // flagtree tle raw | ||
| ::mlir::index::IndexDialect, func::FuncDialect>(); |
Collaborator
There was a problem hiding this comment.
CI 所有厂商 triton 3.5.x: 燧原,昇腾
|
|
||
|
|
||
| @triton.jit | ||
| def copy_buffer(x): |
| return op->getResult(0); | ||
| }) | ||
| // Add an annotation | ||
| .def("create_tanh", |
| if(FLAGTREE_BACKEND STREQUAL "ascend") | ||
| include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dsa/dialect/include) | ||
| include_directories(${CMAKE_CURRENT_BINARY_DIR}/dsa/dialect/include) | ||
| include_directories(${CMAKE_SOURCE_DIR}/third_party/flir/include) |
| MLIRTargetLLVMIRImport | ||
| TleIR | ||
| TileIRIR | ||
| BiShengIRHIVMDialect |
| if(NOT MSVC) | ||
| if(FLAGTREE_BACKEND) | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-covered-switch-default") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-covered-switch-default -Wno-dangling-assignment-gsl") |
| endif() | ||
| else() | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-covered-switch-default -fvisibility=hidden") | ||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-covered-switch-default -Wno-dangling-assignment-gsl -fvisibility=hidden") |
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.
相关SIG flagos-ai/community#95
引入一种新的Common IR作为TTIR的补充,CommonIR的主要功能是对算子层暴露更低层次的抽象,让算子层能解锁更多优化的机会。这个PR在triton 3.5 分支上完成了昇腾设备的POC工作,打通了从tle.dsa到Common IR到linalg IR到npubin的全流程。
现有flaggems全量op的精度测试结果:飞书文档
如果飞书文档没有权限请先使用以下链接:
summary
环境配置: