TorchNPU
English | 简体中文
Brief Introduction
As a core component of the Ascend for PyTorch community, TorchNPU is a deep learning adaptation plug-in developed by Ascend for PyTorch. It enables the PyTorch framework to directly invoke the Ascend NPU and provide developers with the powerful computing power of the Ascend AI processor.
Ascend provides full-stack AI computing infrastructure for industry applications and services based on Huawei Ascend processors and software. You can visit the Ascend Community to learn more about Ascend.
Directory structure
The key directories are as follows:
├─ci #Continuous integration script directory
├─cmake #CMake build configuration directory
├─torch_npu #Core Adaptation Directory
│ ├─csrc/ #Bottom Core Directory
│ ├─npu/ #NPU Interface Directory
│ ├─distributed/ #Distributed training adaptation directory
│ ├─asd/ #Ascend debug tool directory
├─docs #Project Document Directory
├─examples #Sample Directory
├─torchnpugen/ #Code generation module directory.
└─test #Test Directory
Version Description
The version description of the TorchNPU includes version mapping, version compatibility, and updates. For details, see theVersion Description.
Environment Deployment
For details about how to install the TorchNPU plug-in, see the Install the software.".
Quick Start
This section uses the CNN model as an example to describe how to migrate it to the Ascend NPU for training. For details, see Quick Start.
Feature Description
The TorchNPU plug-in provides a series of unique features in terms of memory resource optimization, communication performance optimization, computing performance optimization, and error locating assistance. For details, see the Framework Features.
API Reference
- For details about the native PyTorch APIs supported by Ascend NPUs, see the Native API.
- The TorchNPU plug-in provides some customized APIs. For details, see the Custom API.
Branch Maintenance Policy
For details about the maintenance policies of the TorchNPU version, see the Maintenance Intervals for the TorchNPU.
PyTorch Version Maintenance Policy
For details about the version maintenance policy of the TorchNPU, see the Branch Support Matrix.
Contribution guidance
Describes how to contribute code to the Torch NPU plug-in library, as described in Contribution Guide.
Contact us
You are welcome to contribute to the community. If you have any questions or suggestions, please submit GitCode Issues We'll get back to you as soon as we can. Thank you for your support.
Safety Statement
For details about system security hardening, user suggestions, and file permission control for the TorchNPU, see the Safety Statement.
Disclaimer
To TorchNPU plug-in users
-
This plug-in is for debugging and development only. You must bear the risks and understand the following:
- Data processing and deletion: The data generated during the use of this plug-in is the user's responsibility. You are advised to delete related data in a timely manner after using the data to prevent information leakage.
- Data confidentiality and dissemination: Users understand and agree not to send or disseminate the data generated through this plug-in at will. This plug-in and its developers are not responsible for any information leakage, data leakage, or other adverse consequences arising therefrom.
- User input security: Users must ensure the security of the entered command lines and bear any security risks or losses caused by improper input. This plug-in and its developers are not responsible for any problems caused by improper command line input.
-
Scope of Disclaimer: This disclaimer applies to all individuals or entities using this plug-in. By using this plug-in, you agree to and accept the content of this statement and are willing to bear the risks and responsibilities arising from the use of this function. If you have any objection, please stop using this plug-in.
-
Read and understand the disclaimer before using this tool. For any questions or questions arising from the use of this plug-in, please contact the developer.
License
License for the TorchNPU plug-in. For details, see.LICENSEFile.
Acknowledgment
Thank you for every PR from the community, welcome to contribute TorchNPU plug-in!
Release files for torch-npu 2.7.1.post10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 363.1 MB
Release files / torch_npu-2.7.1.post10-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | torch_npu-2.7.1.post10-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 37.7 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9d660fbe1dbf35b2e409d4b814709f9397c12288ea850137280b3af5d969914d
|
|
BLAKE2b-256 checksum How to use checksums |
3d219940961c067becc04606b75e21ba9addc021b21f3f115c69dd696ecb4ec6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp313-cp313-manylinux_2_28_aarch64.whl
| Download URL | torch_npu-2.7.1.post10-cp313-cp313-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 34.8 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
cd2c18e2a559c5f08047142438bcdf1bd60f887ebd9ba6cfc853e8862883eb2b
|
|
BLAKE2b-256 checksum How to use checksums |
bbd68e3f741fa3236b16f9b90f3b53347b09ac10b1d4a98bba3e613975d7dfc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | torch_npu-2.7.1.post10-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 37.7 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
483889da4883ba22f10c49f17732b6833a45f670d64f007985f6b7e8d848ad26
|
|
BLAKE2b-256 checksum How to use checksums |
657486e97d09625c620ccc30d593897620965445bd44059d2583418e04812858
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp312-cp312-manylinux_2_28_aarch64.whl
| Download URL | torch_npu-2.7.1.post10-cp312-cp312-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 34.8 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
db8b83702bf5f6f2995bc42e6f799f84783eba8022125fb628240ce27c5abab2
|
|
BLAKE2b-256 checksum How to use checksums |
8825362474808dee721cf8c4936f0dd7d7b11b9d86412b641201e88b4982e8b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | torch_npu-2.7.1.post10-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 37.8 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2005fb93ca291e0db5cbd9815661eaa77750a2a6b96632ad786a9533a1a316cb
|
|
BLAKE2b-256 checksum How to use checksums |
5118059ec9c5147d16a9ad42d0aa30b7bf764829e17f5c5ce0af52103d2007f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp311-cp311-manylinux_2_28_aarch64.whl
| Download URL | torch_npu-2.7.1.post10-cp311-cp311-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 34.9 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
fb32af6d50247f03c7530de4b6f0bbc0102be7376bb0fb25877fd3b8b045bd5b
|
|
BLAKE2b-256 checksum How to use checksums |
ef8c5dcec7d2eea98cdba1ac51d901c202b3ddfacb2df2b8e2cae091a8403ffc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | torch_npu-2.7.1.post10-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 37.8 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
cc99358dde9b6648ac98945542692c3fa55f9dfe4cd335a52485b07c79286d1b
|
|
BLAKE2b-256 checksum How to use checksums |
b4d615975f3bc080ab11e119b1a1f4e5aca6e09848752cd4f22d31cb7f6f602b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp310-cp310-manylinux_2_28_aarch64.whl
| Download URL | torch_npu-2.7.1.post10-cp310-cp310-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 34.9 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
6c7ce3f20341873b899b391c0cdb153b5ce600be2310b0d9ec660095f406216f
|
|
BLAKE2b-256 checksum How to use checksums |
c4ba9211dd466cda0aa67758e0eef893505e3a85b91300eeb70247ba9607e39f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp39-cp39-manylinux_2_28_x86_64.whl
| Download URL | torch_npu-2.7.1.post10-cp39-cp39-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 37.8 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b91d20e072df7d803a45ae4047104cf001e1d11d59454db21b0e5bff7af66956
|
|
BLAKE2b-256 checksum How to use checksums |
74e28df3f8592598eea1a5ec18c125c9d22b5d0801b84987c936319be56d59f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / torch_npu-2.7.1.post10-cp39-cp39-manylinux_2_28_aarch64.whl
| Download URL | torch_npu-2.7.1.post10-cp39-cp39-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 34.9 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
fca02a68015ea06976f51fbf846b05b03ff9205c03f2d061b244b759f753787c
|
|
BLAKE2b-256 checksum How to use checksums |
d12659b82528df9aa04d0f6d24919607c56fd87e85991e0b589d4618a8f463c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|