diff --git a/.gitmodules b/.gitmodules index cfee595d..e2cc60ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -15,3 +15,7 @@ path = _repos/vllm-ascend url = https://github.com/vllm-project/vllm-ascend.git branch = main +[submodule "_repos/triton-ascend"] + path = _repos/triton-ascend + url = https://gitcode.com/Ascend/triton-ascend.git + branch = main diff --git a/Makefile b/Makefile index 92be3a63..2e550ed4 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ PROJECT_CONFIGS = \ _repos/VeOmni/docs:sources/VeOmni \ _repos/LLaMA-Factory/docs:sources/LLaMA-Factory \ _repos/ms-swift/docs:sources/ms-swift \ - _repos/vllm-ascend/docs/source:sources/vllm-ascend # vllm-ascend 文档根在 docs/source/ 下 + _repos/vllm-ascend/docs/source:sources/vllm-ascend \ + _repos/triton-ascend/docs/zh:sources/triton-ascend # Configure all subprojects generated path GENERATED_DOCS := sources/_generated @@ -69,7 +70,7 @@ copy-docs: init-submodules @echo "Preparing generated docs directory..." @mkdir -p $(GENERATED_DOCS) - # vllm-ascend: 仅删除根 index(避免与 sources/vllm-ascend/index.rst 冲突), + # vllm-ascend / triton-ascend: 仅删除根 index(避免与 sources//index.rst 冲突), # 保留子目录 index(如 tutorials/models/index.md)供 toctree 直接引用。 # 其他社区: 递归删除所有 index,导航由各社区 sources//index.rst 独立定义。 @echo "Copying project documentation..." @@ -82,7 +83,7 @@ copy-docs: init-submodules mkdir -p $$dst; \ echo "Copying $$src to $$dst"; \ cp -r "$$src"/* "$$dst"/ 2>/dev/null || echo " [WARN] Source directory does not exist or is empty: $$src"; \ - if [ "$$rel_dst" = "sources/vllm-ascend" ]; then \ + if [ "$$rel_dst" = "sources/vllm-ascend" ] || [ "$$rel_dst" = "sources/triton-ascend" ]; then \ rm -f "$$dst/index.md" "$$dst/index.rst" "$$dst/index.html" 2>/dev/null || true; \ else \ find "$$dst" -name 'index.*' -delete 2>/dev/null || true; \ diff --git a/_repos/LLaMA-Factory b/_repos/LLaMA-Factory index 9e7cf341..4d8b23ac 160000 --- a/_repos/LLaMA-Factory +++ b/_repos/LLaMA-Factory @@ -1 +1 @@ -Subproject commit 9e7cf3413b04a7deb078fe75c1c87e9dc58e6eb8 +Subproject commit 4d8b23ace1cbb4c7ea57a9ac455b3c16ba348ed8 diff --git a/_repos/VeOmni b/_repos/VeOmni index 3868ebb5..06f4d87b 160000 --- a/_repos/VeOmni +++ b/_repos/VeOmni @@ -1 +1 @@ -Subproject commit 3868ebb5e5fb366c7153d1654f9d2dfc0635c2be +Subproject commit 06f4d87be83514d2e4f01fe20115cd693f691894 diff --git a/_repos/ms-swift b/_repos/ms-swift index a8cc2341..b59a105e 160000 --- a/_repos/ms-swift +++ b/_repos/ms-swift @@ -1 +1 @@ -Subproject commit a8cc234140773dfe3301a6611edcba5c5b396373 +Subproject commit b59a105ec77a974b1839175c9b416f6ddc7988f9 diff --git a/_repos/verl b/_repos/verl index 77476af8..7402ca73 160000 --- a/_repos/verl +++ b/_repos/verl @@ -1 +1 @@ -Subproject commit 77476af84cc074edf5a6437f8d5ea418d7a54916 +Subproject commit 7402ca73bcf2b85b5337393b4ccc9ec45ea96b6d diff --git a/_repos/vllm-ascend b/_repos/vllm-ascend index 2916601e..55c68007 160000 --- a/_repos/vllm-ascend +++ b/_repos/vllm-ascend @@ -1 +1 @@ -Subproject commit 2916601e6c0705cb147387409c679cceab5c3ce9 +Subproject commit 55c680073d07ee65b6683bf5b49039141089a877 diff --git a/_static/images/triton-ascend.png b/_static/images/triton-ascend.png new file mode 100644 index 00000000..fbfe7adf Binary files /dev/null and b/_static/images/triton-ascend.png differ diff --git a/conf.py b/conf.py index ff00b91b..0adb6969 100644 --- a/conf.py +++ b/conf.py @@ -229,6 +229,31 @@ def generate_api_doc(): }, } }, + 'triton-ascend': { + 'display_name': 'Triton-Ascend', + 'sidebar_mapping': { + 'migration_guide': 'Triton 算子迁移指南', + 'examples': '典型算子样例', + 'debug_guide': '算子调试与调优', + 'triton_api': 'Triton API 接口说明', + 'triton_api_extention': '昇腾扩展 API 接口说明', + 'quick_start_group': '快速开始', + 'install_group': '安装指南', + 'arch_group': '架构设计与核心特性', + 'dev_guide_group': 'Triton 算子开发指南', + 'env_group': '环境变量', + 'faq_group': '常见问题', + '__root_files__': { + 'quick_start': 'quick_start_group', + 'installation_guide': 'install_group', + 'architecture_design_and_core_features': 'arch_group', + 'programming_guide': 'dev_guide_group', + 'environment_variable_reference': 'env_group', + 'FAQ': 'faq_group', + 'release_note': 'faq_group', + }, + } + }, } } diff --git a/index.rst b/index.rst index 703d92e7..74d06acd 100644 --- a/index.rst +++ b/index.rst @@ -266,6 +266,18 @@ +

⚙️ 算子开发与编程

+
+ + +
+

Triton-Ascend

+

适配昇腾 NPU 的 Triton 语言后端,支持高性能算子开发与迁移。

+ +
+ +
+

🎨 多模态应用、评测与工具

@@ -382,6 +394,13 @@ sources/torchchat/index.rst sources/vllm-ascend/index.rst +.. toctree:: + :maxdepth: 1 + :hidden: + :caption: ⚙️ 算子开发与编程 + + sources/triton-ascend/index.rst + .. toctree:: :maxdepth: 1 :hidden: diff --git a/sources/triton-ascend/index.rst b/sources/triton-ascend/index.rst new file mode 100644 index 00000000..b4490462 --- /dev/null +++ b/sources/triton-ascend/index.rst @@ -0,0 +1,209 @@ +Triton-Ascend +============================================ + +.. raw:: html + + + +
+ +
+ Triton-Ascend Logo +

Triton-Ascend

+

+ 适配昇腾 NPU 的 Triton 语言后端 · 高性能算子开发与迁移 +

+ +
+ +

🚀 快速开始

+ + +
+

✨ 核心特性

+
+ 🔌 昇腾 NPU 后端适配 + 🧩 丰富算子样例 + 🔧 调试与性能调优工具 + 🤝 完整 API 参考 +
+
+ +
+ +---- + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: 快速开始 + + ../_generated/sources/triton-ascend/quick_start + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: 安装指南 + + ../_generated/sources/triton-ascend/installation_guide + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: 架构设计与核心特性 + + ../_generated/sources/triton-ascend/architecture_design_and_core_features + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: Triton 算子开发指南 + + ../_generated/sources/triton-ascend/programming_guide + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: Triton 算子迁移指南 + + ../_generated/sources/triton-ascend/migration_guide/architecture_difference + ../_generated/sources/triton-ascend/migration_guide/migrate_from_gpu + ../_generated/sources/triton-ascend/migration_guide/performance_guidelines + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: 典型算子样例 + + ../_generated/sources/triton-ascend/examples/index + ../_generated/sources/triton-ascend/examples/01_vector_add_example + ../_generated/sources/triton-ascend/examples/02_fused_softmax_example + ../_generated/sources/triton-ascend/examples/03_layer_norm_example + ../_generated/sources/triton-ascend/examples/04_fused_attention_example + ../_generated/sources/triton-ascend/examples/05_matrix_multiplication_example + ../_generated/sources/triton-ascend/examples/06_autotune_example + ../_generated/sources/triton-ascend/examples/07_accuracy_comparison_example + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: 算子调试与调优 + + ../_generated/sources/triton-ascend/debug_guide/debugging + ../_generated/sources/triton-ascend/debug_guide/profiling + +.. toctree:: + :maxdepth: 3 + :hidden: + :caption: Triton API 接口说明 + + ../_generated/sources/triton-ascend/triton_api/index + ../_generated/sources/triton-ascend/triton_api/triton/index + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: 昇腾扩展 API 接口说明 + + ../_generated/sources/triton-ascend/triton_api_extention/index + +.. toctree:: + :maxdepth: 1 + :hidden: + :caption: 环境变量 + + ../_generated/sources/triton-ascend/environment_variable_reference + +.. toctree:: + :maxdepth: 1 + :hidden: + :caption: 常见问题 + + ../_generated/sources/triton-ascend/FAQ + ../_generated/sources/triton-ascend/release_note diff --git a/sources/verl/index.rst b/sources/verl/index.rst index ecd91308..4226ed9b 100644 --- a/sources/verl/index.rst +++ b/sources/verl/index.rst @@ -121,8 +121,6 @@ verl

✨ 核心特性

🧬 多样化 RL 算法
-
🔗 无缝框架集成
-
📊 灵活设备映射
业界领先吞吐量
🤗 HuggingFace 集成
🎯 昇腾 NPU 支持
diff --git a/sources/vllm-ascend/index.rst b/sources/vllm-ascend/index.rst index 01ca4173..7eba58f2 100644 --- a/sources/vllm-ascend/index.rst +++ b/sources/vllm-ascend/index.rst @@ -60,7 +60,7 @@ vLLM-Ascend display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; } .va-feature-tag { - display: inline-flex; align-items: center; gap: 6px; + display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: white; border: 1px solid var(--va-border); border-radius: 20px; padding: 8px 18px; font-size: 0.9rem; color: var(--va-text-main); transition: all 0.3s ease;