Triton Ascend 已经迁移到https://github.com/triton-lang/triton-ascend
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[BUILD] Fix mac build CI (#7997) We were picking the wrong clang after image upgrade. Solution mostly from chatgpt | 9 个月前 | |
!1829 merge 0512_ut into main feat(ssbuf): Fix tag missing and add ut for multi cache inner scope Created-by: cxtverygood123 Commit-by: cxtverygood123 Merged-by: ascend-robot Description: 修改计数器block_id标签缺失问题,生产者op,并补齐相关UT,主要修改点: 1.将核内多buffer轮询计数器相关op缺失block_id标签问题修复; 2.将原本核内多buffer生产者物理写入op修改为copy以满足一切二pass所需输入; 3.补齐核内多buffer单元测试用例。 <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [ ] I am not making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) See merge request: Ascend/triton-ascend!1829 | 1 个月前 | |
feat: update llvm hash and upload fad3272.patch Co-authored-by: candyhong<1102229410@qq.com> # message auto-generated for no-merge-commit merge: !60 merge release/3.5.x-upgrade-candy-dev into release/3.5.x-upgrade feat: update llvm hash and upload fad3272.patch Created-by: candyhong Commit-by: candyhong Merged-by: zhuxuejie Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## checklist <!-- [x] 表示选中 --> - [ ] 是否通过本地IDE对代码进行静态检查 - [ ] 是否通过本地IDE对代码进行格式化处理 - [ ] 是否进行空指针校验 - [ ] 是否进行返回值校验 - [ ] 是否正确释放new/malloc申请的内存 - [ ] 是否充分考虑接口的异常场景 - [ ] 是否正确记录错误日志 See merge request: jeshd/triton-ascend!60 | 2 个月前 | |
feat: docs update,Added version 3.2.1 | 1 个月前 | |
docs(developer): add document of programming | 1 个月前 | |
Merge Triton-Ascend 425236de into release/3.5.x | 2 个月前 | |
Merge Triton-Ascend 425236de into release/3.5.x | 2 个月前 | |
!1653 merge feature-dot-scale-fp4 into main feature: Implement for dot scale fp4 Created-by: ZhaoWentengZWT Commit-by: Zhao Wenteng Merged-by: ascend-robot Description: <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [ ] I am not making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) See merge request: Ascend/triton-ascend!1653 | 1 个月前 | |
[Build] change default llvm build to release (#7872) | 10 个月前 | |
Add llc to the lit tool configuration (#7992) The triton lit tests leverage several llvm & mlir tools such as opt, mlir-translate and llc. These are generally configured to come directly from the llvm build that triton is using, but llc is not. This means that right now the llc version on the system will be used instead and if it doesn't match the rest of the tools, we can end up with failures. An example failure is using an older version than the llvm build and missing features (such as ptx83). To fix this issue, configure lit to use the llc directly from the llvm build. | 9 个月前 | |
!1790 merge sn into main fix: Enhance offset analysis and change the tensor of the all-one type in the select op to continuous memory access Created-by: wutianyao Commit-by: wutianyao Merged-by: ascend-robot Description: **bugfix1:** The restriction that forcibly treats tensor types with all 1(<1x1x1x...>) in the select op during pointer analysis as non-contiguous has been removed. Because under the original restriction, it would lead to a situation where, when processing tensor<1x> types, they would be expanded into discrete memory access.However, when the MLIR's built-in forloop optimization(SimplifyTrivialLoops) recognizing that the loop count is 1, it would fall back. Yet, it did not remove the discrete memory access label applied to the load op during the discrete memory access optimization({DiscreteMemAccess}). When the linalg pass later attempts to transform the load, if it detects that the load has a discrete memory access label, it will read the init args of the outer forloop of the load. Where the discrete memory access forloop has already been fall back by SimplifyTrivialLoops , this can lead to a series of errors (for example, if the discrete memory access forloop has been erased but the kernel itself still contains a forloop, reading the init args as empty can cause a core dump). **bugfix2:** When recognize a indextensor in forloop init args in the rewriteforloop, it will be convert to offset + stride,but in some scene, for example,the args is recognize as indextensor, then in blockptranalysis, it will be analysised as scalar, and in rewriteTerminator it need the stride must equal one, so an assert error occurs. **bugfix3:** When the mask is composed of splats, it is identified as a continuous mask in the discrete mask analysis pass. However, when it enters the Triton to Linalg pass, if all dimensions are 1, the splat op is converted into an insert op. In this case, the mask analysis cannot identify the insert op, and the mask is analyzed as discontinuous. As a result, the problem occurs. **bugfix4:** In the use analysis, when there is indirect memory access, the 1st load op is initially marked as a meta use. In the Post-process, this situation is handled by identifying and marking the instruction chain related to indirect memory access, and then re-marking it as mixuse to ensure it is not eliminated in subsequent conversion stages. If an op appears in a computation chain involving a set of indirect memory accesses, such as load(1st) -> computeOp -> load(2nd), and this op has been used through assert or print, it will be marked as Mixuse. In this case, the op will be clone into a mixuse op and a metause op before the Post-process phase. The mixuse op is used for assert, and the metause op is used for 2nd loads. However, since the op was initially marked as Mixuse, the 1st load op is also marked as Mixuse, thus skipping the post-process. Since the split metause op is used for 2nd loads, its elimination can cause a series of issues. Currently, a temporary modified for this situation is to disable cloning of select ops. <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [ ] I am not making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) See merge request: Ascend/triton-ascend!1790 | 1 个月前 | |
[Swizzling] Disallow asymmetric vectorisation within generic swizzling (#7833) Before, we would generate bank conflicts in, say, the load, as we were too eager to use st.shared.b32.vn. Now in these cases, we do not use vectorisation on the stores, but we do not create bank conflicts on the load either. We leave a comment as to how we could do better, but it'd be a bit of effort for rather modest wins (if any). Fixes https://github.com/triton-lang/triton/issues/7815 | 10 个月前 | |
Fix typos discovered by codespell (#5533) codespell --ignore-words-list=ans,conver,destop,dout,interm,latops,nd,olt,repid,subtile,valu \ --skip="./third_party/*,*.mlir,*.pdf" https://pypi.org/project/codespell conver should be removed from the ignore-words-list and the following line should be cleaned up: https://github.com/triton-lang/triton/blob/25732f0a063f025a4eb6f01a2e0939ef43a8afc7/include/triton/Dialect/TritonGPU/Transforms/Passes.td#L122 Should codespell be added to pre-commit and/or GitHub Actions? <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [x] I am making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [x] This PR does not add a test but this could be easily added to pre-commit and/or GitHub Actions if desired. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) --------- Co-authored-by: Keren Zhou <robinho364@gmail.com> | 1 年前 | |
refactor(docs): Docs update | 4 个月前 | |
[CI][TEST] update pre-commit hooks and use pre-commit for style tests in CI (#1409) Ref issue: - #1408 Changes: - Add .editorconfig - Add pre-commit-hooks: yaml - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: check-symlinks - id: destroyed-symlinks - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-toml - id: check-ast - id: check-added-large-files - id: check-merge-conflict - id: check-executables-have-shebangs - id: check-shebang-scripts-are-executable - id: detect-private-key - id: debug-statements - Add flake8 to pre-commit config and add .flake8 file - Use pre-commit for style tests in CI - Run pre-commit and fix existing violations: - fix trailing spaces - fix end-of-files - fix mod file mode with chmod -x - run autopep8 on existing code - fix flake8 violations | 3 年前 | |
Add .git-blame-ignore-revs. (#3117) I've been making some big NFC changes, and these can clog up git blame. Add a file that lists "uninteresting" revisions. You can (optionally!) instruct git to ignore the revs in here during blame. I got this list of commits by looking through the list of Triton commits that touch 30+ files. ChatGPT wrote the following bash script for me. git log --pretty=format:"%H" --name-only | \ awk -v N="30" ' /^[0-9a-f]{40}$/ { if (count > N) print hash; hash=$0; count=0; } NF { count++ } END { if (count > N) print hash } ' | xargs git show --stat | 2 年前 | |
Merge Triton 5389ed7 into release/3.4.x first. | 3 个月前 | |
feat(compile): add npu-ir to submodule Co-authored-by: luobaiqing<luobaiqing1@huawei.com> # message auto-generated for no-merge-commit merge: !1085 merge submodule into main feat(compile): add npu-ir to submodule Created-by: luobaiqing Commit-by: luobaiqing Merged-by: ascend-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## checklist <!-- [x] 表示选中 --> - [ ] 是否通过本地IDE对代码进行静态检查 - [ ] 是否通过本地IDE对代码进行格式化处理 - [ ] 是否进行空指针校验 - [ ] 是否进行返回值校验 - [ ] 是否正确释放new/malloc申请的内存 - [ ] 是否充分考虑接口的异常场景 - [ ] 是否正确记录错误日志 See merge request: Ascend/triton-ascend!1085 | 5 个月前 | |
[RFC] Enable mypy typechecking on subset of files in pre-commit (#6704) In https://github.com/triton-lang/triton/pull/6497 and https://github.com/triton-lang/triton/pull/6467 I took care to ensure the relevant modules typechecked successfully with mypy. Now I want to make sure they stay this way, so I'm proposing including mypy in the standard pre-commit flow. This way we can iteratively make different files typecheck without fear of losing progress. Example UX when creating type error: > git diff --cached diff --git a/python/triton/knobs.py b/python/triton/knobs.py index dd291513d..eab3cca17 100644 --- a/python/triton/knobs.py +++ b/python/triton/knobs.py @@ -106,7 +106,7 @@ class env_int(env_base[int, int]): def from_env(self, val: str) -> int: try: - return int(val) + return str(int(val)) except ValueError as exc: raise RuntimeError(f"Unable to use {self.key}={val}: expected int") from exc > git commit -m tst check for broken symlinks............................(no files to check)Skipped detect destroyed symlinks................................................Passed trim trailing whitespace.................................................Passed fix end of files.........................................................Passed check yaml...........................................(no files to check)Skipped check toml...........................................(no files to check)Skipped check python ast.........................................................Passed check for added large files..............................................Passed check for merge conflicts................................................Passed check that executables have shebangs.................(no files to check)Skipped check that scripts with shebangs are executable..........................Passed detect private key.......................................................Passed debug statements (python)................................................Passed ruff.....................................................................Passed yapf.....................................................................Passed clang-format.........................................(no files to check)Skipped mypy.....................................................................Failed - hook id: mypy - exit code: 1 python/triton/knobs.py:109: error: Incompatible return value type (got "str", expected "int") [return-value] Found 1 error in 1 file (checked 3 source files) Expand YAML anchors..................................(no files to check)Skipped And example UX when changing file that isn't typechecked (even though the file has type errors): > git diff --cached diff --git a/python/triton/language/core.py b/python/triton/language/core.py index 397b87560..9339cde9b 100644 --- a/python/triton/language/core.py +++ b/python/triton/language/core.py @@ -97,6 +97,7 @@ def _unwrap_iterable(x): # right answer for whether the class constexpr defines __iter__, and # abc.Iterable doesn't work (at least not without some metaclass magic). try: + _a: str = 5 iter(x[0]) return x[0] except TypeError: > git commit -m tst check for broken symlinks............................(no files to check)Skipped detect destroyed symlinks................................................Passed trim trailing whitespace.................................................Passed fix end of files.........................................................Passed check yaml...........................................(no files to check)Skipped check toml...........................................(no files to check)Skipped check python ast.........................................................Passed check for added large files..............................................Passed check for merge conflicts................................................Passed check that executables have shebangs.................(no files to check)Skipped check that scripts with shebangs are executable..........................Passed detect private key.......................................................Passed debug statements (python)................................................Passed ruff.....................................................................Passed yapf.....................................................................Passed clang-format.........................................(no files to check)Skipped mypy.....................................................................Passed Expand YAML anchors..................................(no files to check)Skipped [danzimm/mypycheck 9709ff131] tst 1 file changed, 1 insertion(+) N.B. In order to avoid duplicate inclusion/exclusion lists in pyproject.toml and .pre-commit-config.yaml I've disabled passing file names from pre-commit (since the CLI files override any lists in pyproject.toml), since if we only specify the exlusions in pre-commit running mypy directly wouldn't pick up that configuration. | 1 年前 | |
fix(docs): modify profiling Co-authored-by: HallCin<qinhao61@h-partners.com> # message auto-generated for no-merge-commit merge: !1241 merge br_main into main fix(docs): modify profiling Created-by: HallCin Commit-by: HallCin Merged-by: ascend-robot Description: The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. - [ ] I am not making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) See merge request: Ascend/triton-ascend!1241 | 4 个月前 | |
Merge Triton-Ascend 62eb951f into release/3.5.x | 2 个月前 | |
fix doctools probleam | 2 个月前 | |
fix(docs): correct some documents Co-authored-by: KanuaK<zhouyihan1@huawei.com> # message auto-generated for no-merge-commit merge: !1665 merge fix/docs-fix into main fix(docs): correct some documents Created-by: KanuaK Commit-by: KanuaK Merged-by: ascend-robot Description: <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [ ] I am not making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) See merge request: Ascend/triton-ascend!1665 | 2 个月前 | |
feat(docs): migrate documents from master branch Co-authored-by: zhang-chunli01<zhangchunli19@huawei.com> # message auto-generated for no-merge-commit merge: !1074 merge migrate-docs into main feat(docs): migrate documents from master branch Created-by: zhang-chunli01 Commit-by: zhang-chunli01 Merged-by: ascend-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## checklist <!-- [x] 表示选中 --> - [ ] 是否通过本地IDE对代码进行静态检查 - [ ] 是否通过本地IDE对代码进行格式化处理 - [ ] 是否进行空指针校验 - [ ] 是否进行返回值校验 - [ ] 是否正确释放new/malloc申请的内存 - [ ] 是否充分考虑接口的异常场景 - [ ] 是否正确记录错误日志 See merge request: Ascend/triton-ascend!1074 | 5 个月前 | |
Use symlinks for external plugins to fix TRITON_PLUGIN_DIRS (#6627) Disable the new backend installing logic for external plugins, since package_dir does not accept absolute paths. Instead, use a hybrid approach where in-tree backends are installed using the new logic and external backends are symlinked. This implies that source distributions cannot be created when using external plugins. Fixes #6612 ------ <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [x] This PR does not need a test because it touches build system only. - Select one of the following. - [x] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) | 1 年前 | |
feat: The main branch depends on triton==3.5.0 and does not support Python 3.9; modifying the pip installation command(triton-ascend 3.2.1) | 1 个月前 | |
Move this repo to github.com/triton-lang/triton-ascend | 1 个月前 | |
Move this repo to github.com/triton-lang/triton-ascend | 1 个月前 | |
Add RELEASE.md (#5896) Specify Release Compatibility Matrix, Release Cadence and Release Cherry-Pick Criteria --------- Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com> Co-authored-by: Keren Zhou <robinho364@gmail.com> | 1 年前 | |
fix doctools probleam | 2 个月前 | |
fix(docs): correct some documents Co-authored-by: KanuaK<zhouyihan1@huawei.com> # message auto-generated for no-merge-commit merge: !1665 merge fix/docs-fix into main fix(docs): correct some documents Created-by: KanuaK Commit-by: KanuaK Merged-by: ascend-robot Description: <!--- The core Triton is a small number of people, and we receive many PRs (thank you!). To help us review your code more quickly, **if you are a new contributor (less than 3 PRs merged) we ask that you complete the following tasks and include the filled-out checklist in your PR description.** Complete the following tasks before sending your PR, and replace [ ] with [x] to indicate you have done them. --> # New contributor declaration - [ ] I am not making a trivial change, such as fixing a typo in a comment. - [ ] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [ ] I have run pre-commit run --from-ref origin/main --to-ref HEAD. - Select one of the following. - [ ] I have added tests. - /test for lit tests - /unittest for C++ tests - /python/test for end-to-end tests - [ ] This PR does not need a test because FILL THIS IN. - Select one of the following. - [ ] I have not added any lit tests. - [ ] The lit tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.) See merge request: Ascend/triton-ascend!1665 | 2 个月前 | |
| 10 个月前 | ||
fix(docs): Improve install-deploy-readme jump configuration, add Docker parameter description and format adaptation Co-authored-by: xuweixin<xuweixin2@huawei.com> # message auto-generated for no-merge-commit merge: !1244 merge dev_DockerCannOptionAndInstallGuide into main fix(docs): Improve install-deploy-readme jump configuration, add Docker parameter description and format adaptation Created-by: xuweixin_ Commit-by: xuweixin Merged-by: ascend-robot Description: 1、Add CANN version selection for Docker-based installation; 2、update installation and usage instructions, adding quick installation and Docker-based installation methods; 3、correct the numpy version in requirements to 1.26.4 See merge request: Ascend/triton-ascend!1244 | 4 个月前 | |
fix: add nanobind>=2.4 in requirements_dev.txt Co-authored-by: candyhong<1102229410@qq.com> # message auto-generated for no-merge-commit merge: !65 merge release/3.5.x-upgrade-candy-dev into release/3.5.x-upgrade fix: add nanobind>=2.4 in requirements_dev.txt Created-by: candyhong Commit-by: candyhong Merged-by: candyhong Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## checklist <!-- [x] 表示选中 --> - [ ] 是否通过本地IDE对代码进行静态检查 - [ ] 是否通过本地IDE对代码进行格式化处理 - [ ] 是否进行空指针校验 - [ ] 是否进行返回值校验 - [ ] 是否正确释放new/malloc申请的内存 - [ ] 是否充分考虑接口的异常场景 - [ ] 是否正确记录错误日志 See merge request: jeshd/triton-ascend!65 | 2 个月前 | |
build(safe):Add safe compile opitions for libtriton.so libentryC.so Co-authored-by: wangzhanpeng5<wangzhanpeng5@huawei.com> # message auto-generated for no-merge-commit merge: !1535 merge 0402_main_safe_compile into main build(safe):Add safe compile opitions for libtriton.so libentryC.so Created-by: wangzhanpeng5 Commit-by: wangzhanpeng5 Merged-by: ascend-robot Description: To comply with the secure compilation option specifications BIND_NOW, Strip. Add safe compilation options for libtriton.so and libentryC.so. See merge request: Ascend/triton-ascend!1535 | 2 个月前 | |
feat: The main branch depends on triton==3.5.0 and does not support Python 3.9; modifying the pip installation command(triton-ascend 3.2.1) | 1 个月前 | |
fix: create reinterpret_cast with dynamic and static parameters. | 3 个月前 |
Triton Ascend 已经迁移到 triton-lang/triton-ascend。
如果你在这个仓库下有存量工作,请迁移到新的仓库。
当前仓库将被归档。
项目简介与价值主张
Triton-Ascend是面向昇腾平台构建的Triton编译框架,旨在让Triton代码能够在昇腾硬件上高效运行。
Triton是近几年来受到开发者青睐的Python化编译框架。开发者仅需关注Tile/Block的切分方式以及基于Tile/Block的运算逻辑,编译器将在Triton代码的编译过程中结合底层硬件特点自动完成内存分配、数据搬运、数据计算、流水并行等,因此,算子的开发难度大幅降低、开发效率显著提升。 Triton-Ascend将Triton编译栈适配到华为昇腾NPU上,在Triton的基础上提供一系列针对性的优化,使Triton代码能够编译后在昇腾硬件上高效运行。 目前,Triton-Ascend仍在持续完善中,我们将不断提升Triton Python API完备度、数据类型支持度、访存方式灵活性等,并持续优化编译器的自动优化能力,提升Triton-Ascend整体的功能与性能泛化性。
Triton-Ascend编译框架打通了Triton与昇腾硬件之间的壁垒,使熟悉Triton框架的开发者可以更有效率地使用昇腾NPU。它通过提供通用、高效的算子开发范式,为昇腾软件栈补齐了敏捷开发的关键一环,极大丰富了昇腾的算子库和上层应用生态。
最新动态与里程碑
当前版本:Triton-Ascend 3.2.1
配套CANN版本:昇腾CANN社区版9.0.0
2026年版本计划:升级Triton版本到Triton3.5
| 里程碑 | 重要特性更新情况 | 状态 |
|---|---|---|
| 2026.04.30 | Triton-Ascend 3.2.1 正式版本上线 | ✅ |
| 2026.01.20 | Triton-Ascend 3.2.0 正式版本上线 | ✅ |
| 2025.11.14 | Triton-Ascend 3.2.0rc4预发布版本上线: 扩展 tt.fp_to_fp 接口,新增对 FP8的类型转换支持 新增 scatter_ub_to_out 接口,支持从UB到GM的高效数据分散操作 |
✅ |
| 2025.09.30 | 完善Scan/Sort类Triton Python API,支持非连续访存,完成vLLM、sglang开源仓中重点Triton算子适配 | ✅ |
| 2025.09.19 | 支持Triton-Ascend nightly包提取 | ✅ |
| 2025.08.15 | 完善Atomic类Triton Python API支持,完成Flaggems开源仓重点Triton算子适配,提供Matmul等简单算子高性能实现参考用例 | ✅ |
| 2025.06.30 | 支持85% Triton Python API,支持连续访存,覆盖基本使用场景需求 | ✅ |
| 2025.05.20 | Triton-Ascend开源,Gitcode代码仓Alive! | ✅ |
性能
GroupGEMM 算子性能
选取GroupGEMM算子作为示例。展示Triton-Ascend与AscendC的性能对比。
- Y轴为加速比(
Speedup= AscendC_Duration_Time / Triton_Duration_Time) - 使用硬件为
Ascend 950系列 - 算子性能优化请参考算子调优指南:
支持范围
Triton-Ascend 在昇腾 AI 产品支持使用,具体型号如下:
| 产品系列 | 产品型号 |
|---|---|
| Atlas A3 训练系列产品 | Atlas 800T A3 超节点服务器 Atlas 900 A3 SuperPoD 超节点 A200T A3 Box8 超节点服务器 |
| Atlas A3 推理系列产品 | Atlas 800I A3 超节点服务器 |
| Atlas A2 训练系列产品 | Atlas 800T A2 训练服务器 Atlas 900 A2 PoD 集群基础单元 Atlas 200T A2 Box16 异构子框 |
| Atlas A2 推理系列产品 | Atlas 800I A2 推理服务器 Atlas 300I A2 推理卡 A200I A2 Box 异构组件 |
支持操作系统: Triton-Ascend 所支持的操作系统与 CANN 一致。请参考 CANN 官方文档,下载并安装适用于您操作系统的 CANN 版本。
CANN版本:
- 商用版
| Triton-Ascend版本 | CANN商用版本 | CANN发布日期 |
|---|---|---|
| 3.2.1 | CANN 9.0.0 | 2026/04/30 |
| 3.2.0 | CANN 8.5.0 | 2026/01/16 |
| 3.2.0rc4 | CANN 8.3.RC2 CANN 8.3.RC1 |
2025/11/20 2025/10/30 |
- 社区版
| Triton-Ascend版本 | CANN社区版本 | CANN发布日期 |
|---|---|---|
| 3.2.1 | CANN 9.0.0 | 2026/04/30 |
| 3.2.0 | CANN 8.5.0 | 2026/01/16 |
| 3.2.0rc4 | CANN 8.3.RC2 CANN 8.5.0.alpha001 CANN 8.3.RC1 |
2025/11/20 2025/11/12 2025/10/30 |
入门指引
常见问题
在使用Triton-Ascend时遇到的常见问题,详见 FAQ
安全声明
我们重视开发者在使用Triton-Ascend时的信息安全,安全防护建议与相关信息请见 安全声明
许可证信息
本项目代码与文档均采用 MIT许可证
社区与贡献
欢迎参与Triton-Ascend的开发及代码贡献,详情请参阅 贡献指南