Triton Operator Env Config logo

Triton Operator Env Config

Organization
Ascend
triton-operator-env-config

在 Ascend 昇腾平台上校验并构建triton算子开发所需环境,包括CANN、Python/torch/torch_npu/triton-ascend依赖和PATH环境变量等设置。当用户需要配置triton算子开发环境、检查CANN/torch/triton-ascend安装、验证环境是否可用时使用。

Overview

PublisherAscend
Repositoryagent-skills
Skill nametriton-operator-env-config
Stars
54
Forks
4
Bundled files
1
LicenseMulanPSL-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Ascend on GitHub. Read the source before you install it.

Installation

Install the Triton Operator Env Config AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Ascend/agent-skills/tree/master/skills/triton-operator-env-config
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Ascend/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/triton-operator-env-config .claude/skills/triton-operator-env-config
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Triton Operator Env Config in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Triton Operator Env Config on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Triton Operator Env Config is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Triton 算子开发环境配置

核心原则

必须按顺序执行环境检查,每个步骤依赖前一步的成功。

前置步骤:获取最新配套要求(MANDATORY)

配套版本可能更新,必须先获取官方最新文档。

MANDATORY - READ ENTIRE PAGE:访问并完整阅读官方在线文档 https://triton-ascend.readthedocs.io/zh-cn/latest/quick_start.html 和 https://triton-ascend.readthedocs.io/zh-cn/latest/installation_guide.html,获取最新的:

  • Python 版本要求
  • torch / torch_npu 版本要求
  • triton-ascend 版本要求
  • CANN 版本要求
  • 各组件版本对应关系

以文档中的版本要求为准,更新后续步骤中的版本号。

以下版本对应关系仅供参考(截止 2026-03-26),以在线文档为准:

Triton-Ascend 版本CANN 版本发布日期
3.2.08.5.0(推荐)2026/01/16
3.2.0rc48.3.RC22025/11/20

torch_npu 版本(仅供参考):2.7.1

⚠️ 如果在线文档中的版本与上表不一致,必须以在线文档为准。

环境检查与配置流程

1. CANN 环境配置(第一步)

必须最先检查 CANN 环境

  1. 执行npu-smi info,检查是否成功加载驱动
  2. 再执行which bisheng,检查是否成功加载CANN环境获取到npuir编译器,应该输出路径
  3. 如果没有输出,尝试加载 CANN 环境:
    • 优先:source /usr/local/Ascend/cann/set_env.sh
    • 备选:source /usr/local/Ascend/ascend-toolkit/set_env.sh
  4. 再次执行第1步和第2步检查,如果不成功,需要等待用户去检查解决CANN的环境配置,可以提醒去https://www.hiascend.com/cann/download 上下载安装CANN

2. Python 版本检查

如果遇到python问题,最优先使用miniconda创建环境解决

  1. 检查当前 python 的路径:which python3
  2. 若失败尝试执行:export PATH="/usr/bin:$PATH"
  3. 再次执行第1步检查,如果不成功,则需要提醒用户安装python,安装方式优先使用下面miniconda的方法
  4. 如果存在python3,检查python版本:python3 --version,以官方 quick_start.md 文档中的要求为准

3. Python 环境安装(按需)

  1. 如果用户需要安装python环境,先使用conda init bash检查是否有conda环境,有则跳转第5步,如果没有则执行第2步安装
  2. 执行uname -m确认当前系统架构 如果系统架构为aarch64,执行:wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh 如果系统架构为x86_64,执行:wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  3. 执行安装脚本:bash Miniconda3-latest-Linux-x86_64.sh或bash Miniconda3-latest-Linux-aarch64.sh,按照提示安装后激活miniconda环境
  4. 检查是否成功安装miniconda环境:conda init bash
  5. 创建一个python环境,执行:conda create -n triton python=<官方要求版本>
  6. 激活python环境,执行:conda activate triton

4. torch 配置

必须保证前面的步骤都成功

  1. 执行:pip list | grep "torch"
  2. 检查 torch / torch_npu 版本,以官方文档中的要求为准
  3. 如果版本不符合要求,按文档中的版本安装:
    • 先安装 torch:pip install torch==<官方要求版本>
    • 若报错 ERROR: No matching distribution found for torch==2.7.1+cpu,尝试:
      bash
      pip install torch==2.7.1+cpu --index-url https://download.pytorch.org/whl/cpu
    • 再安装 torch_npu:pip install torch_npu==<官方要求版本>
  4. 检查torch环境是否配置成功:python3 -c "import torch; print(torch.__version__)"
  5. 运行一个简单的torch代码,检查是否成功加载npu设备:python3 -c "import torch; a = torch.randn(2, 3); print(a)",应该输出类似结果:tensor([[2.86, 1.0406, 1.5811], [0.8329, 1.0024, 1.3639]])

5. triton-ascend 配置

  1. 执行:pip list | grep "triton"
  2. 社区 Triton 和 Triton-Ascend 不能同时存在:
    • 如果安装了原生的 triton,必须先卸载:pip uninstall triton
    • 如果同时安装了 triton-ascend,也需要先卸载,再重新安装
  3. 安装最新的 triton-ascend 包:pip install triton-ascend
  4. 如需安装 nightly 版本,参考:https://triton-ascend.readthedocs.io/zh-cn/latest/installation_guide.html#nightly-build

环境验证(MANDATORY)

用于确认当前终端环境可以正常执行triton算子。

MANDATORY - READ ENTIRE FILE:在执行验证前,必须完整阅读 scripts/01-vector-add.py。

执行验证:

bash
python3 <skill-dir>/scripts/01-vector-add.py

执行该算子样例后,如出现类似结果则表明其计算符合预期,difference为0.0则视为验证通过:

tensor([0.8329, 1.0024, 1.3639,  ..., 1.0796, 1.0406, 1.5811], device='npu:0')
tensor([0.8329, 1.0024, 1.3639,  ..., 1.0796, 1.0406, 1.5811], device='npu:0')
The maximum difference between torch and triton is 0.0

故障处理

现象动作
torch 安装失败:No matching distribution found for torch==2.7.1+cpu尝试从 PyTorch 官方源安装:pip install torch==2.7.1+cpu --index-url https://download.pytorch.org/whl/cpu
同时安装了原生 triton 和 triton-ascend先卸载原生 triton:pip uninstall triton,再重新安装 triton-ascend
找不到 C++ compiler安装编译器:apt-get install g++
需要从源码编译时缺少依赖安装系统库:sudo apt install zlib1g-dev clang-15 lld-15(推荐 clang >= 15, lld >= 15)
已按上表重试仍失败保留完整终端报错与已执行的命令序列,便于本地或后续排查

反模式清单(NEVER)

  • ❌ 跳过阅读官方在线文档获取最新配套要求
  • ❌ 跳过 CANN 环境检查直接配置 Python
  • ❌ 使用不符合官方要求的 Python / torch 版本
  • ❌ 同时安装原生 triton 和 triton-ascend
  • ❌ 不进行环境验证就开始开发
  • ❌ 在不同终端会话中分步执行(必须在同一终端)

检查清单

  • 已阅读官方在线文档获取最新配套要求?
  • CANN 环境加载成功(npu-smi info 和 which bisheng 有输出)?
  • Python 版本符合官方要求?
  • torch / torch_npu 版本符合官方要求?
  • triton-ascend 已安装(原生 triton 已卸载)?
  • 环境验证通过(01-vector-add.py 运行成功)?

注意事项

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Triton Operator Env Config AI skill do?

在 Ascend 昇腾平台上校验并构建triton算子开发所需环境,包括CANN、Python/torch/torch_npu/triton-ascend依赖和PATH环境变量等设置。当用户需要配置triton算子开发环境、检查CANN/torch/triton-ascend安装、验证环境是否可用时使用。

Why use Triton Operator Env Config on TypingMind?

Because you install it once and use it with any model. Triton Operator Env Config is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Triton Operator Env Config in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Ascend/agent-skills/tree/master/skills/triton-operator-env-config. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Triton Operator Env Config?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Triton Operator Env Config?

As many as you like. As long as a model supports skills, you can use Triton Operator Env Config with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Triton Operator Env Config AI skill free?

Yes. It is published on GitHub by Ascend under the MulanPSL-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇