Files
TorchNPU/docker/OVERVIEW.md
T
mengmeizi05 b04c1b39c2 docs: Updated the image tag in the overview to the latest version (26.1.0), while retaining the overview for the older version (26.0.0) for reference.
Co-authored-by: s50057208<shiyunhan1@huawei.com>



# message auto-generated for no-merge-commit merge:
!43039 merge master_overview26.1.0 into master

docs: Updated the image tag in the overview to the latest version (26.1.0), while retaining the overview for the older version (26.0.0) for reference.

Created-by: mengmeizi05
Commit-by: s50057208
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->

# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>

- [ ] 需求
- [ ] 问题单
- [x] issue/工单
- [ ] 重构优化
- [ ] 资料更新

# 【修改方案】
更新到26.1.0新版本tag
保留26.0.0老版本tag的文件

# 【资料变更】
涉及OVERVIEW的新版tag变更

# 【接口变更】
> 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及”

# 【功能验证】
> 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\
> 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图

# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

- [x] 代码注释完备,正确记录错误日志
- [x] 代码实现进行了返回值、空指针等校验
- [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等
- [x] PR持续集成流水线(CI)执行通过,代码检查无异常


See merge request: Ascend/pytorch!43039
2026-08-18 11:26:38 +08:00

9.6 KiB

TorchNPU

English | 中文

Quick Reference


TorchNPU

The plugin is a deep learning adaptation framework based on Atlas, enabling Atlas NPUs to support the PyTorch framework and providing users of the PyTorch framework with the powerful computing power of Atlas AI processors.


Supported Tags and Dockerfile Usage

Tag Specification

Tags follow the format:

<TorchNPU_version>-<CANN_version>-<chip>-<os>-<python_version>
Field value Description
TorchNPU Version 2.12.0 For details, see the version notes in the readme.
CANN_version 9.1.0 For details, see the version notes in the readme.
Chip Specific example values can be found in the CANN mirror chip model identifier
OS ubuntu22.04 / openeuler24.03 OS distribution used for the base image
Python Version py3.12 Major Python version pre-installed in the image

Tag(26.1.0)

  • 2.12.0-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.12.0-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.12.0-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.12.0-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.12.0-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.12.0-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.12.0-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.12.0-cann9.1.0-950-openeuler24.03-py3.12
  • 2.11.0-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.11.0-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.11.0-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.11.0-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.11.0-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.11.0-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.11.0-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.11.0-cann9.1.0-950-openeuler24.03-py3.12
  • 2.10.0.post4-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.10.0.post4-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.10.0.post4-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.10.0.post4-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.10.0.post4-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.10.0.post4-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.10.0.post4-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.10.0.post4-cann9.1.0-950-openeuler24.03-py3.12
  • 2.9.0.post6-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.9.0.post6-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.9.0.post6-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.9.0.post6-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.9.0.post6-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.9.0.post6-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.9.0.post6-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.9.0.post6-cann9.1.0-950-openeuler24.03-py3.12
  • 2.7.1.post8-cann9.1.0-310p-ubuntu22.04-py3.12
  • 2.7.1.post8-cann9.1.0-310p-openeuler24.03-py3.12
  • 2.7.1.post8-cann9.1.0-910b-ubuntu22.04-py3.12
  • 2.7.1.post8-cann9.1.0-910b-openeuler24.03-py3.12
  • 2.7.1.post8-cann9.1.0-a3-ubuntu22.04-py3.12
  • 2.7.1.post8-cann9.1.0-a3-openeuler24.03-py3.12
  • 2.7.1.post8-cann9.1.0-950-ubuntu22.04-py3.12
  • 2.7.1.post8-cann9.1.0-950-openeuler24.03-py3.12

Tag information for version 26.0.0

Dockerfile build parameters

See dockerfile:dockerfile

parameters Description Required Reference Source Value
TORCH_VERSION Full TorchNPU version number Yes TorchNPU repo releases 2.12.0
CHIP_ARCH chip architecture identifier Yes CANN image tag rules Specific example values can be found in the CANN mirror
OS Base image operating system Yes CANN image tag rules ubuntu / openeuler
OS_VERSION Operating system version Yes CANN image tag rules 22.04 / 24.03
PY_VERSION Python version pre-installed in base image Yes CANN image tag rules 3.11
CANN_VERSION CANN toolkit version Yes CANN base image repo 9.1.0
ARCH Host hardware architecture Yes Environment hardware arm / x86
PY_TAG Python package ABI tag (cp + version number) Yes Strictly match PY_VERSION cp311
TORCH_NPU_RELEASE_VERSION Official TorchNPU release tag (including PyTorch version) Yes TorchNPU repo releases v26.1.0-pytorch2.12.0
TORCH_NPU_PATCH_TAG TorchNPU version number in the release package name Yes TorchNPU repo releases 2.12.0
MANYLINUX_VER PyPI package compatible system version No torch official wheel spec manylinux_2_28
PIP_MIRROR_URL pip installation source URL (Tsinghua mirror by default) No PyPI mirror sources https://pypi.tuna.tsinghua.edu.cn/simple

Parameter Sources

  1. Image tags, operating systems, and version information:CANN Base Image Repository tag

  2. TORCH_NPU_RELEASE_VERSION and TORCH_NPU_PATCH_TAG parameter values are from TorchNPU Official Release Versions. Example with a wheel download URL:

https://gitcode.com/Ascend/pytorch/releases/download/v26.1.0-pytorch2.12.0/torch_npu-2.12.0-cp310-cp310-manylinux_2_28_aarch64.whl

  • TORCH_NPU_RELEASE_VERSION is the part between download/ and /torch_npu-, e.g. v26.1.0-pytorch2.12.0.
  • TORCH_NPU_PATCH_TAG is the part between torch_npu- and -cp310, e.g. 2.12.0.

Quick Start

Build TorchNPU Image

Taking the construction of the 2.12.0-a3-ubuntu22.04-py3.12 image as an example:

docker build \
  --build-arg CHIP_ARCH=a3 \
  --build-arg OS=ubuntu \
  --build-arg OS_VERSION=22.04 \
  --build-arg PY_VERSION=3.11 \
  --build-arg CANN_VERSION=9.1.0 \
  --build-arg ARCH=arm \
  --build-arg PY_TAG=cp311 \
  --build-arg TORCH_NPU_RELEASE_TAG=v26.1.0-pytorch2.12.0 \
  --build-arg TORCH_NPU_PATCH_TAG=2.12.0 \
  -t image_name:tag \
  -f Dockerfile .

Note: If your build environment requires a proxy, pass proxy variables via --build-arg, for example:

docker build \
  --build-arg HTTP_PROXY=http://proxy.example.com:8080 \
  --build-arg HTTPS_PROXY=http://proxy.example.com:8080 \
  --build-arg NO_PROXY=localhost,127.0.0.1 \
  ... \
  -f Dockerfile .

Replace the proxy address and port with your actual environment values.

Run TorchNPU Container

docker run \
    --name pta_container \
    --device /dev/davinci1 \
    --device /dev/davinci_manager \
    --device /dev/devmm_svm \
    --device /dev/hisi_hdc \
    -v /usr/local/dcmi:/usr/local/dcmi \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \
    -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \
    -v /etc/ascend_install.info:/etc/ascend_install.info \
    -it ascend/pta:tag bash

Secondary Development

# Use TorchNPU image as base image and add user software
FROM quay.io/ascend/torch-npu:2.12.0-cann9.0.0-910b-ubuntu22.04-py3.12 

RUN apt update -y && \
    apt install gcc ...

...

Supported Hardware

Product Examples Architecture
Atlas 800T A2, Atlas 900 A2 PoD ARM64 / x86_64
Atlas 800T A3 ARM64 / x86_64
Atlas 300I Pro, Atlas 300V Pro ARM64 / x86_64

License/Disclaimer

See the license information for TorchNPU included in these images.

Like all container images, pre-installed software packages (Python, system libraries, etc.) may be subject to their own licenses.

The released Ascend software images are community versions; they are not intended for commercial use and serve solely as references for production practices.

Liability disclaimers are displayed in the image startup information and on the Ascend image platform.