torch_npu

Installation
SKILL.md

torch_npu 能力与使用指引

何时使用本 Skill

  • 用户 @torch_npu、提到昇腾 NPU、CANN、Ascend、或 PyTorch 在 NPU 上运行。
  • 用户需要 环境检查/部署:检查或部署 PyTorch、检查环境是否支持 NPU。
  • 用户使用 @torch_npu_doc 时:基于本 skill 的 reference.md 提供项目内中文文档能力说明与操作步骤。
  • 用户需要 NPU 格式转换的代码提示:书写或补全 torch_npu.npu_format_castnpu_format_cast_torch_npu.Formatget_npu_format 时,按 §2.1 子能力提供参数与枚举提示;若不理解该功能,可建议通过本 skill 的 MCP 抓取版本文档辅助说明。

1. 环境检查与部署

1.1 自动检查 PyTorch 与 NPU 环境

在回答或生成脚本时,按需执行或建议用户执行以下检查:

检查 PyTorch 与 Python 版本是否在配套范围内(参见 README.zh.md 中的「PyTorch与Python版本配套表」):

Installs
48
GitHub Stars
93
First Seen
Mar 1, 2026
torch_npu — ascend-ai-coding/awesome-ascend-skills