Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b1cc5ea2c | ||
|
|
ad99d6c22f |
@@ -19,13 +19,13 @@ Install **PyTorch** through pip.
|
||||
**For Aarch64:**
|
||||
|
||||
```bash
|
||||
pip3 install torch==2.1.0
|
||||
pip3 install torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu
|
||||
```
|
||||
|
||||
**For x86:**
|
||||
|
||||
```bash
|
||||
pip3 install torch==2.1.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
||||
pip3 install torch==2.11.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
||||
```
|
||||
|
||||
2. **Install torch-npu dependencies**
|
||||
@@ -39,31 +39,29 @@ pip3 install setuptools
|
||||
|
||||
If the installation fails, use the download link or visit the [PyTorch official website](https://pytorch.org/) to download the installation package of the corresponding version.
|
||||
|
||||
| OS arch | Python version | link |
|
||||
|---------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| x86 | Python3.8 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0%2Bcpu-cp38-cp38-linux_x86_64.whl#sha256=9e5cfd931a65b38d222755a45dabb53b836be31bc620532bc66fee77e3ff67dc) |
|
||||
| x86 | Python3.9 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0%2Bcpu-cp39-cp39-linux_x86_64.whl#sha256=86cc28df491fa84738affe752f9870791026565342f69e4ab63e5b935f00a495) |
|
||||
| x86 | Python3.10 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0%2Bcpu-cp310-cp310-linux_x86_64.whl#sha256=5077921fc2b54e69a534f3a9c0b98493c79a5547c49d46f5e77e42da3610e011) |
|
||||
| x86 | Python3.11 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0%2Bcpu-cp311-cp311-linux_x86_64.whl#sha256=5954924ce74bc7e6a6c811e3fa4bdda9936d9889f6369fd068420c444bfd1cae) |
|
||||
| aarch64 | Python3.8 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl#sha256=761822761fffaa1c18a62c5deb13abaa780862577d3eadc428f1daa632536905) |
|
||||
| aarch64 | Python3.9 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl#sha256=de7d63c6ecece118684415a3dbd4805af4a4c1ee1490cccf7405d8c240a481b4) |
|
||||
| aarch64 | Python3.10 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl#sha256=a04a0296d47f28960f51c18c5489a8c3472f624ec3b5bcc8e2096314df8c3342) |
|
||||
| aarch64 | Python3.11 | [link](https://download.pytorch.org/whl/cpu/torch-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl#sha256=8132efb782cd181cc2dcca5e58effbe4217cdb2581206ac71466d535bf778867) |
|
||||
| OS arch | Python version | link |
|
||||
|---------|----------------|-------------------------------------------|
|
||||
| x86 | Python3.10 | [link](https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp310-cp310-manylinux_2_28_x86_64.whl) |
|
||||
| x86 | Python3.11 | [link](https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl) |
|
||||
| x86 | Python3.12 | [link](https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp312-cp312-manylinux_2_28_x86_64.whl) |
|
||||
| aarch64 | Python3.10 | [link](https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp310-cp310-manylinux_2_28_aarch64.whl) |
|
||||
| aarch64 | Python3.11 | [link](https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp311-cp311-manylinux_2_28_aarch64.whl) |
|
||||
| aarch64 | Python3.12 | [link](https://download.pytorch.org/whl/cpu/torch-2.11.0%2Bcpu-cp312-cp312-manylinux_2_28_aarch64.whl) |
|
||||
|
||||
3. **Install torch-npu**
|
||||
|
||||
```
|
||||
pip3 install torch-npu==2.1.0.post17
|
||||
pip3 install torch-npu==2.11.0rc1
|
||||
```
|
||||
|
||||
### From Source
|
||||
|
||||
In some special scenarios, users may need to compile **torch-npu** by themselves.Select a branch in table [Ascend Auxiliary Software](#ascend-auxiliary-software) and a Python version in table [PyTorch and Python Version Matching Table](#pytorch-and-python-version-matching-table) first. The docker image is recommended for compiling torch-npu through the following steps(It is recommended to mount the working path only and avoid the system path to reduce security risks.), the generated .whl file path is ./dist/. Note that gcc version has the following constraints if you try to compile without using docker image: we recommend to use gcc 10.2 for ARM and gcc 9.3.1 for X86.
|
||||
In some special scenarios, users may need to compile **torch-npu** by themselves.Select a branch in table [Ascend Auxiliary Software](#ascend-auxiliary-software) and a Python version in table [PyTorch and Python Version Matching Table](#pytorch-and-python-version-matching-table) first. The docker image is recommended for compiling torch-npu through the following steps(It is recommended to mount the working path only and avoid the system path to reduce security risks.), the generated .whl file path is ./dist/. Note that gcc version has the following constraints if you try to compile without using docker image: we recommend to use gcc 13.3 for both ARM and X86.
|
||||
|
||||
1. **Clone torch-npu**
|
||||
|
||||
```
|
||||
git clone https://github.com/ascend/pytorch.git -b 2.1.0-7.2.0 --depth 1
|
||||
git clone https://gitcode.com/ascend/pytorch.git -b v2.11.0 --depth 1
|
||||
```
|
||||
|
||||
2. **Build Docker Image**
|
||||
@@ -82,16 +80,16 @@ In some special scenarios, users may need to compile **torch-npu** by themselves
|
||||
|
||||
4. **Compile torch-npu**
|
||||
|
||||
Take **Python 3.8** as an example.
|
||||
Take **Python 3.10** as an example.
|
||||
|
||||
```
|
||||
cd /home/pytorch
|
||||
bash ci/build.sh --python=3.8
|
||||
bash ci/build.sh --python=3.10
|
||||
```
|
||||
|
||||
**Tips**
|
||||
|
||||
If you would like to compile with new C++ ABI, then first run this command, at this point, the recommended compilation environment is same to community torch package: glibc 2.28, gcc 11.2.1
|
||||
If you would like to compile with new C++ ABI, then first run this command, at this point, the recommended compilation environment is same to community torch package: glibc 2.28, gcc 13.3
|
||||
|
||||
```
|
||||
export _GLIBCXX_USE_CXX11_ABI=1
|
||||
@@ -100,7 +98,7 @@ In some special scenarios, users may need to compile **torch-npu** by themselves
|
||||
Meanwhile, we support configuring -fabi-version using the following variables,require consistency with the community torch package
|
||||
|
||||
```
|
||||
export _ABI_VERSION=16
|
||||
export _ABI_VERSION=18
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
@@ -146,6 +144,9 @@ Refer to [API of Ascend Extension for PyTorch](docs/api/torch_npu_apis.md) for m
|
||||
| PyTorch2.6.0 | Python3.9.x,Python3.10.x,Python3.11.x |
|
||||
| PyTorch2.7.1 | Python3.9.x,Python3.10.x,Python3.11.x |
|
||||
| PyTorch2.8.0 | Python3.9.x,Python3.10.x,Python3.11.x |
|
||||
| PyTorch2.9.0 | Python3.10.x,Python3.11.x,Python3.12.x |
|
||||
| PyTorch2.10.0 | Python3.10.x,Python3.11.x,Python3.12.x |
|
||||
| PyTorch2.11.0 | Python3.10.x,Python3.11.x,Python3.12.x |
|
||||
|
||||
## Ascend Auxiliary Software
|
||||
|
||||
@@ -153,7 +154,9 @@ Refer to [API of Ascend Extension for PyTorch](docs/api/torch_npu_apis.md) for m
|
||||
|
||||
| CANN Version | Supported PyTorch Version | Supported Extension Version | Github Branch |
|
||||
|-----------------------|---------------------------|-----------------------------|-------------------|
|
||||
| CANN 8.5.0 | 2.9.0 | 2.9.0 | v2.9.0-7.3.0 |
|
||||
| CANN 8.5.0 | 2.11.0 | 2.11.0rc1 | v2.11.0 |
|
||||
| | 2.10.0 | 2.10.0rc2 | v2.10.0 |
|
||||
| | 2.9.0 | 2.9.0 | v2.9.0-7.3.0 |
|
||||
| | 2.8.0 | 2.8.0.post2 | v2.8.0-7.3.0 |
|
||||
| | 2.7.1 | 2.7.1.post2 | v2.7.1-7.3.0 |
|
||||
| | 2.6.0 | 2.6.0.post5 | v2.6.0-7.3.0 |
|
||||
@@ -234,7 +237,7 @@ Due to the asynchronous development mechanism of upstream and downstream, incomp
|
||||
|
||||
| **OS** | **CANN Version(Docker Image)** | **Upstream Branch** | **Downstream Branch** | **Period** | **Status** |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| openEuler 22.03 SP2 | [CANN 7.1](https://hub.docker.com/r/ascendai/cann/tags) | [main](https://github.com/pytorch/pytorch/tree/main) | [master](https://github.com/Ascend/pytorch/tree/master) | UTC 1200 daily | [](https://github.com/Ascend/pytorch/actions/workflows/periodic.yml) |
|
||||
| openEuler 24.03 | [CANN 8.5](https://hub.docker.com/r/ascendai/cann/tags) | [main](https://github.com/pytorch/pytorch/tree/main) | [master](https://github.com/Ascend/pytorch/tree/master) | UTC 1200 daily | [](https://github.com/Ascend/pytorch/actions/workflows/periodic.yml) |
|
||||
|
||||
## Suggestions and Communication
|
||||
|
||||
@@ -255,6 +258,8 @@ The version branches of AscendPyTorch have the following maintenance phases:
|
||||
|
||||
| **PyTorch** | **Maintenance Policies** | **Status** | **Launch Date** | **Subsequent Status** | **EOL Date** |
|
||||
|-------------|--------------------------|-------------|-----------------|-------------------------------------------------------------------|--------------|
|
||||
| 2.11.0 | Regular Release | Development | 2026/03/23 | Expected to enter maintenance status from September 23, 2026 | - |
|
||||
| 2.10.0 | Regular Release | Development | 2026/01/22 | Expected to enter maintenance status from July 22, 2026 | - |
|
||||
| 2.9.0 | Regular Release | Development | 2025/10/15 | Expected to enter maintenance status from March 15, 2026 | - |
|
||||
| 2.8.0 | Regular Release | Development | 2025/10/15 | Expected to enter maintenance status from March 15, 2026 | - |
|
||||
| 2.7.1 | Long Term Support | Development | 2025/10/15 | Expected to enter maintenance status from October 15, 2026 | |
|
||||
@@ -275,10 +280,11 @@ For more detailed information on installation guides, model migration, training/
|
||||
|
||||
| Document Name | Document Link |
|
||||
|------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
|
||||
| Installation Guide | [link](https://www.hiascend.com/document/detail/zh/Pytorch/720/configandinstg/instg/insg_0001.html) |
|
||||
| Network Model Migration and Training | [link](https://www.hiascend.com/document/detail/zh/Pytorch/720/ptmoddevg/trainingmigrguide/PT_LMTMOG_0003.html) |
|
||||
| Operator Adaptation | [link](https://www.hiascend.com/document/detail/zh/canncommercial/81RC1/operatordev/tbeaicpudevg/atlasopdev_10_0086.html) |
|
||||
| API List (PyTorch and Custom Interfaces) | [link](https://www.hiascend.com/document/detail/zh/Pytorch/720/apiref/apilist/ptaoplist_000002.html) |
|
||||
| Installation Guide | [link](https://www.hiascend.com/document/detail/zh/Pytorch/730/configandinstg/instg/docs/zh/installation_guide/installation_description.md) |
|
||||
| Network Model Migration and Training | [link](https://www.hiascend.com/document/detail/zh/Pytorch/730/ptmoddevg/trainingmigrguide/PT_LMTMOG_0003.html) |
|
||||
| Operator Adaptation | [link](https://www.hiascend.com/document/detail/zh/Pytorch/730/ptmoddevg/Frameworkfeatures/docs/zh/framework_feature_guide_pytorch/adaptation_description_opplugin.md) |
|
||||
| PyTorch Native API | [link](https://www.hiascend.com/document/detail/zh/Pytorch/730/apiref/PyTorchNativeapi/docs/zh/native_apis/pytorch_2-9-0/overview.md) |
|
||||
| Ascend Extension for PyTorch (Custom Interfaces) | [link](https://www.hiascend.com/document/detail/zh/Pytorch/730/apiref/apilist/ptaoplist_000002.html) |
|
||||
|
||||
## License
|
||||
|
||||
|
||||
+31
-88
@@ -6,82 +6,27 @@
|
||||
|
||||
昇腾为基于华为昇腾处理器和软件的行业应用及服务提供全栈AI计算基础设施。您可以通过访问[昇腾社区](https://www.hiascend.com/zh/),了解关于昇腾的更多信息。
|
||||
|
||||
## 目录结构
|
||||
|
||||
关键目录如下:
|
||||
|
||||
```ColdFusion
|
||||
├─ci # 持续集成脚本目录
|
||||
├─cmake # CMake构建配置目录
|
||||
├─torch_npu # 核心适配目录
|
||||
│ ├─csrc/ # 底层核心目录
|
||||
│ ├─npu/ # NPU接口目录
|
||||
│ ├─distributed/ # 分布式训练适配目录
|
||||
│ ├─asd/ # Ascend Debug工具目录
|
||||
├─docs # 项目文档目录
|
||||
├─examples # 示例目录
|
||||
├─torchnpugen/ # 代码生成模块目录
|
||||
└─test # 测试目录
|
||||
```
|
||||
|
||||
## 版本说明
|
||||
|
||||
### PyTorch与Python版本配套表
|
||||
|
||||
| PyTorch版本 | Python版本 |
|
||||
|---------------|:-------------------------------------------------------------|
|
||||
| PyTorch1.11.0 | Python3.7.x(>=3.7.5), Python3.8.x, Python3.9.x, Python3.10.x |
|
||||
| PyTorch2.1.0 | Python3.8.x, Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
| PyTorch2.2.0 | Python3.8.x, Python3.9.x, Python3.10.x |
|
||||
| PyTorch2.3.1 | Python3.8.x, Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
| PyTorch2.4.0 | Python3.8.x, Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
| PyTorch2.5.1 | Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
| PyTorch2.6.0 | Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
| PyTorch2.7.1 | Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
| PyTorch2.8.0 | Python3.9.x, Python3.10.x, Python 3.11.x |
|
||||
|
||||
### 昇腾辅助软件
|
||||
|
||||
**Ascend Extension for PyTorch**的分支名称采用`{PyTorch版本}-{昇腾版本}`命名规则,前者为**Ascend Extension for PyTorch**匹配的PyTorch版本,后者为**Ascend Extension for PyTorch**版本号,详细匹配如下:
|
||||
|
||||
| CANN版本 | 支持的PyTorch版本 | 支持的Extension版本 | GitCode分支 |
|
||||
|-----------------------|--------------|------------------|-------------------|
|
||||
| CANN 8.5.0 | 2.9.0 | 2.9.0 | v2.9.0-7.3.0 |
|
||||
| | 2.8.0 | 2.8.0.post2 | v2.8.0-7.3.0 |
|
||||
| | 2.7.1 | 2.7.1.post2 | v2.7.1-7.3.0 |
|
||||
| | 2.6.0 | 2.6.0.post5 | v2.6.0-7.3.0 |
|
||||
| CANN 8.3.RC1 | 2.8.0 | 2.8.0 | v2.8.0-7.2.0 |
|
||||
| | 2.7.1 | 2.7.1 | v2.7.1-7.2.0 |
|
||||
| | 2.6.0 | 2.6.0.post3 | v2.6.0-7.2.0 |
|
||||
| | 2.1.0 | 2.1.0.post17 | v2.1.0-7.2.0 |
|
||||
| CANN 8.2.RC1 | 2.6.0 | 2.6.0 | v2.6.0-7.1.0 |
|
||||
| | 2.5.1 | 2.5.1.post1 | v2.5.1-7.1.0 |
|
||||
| | 2.1.0 | 2.1.0.post13 | v2.1.0-7.1.0 |
|
||||
| CANN 8.1.RC1 | 2.5.1 | 2.5.1 | v2.5.1-7.0.0 |
|
||||
| | 2.4.0 | 2.4.0.post4 | v2.4.0-7.0.0 |
|
||||
| | 2.3.1 | 2.3.1.post6 | v2.3.1-7.0.0 |
|
||||
| | 2.1.0 | 2.1.0.post12 | v2.1.0-7.0.0 |
|
||||
| CANN 8.0.0 | 2.4.0 | 2.4.0.post2 | v2.4.0-6.0.0 |
|
||||
| | 2.3.1 | 2.3.1.post4 | v2.3.1-6.0.0 |
|
||||
| | 2.1.0 | 2.1.0.post10 | v2.1.0-6.0.0 |
|
||||
| CANN 8.0.RC3 | 2.4.0 | 2.4.0 | v2.4.0-6.0.rc3 |
|
||||
| | 2.3.1 | 2.3.1.post2 | v2.3.1-6.0.rc3 |
|
||||
| | 2.1.0 | 2.1.0.post8 | v2.1.0-6.0.rc3 |
|
||||
| CANN 8.0.RC2 | 2.3.1 | 2.3.1 | v2.3.1-6.0.rc2 |
|
||||
| | 2.2.0 | 2.2.0.post2 | v2.2.0-6.0.rc2 |
|
||||
| | 2.1.0 | 2.1.0.post6 | v2.1.0-6.0.rc2 |
|
||||
| | 1.11.0 | 1.11.0.post14 | v1.11.0-6.0.rc2 |
|
||||
| CANN 8.0.RC1 | 2.2.0 | 2.2.0 | v2.2.0-6.0.rc1 |
|
||||
| | 2.1.0 | 2.1.0.post4 | v2.1.0-6.0.rc1 |
|
||||
| | 1.11.0 | 1.11.0.post11 | v1.11.0-6.0.rc1 |
|
||||
| CANN 7.0.0 | 2.1.0 | 2.1.0 | v2.1.0-5.0.0 |
|
||||
| | 2.0.1 | 2.0.1.post1 | v2.0.1-5.0.0 |
|
||||
| | 1.11.0 | 1.11.0.post8 | v1.11.0-5.0.0 |
|
||||
| CANN 7.0.RC1 | 2.1.0 | 2.1.0.rc1 | v2.1.0-5.0.rc3 |
|
||||
| | 2.0.1 | 2.0.1 | v2.0.1-5.0.rc3 |
|
||||
| | 1.11.0 | 1.11.0.post4 | v1.11.0-5.0.rc3 |
|
||||
| CANN 6.3.RC3.1 | 1.11.0 | 1.11.0.post3 | v1.11.0-5.0.rc2.2 |
|
||||
| CANN 6.3.RC3 | 1.11.0 | 1.11.0.post2 | v1.11.0-5.0.rc2.1 |
|
||||
| CANN 6.3.RC2 | 2.0.1 | 2.0.1.rc1 | v2.0.1-5.0.rc2 |
|
||||
| | 1.11.0 | 1.11.0.post1 | v1.11.0-5.0.rc2 |
|
||||
| | 1.8.1 | 1.8.1.post2 | v1.8.1-5.0.rc2 |
|
||||
| CANN 6.3.RC1 | 1.11.0 | 1.11.0 | v1.11.0-5.0.rc1 |
|
||||
| | 1.8.1 | 1.8.1.post1 | v1.8.1-5.0.rc1 |
|
||||
| CANN 6.0.1 | 1.5.0 | 1.5.0.post8 | v1.5.0-3.0.0 |
|
||||
| | 1.8.1 | 1.8.1 | v1.8.1-3.0.0 |
|
||||
| | 1.11.0 | 1.11.0.rc2(beta) | v1.11.0-3.0.0 |
|
||||
| CANN 6.0.RC1 | 1.5.0 | 1.5.0.post7 | v1.5.0-3.0.rc3 |
|
||||
| | 1.8.1 | 1.8.1.rc3 | v1.8.1-3.0.rc3 |
|
||||
| | 1.11.0 | 1.11.0.rc1(beta) | v1.11.0-3.0.rc3 |
|
||||
| CANN 5.1.RC2 | 1.5.0 | 1.5.0.post6 | v1.5.0-3.0.rc2 |
|
||||
| | 1.8.1 | 1.8.1.rc2 | v1.8.1-3.0.rc2 |
|
||||
| CANN 5.1.RC1 | 1.5.0 | 1.5.0.post5 | v1.5.0-3.0.rc1 |
|
||||
| | 1.8.1 | 1.8.1.rc1 | v1.8.1-3.0.rc1 |
|
||||
| CANN 5.0.4 | 1.5.0 | 1.5.0.post4 | 2.0.4.tr5 |
|
||||
| CANN 5.0.3 | 1.8.1 | 1.5.0.post3 | 2.0.3.tr5 |
|
||||
| CANN 5.0.2 | 1.5.0 | 1.5.0.post2 | 2.0.2.tr5 |
|
||||
Ascend Extension for PyTorch的版本说明包含版本配套说明、版本兼容性说明和更新说明等,具体请参见《[Ascend Extension for PyTorch 版本说明](https://gitcode.com/Ascend/pytorch/blob/v2.7.1/docs/zh/release_notes/release_notes.md)》。
|
||||
|
||||
|
||||
## 环境部署
|
||||
@@ -93,18 +38,14 @@ Ascend Extension for PyTorch插件的安装操作,具体请参见《[Ascend Ex
|
||||
以CNN模型为例,介绍将其迁移至昇腾NPU上进行训练的方法,具体操作请参见《[Ascend Extension for PyTorch 快速入门](https://gitcode.com/Ascend/pytorch/blob/v2.7.1/docs/zh/quick_start/quick_start.md)》。
|
||||
|
||||
## 特性介绍
|
||||
|
||||
|
||||
Ascend Extension for PyTorch插件从内存资源优化、通信性能优化、计算性能优化、辅助报错定位等方面精心打造了一系列独特的特性,具体特性指导请参见《[PyTorch 框架特性指南](https://gitcode.com/Ascend/pytorch/blob/v2.7.1/docs/zh/framework_feature_guide_pytorch/menu_framework_feature.md)》。
|
||||
|
||||
|
||||
## API参考
|
||||
|
||||
- 原生PyTorch API在昇腾NPU设备上的支持情况请参见《[PyTorch 原生API支持度](https://gitcode.com/Ascend/pytorch/blob/v2.7.1/docs/zh/native_apis/menu_pt_native_apis.md)》。
|
||||
- Ascend Extension for PyTorch插件提供了部分自定义API接口,具体使用请参见《[Ascend Extension for PyTorch自定义API](https://gitcode.com/Ascend/op-plugin/blob/master/docs/zh/custom_APIs/menu_Pytorch_API.md)》。
|
||||
|
||||
## 建议与交流
|
||||
|
||||
欢迎大家为社区做贡献。如果有任何疑问或建议,请提交[GitCode Issues](https://gitcode.com/Ascend/pytorch/issues),我们会尽快回复。感谢您的支持。
|
||||
|
||||
## 分支维护策略
|
||||
|
||||
Ascend Extension for PyTorch版本分支的维护阶段如下:
|
||||
@@ -119,14 +60,16 @@ Ascend Extension for PyTorch版本分支的维护阶段如下:
|
||||
|
||||
## PyTorch版本维护策略
|
||||
|
||||
| **PyTorch版本** | **维护策略** | **当前状态** | **发布时间** | **后续状态** | **EOL日期** |
|
||||
|---------------|----------|----------|------------|----------------------|-----------|
|
||||
| 2.9.0 | 常规分支 | 开发 | 2025/10/15| 预计2026/03/15起进入维护状态 | - |
|
||||
| 2.8.0 | 常规分支 | 开发 | 2025/10/15| 预计2026/03/15起进入维护状态 | - |
|
||||
| 2.7.1 | 长期分支 | 开发 | 2025/10/15| 预计2026/10/15起进入维护状态 | - |
|
||||
| 2.6.0 | 常规分支 | 开发 | 2025/07/25 | 预计2026/01/25起进入维护状态 | - |
|
||||
| 2.5.1 | 常规分支 | 维护 | 2024/11/08 | 预计2026/08/08起进入无维护状态 | - |
|
||||
| 2.4.0 | 常规分支 | 维护 | 2024/10/15 | 预计2026/06/15起进入无维护状态 | - |
|
||||
| **PyTorch版本** | **维护策略** | **当前状态** | **发布时间** | **后续状态** | **EOL日期** |
|
||||
|---------------|-------------|------------|------------|----------------------------------|------------|
|
||||
| 2.11.0 | 常规分支 | 开发 | 2026/03/23 | 预计2026/09/23起进入维护状态 | - |
|
||||
| 2.10.0 | 常规分支 | 开发 | 2026/01/22 | 预计2026/07/22起进入维护状态 | - |
|
||||
| 2.9.0 | 常规分支 | 开发 | 2025/10/15 | 预计2026/03/15起进入维护状态 | - |
|
||||
| 2.8.0 | 常规分支 | 开发 | 2025/10/15 | 预计2026/03/15起进入维护状态 | - |
|
||||
| 2.7.1 | 长期分支 | 开发 | 2025/10/15 | 预计2026/10/15起进入维护状态 | - |
|
||||
| 2.6.0 | 常规分支 | 开发 | 2025/07/25 | 预计2026/01/25起进入维护状态 | - |
|
||||
| 2.5.1 | 常规分支 | 维护 | 2024/11/08 | 预计2026/08/08起进入无维护状态 | - |
|
||||
| 2.4.0 | 常规分支 | 维护 | 2024/10/15 | 预计2026/06/15起进入无维护状态 | - |
|
||||
| 2.3.1 | 常规分支 | 维护 | 2024/06/06 | 预计2026/06/07起进入无维护状态 | |
|
||||
| 2.2.0 | 常规分支 | EOL | 2024/04/01 | | 2025/10/14 |
|
||||
| 2.1.0 | 长期支持 | 维护 | 2023/10/15 | 预计2026/12/30起进入无维护状态 | |
|
||||
|
||||
+31
-31
@@ -47,7 +47,7 @@
|
||||
torch_npu内集成性能分析工具profiler:
|
||||
- 集成原因:对标PyTorch原生支持能力,提供NPU PyTorch框架开发性能分析能力,加速性能分析调试过程。
|
||||
- 使用场景:默认不采集,如用户需要进行性能分析时,可在模型训练脚本中添加Ascend Extension for PyTorch Profiler接口,执行训练的同时采集性能数据,完成训练后直接输出可视化的性能数据文件。
|
||||
- 风险提示:使用该功能会在本地生成性能数据,用户需加强对相关性能数据的保护,请在需要模型性能分析时使用,分析完成后及时关闭。Profiler工具具体细节请参考[《PyTorch 性能分析工具介绍》](https://www.hiascend.com/document/detail/zh/Pytorch/710/ptmoddevg/trainingmigrguide/performance_tuning_0014.html)。
|
||||
- 风险提示:使用该功能会在本地生成性能数据,用户需加强对相关性能数据的保护,请在需要模型性能分析时使用,分析完成后及时关闭。Profiler工具具体细节请参考[《PyTorch 性能分析工具介绍》](https://www.hiascend.com/document/detail/zh/Pytorch/730/ptmoddevg/trainingmigrguide/performance_tuning_0014.html)。
|
||||
|
||||
## 数据安全声明
|
||||
|
||||
@@ -70,39 +70,39 @@ torch_npu支持源码编译安装,在编译时会下载依赖第三方库并
|
||||
|
||||
##### 公网地址
|
||||
|
||||
| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 |
|
||||
|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|--------------------------------------------------------------------------------|--------------------------------|
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitcode.com/ascend/op-plugin.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors/googletest.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/ascend/torchair.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitcode.com/ascend/Tensorpipe.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors/fmt.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors/nlohmann-json.git | 依赖的开源代码仓 |
|
||||
| 类型 | 开源代码地址 | 文件名 | 公网IP地址/公网URL地址/域名/邮箱地址 | 用途说明 |
|
||||
|------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|--------------------------------------------------------------------------------|--------------------------------|
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitcode.com/ascend/op-plugin.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors/googletest.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/ascend/torchair.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitcode.com/ascend/Tensorpipe.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors/fmt.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors/nlohmann-json.git | 依赖的开源代码仓 |
|
||||
| 自研 | 不涉及 | .gitmodules | https://gitee.com/mirrors_llvm/torch-mlir.git | 依赖的开源代码仓 | |
|
||||
| 自研 | 不涉及 | ci\docker\X86\Dockerfile | https://mirrors.huaweicloud.com/repository/pypi/simple | docker配置文件,用于配置pip源 |
|
||||
| 自研 | 不涉及 | ci\docker\X86\Dockerfile | https://download.pytorch.org/whl/cpu | docker配置源,用于配置torch下载连接 |
|
||||
| 自研 | 不涉及 | ci\docker\ARM\Dockerfile | https://mirrors.huaweicloud.com/repository/pypi/simple | docker配置文件,用于配置pip源 |
|
||||
| 自研 | 不涉及 | ci\docker\X86\Dockerfile | https://mirrors.wlnmp.com/centos/Centos7-aliyun-altarch.repo | docker配置文件,用于配置yum源 |
|
||||
| 自研 | 不涉及 | ci\docker\ARM\Dockerfile | https://mirrors.wlnmp.com/centos/Centos7-aliyun-altarch.repo | docker配置文件,用于配置yum源 |
|
||||
| 自研 | 不涉及 | .github\workflows\\_build-and-test.yml | https://mirrors.huaweicloud.com/repository/pypi/simple | workflow配置文件,用于配置pip源 |
|
||||
| 自研 | 不涉及 | setup.cfg | https://gitcode.com/ascend/pytorch | 用于打包whl的url入参 |
|
||||
| 自研 | 不涉及 | setup.cfg | https://gitcode.com/ascend/pytorch/tags | 用于打包whl的download_url入参 |
|
||||
| 自研 | 不涉及 | third_party\op-plugin\ci\build.sh | https://gitcode.com/ascend/pytorch.git | 编译脚本根据torch_npu仓库地址拉取代码进行编译 |
|
||||
| 自研 | 不涉及 | third_party\op-plugin\ci\exec_ut.sh | https://gitcode.com/ascend/pytorch.git | UT脚本根据torch_npu仓库地址拉取代码进行UT测试 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/main/test/nn/test_convolution.py <br> https://github.com/pytorch/pytorch/blob/main/test/test_mps.py <br> https://github.com/pytorch/pytorch/blob/main/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/legacy_conv2d.pt | 用于test脚本下载相关pt文件 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/main/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/legacy_serialized.pt | 用于test脚本下载相关pt文件 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/main/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/gpu_tensors.pt | 用于test脚本下载相关pt文件 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/main/test/onnx/test_utility_funs.py | test\url.ini | https://github.com/pytorch/pytorch/issues/new?template=bug-report.yml | issue的链接 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/main/test/test_nn.py <br> https://github.com/pytorch/pytorch/blob/main/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/linear.pt | 用于test脚本下载相关pt文件 |
|
||||
| 自研 | 不涉及 | torch_npu\npu\config.yaml | https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl | 火焰图脚本下载路径 |
|
||||
| 自研 | 不涉及 | test\requirements.txt | https://download.pytorch.org/whl/nightly/cpu | 下载链接,用于下载torch-cpu版本 |
|
||||
| 自研 | 不涉及 | test\requirements.txt | https://data.pyg.org/whl/torch-2.4.0+cpu.html | 下载链接,用于下载torch-scatter的cpu版本 |
|
||||
| 自研 | 不涉及 | requirements.txt | https://download.pytorch.org/whl/nightly/cpu | 下载链接,用于下载torch-cpu版本 |
|
||||
| 自研 | 不涉及 | test\get_synchronized_files.sh | https://github.com/pytorch/pytorch.git | 下载链接,用于下载PyTorch的测试用例 |
|
||||
| 自研 | 不涉及 | ci\docker\X86\Dockerfile | https://mirrors.huaweicloud.com/repository/pypi/simple | docker配置文件,用于配置pip源 |
|
||||
| 自研 | 不涉及 | ci\docker\X86\Dockerfile | https://download.pytorch.org/whl/cpu | docker配置源,用于配置torch下载连接 |
|
||||
| 自研 | 不涉及 | ci\docker\ARM\Dockerfile | https://mirrors.huaweicloud.com/repository/pypi/simple | docker配置文件,用于配置pip源 |
|
||||
| 自研 | 不涉及 | ci\docker\X86\Dockerfile | https://mirrors.wlnmp.com/centos/Centos7-aliyun-altarch.repo | docker配置文件,用于配置yum源 |
|
||||
| 自研 | 不涉及 | ci\docker\ARM\Dockerfile | https://mirrors.wlnmp.com/centos/Centos7-aliyun-altarch.repo | docker配置文件,用于配置yum源 |
|
||||
| 自研 | 不涉及 | .github\workflows\\_build-and-test.yml | https://mirrors.huaweicloud.com/repository/pypi/simple | workflow配置文件,用于配置pip源 |
|
||||
| 自研 | 不涉及 | setup.cfg | https://gitcode.com/ascend/pytorch | 用于打包whl的url入参 |
|
||||
| 自研 | 不涉及 | setup.cfg | https://gitcode.com/ascend/pytorch/tags | 用于打包whl的download_url入参 |
|
||||
| 自研 | 不涉及 | third_party\op-plugin\ci\build.sh | https://gitcode.com/ascend/pytorch.git | 编译脚本根据torch_npu仓库地址拉取代码进行编译 |
|
||||
| 自研 | 不涉及 | third_party\op-plugin\ci\exec_ut.sh | https://gitcode.com/ascend/pytorch.git | UT脚本根据torch_npu仓库地址拉取代码进行UT测试 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/release/2.11/test/nn/test_convolution.py <br> https://github.com/pytorch/pytorch/blob/release/2.11/test/test_mps.py <br> https://github.com/pytorch/pytorch/blob/release/2.11/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/legacy_conv2d.pt | 用于test脚本下载相关pt文件 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/release/2.11/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/legacy_serialized.pt | 用于test脚本下载相关pt文件 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/release/2.11/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/gpu_tensors.pt | 用于test脚本下载相关pt文件 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/release/2.11/test/onnx/test_utility_funs.py | test\url.ini | https://github.com/pytorch/pytorch/issues/new?template=bug-report.yml | issue的链接 |
|
||||
| 开源引入 | https://github.com/pytorch/pytorch/blob/release/2.11/test/test_nn.py <br> https://github.com/pytorch/pytorch/blob/release/2.11/test/test_serialization.py | test\url.ini | https://download.pytorch.org/test_data/linear.pt | 用于test脚本下载相关pt文件 |
|
||||
| 自研 | 不涉及 | torch_npu\npu\config.yaml | https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl | 火焰图脚本下载路径 |
|
||||
| 自研 | 不涉及 | test\requirements.txt | https://download.pytorch.org/whl/cpu | 下载链接,用于下载torch-cpu版本 |
|
||||
| 自研 | 不涉及 | test\requirements.txt | https://data.pyg.org/whl/torch-2.10.0+cpu.html | 下载链接,用于下载torch-scatter的cpu版本 |
|
||||
| 自研 | 不涉及 | requirements.txt | https://download.pytorch.org/whl/cpu | 下载链接,用于下载torch-cpu版本 |
|
||||
| 自研 | 不涉及 | test\get_synchronized_files.sh | https://github.com/pytorch/pytorch.git | 下载链接,用于下载PyTorch的测试用例 |
|
||||
|
||||
## 公开接口声明
|
||||
|
||||
Ascend Extension for PyTorch是PyTorch适配插件,支持用户使用PyTorch在昇腾设备上进行训练和推理。Ascend Extension for PyTorch适配后支持用户使用PyTorch原生接口。除了原生PyTorch接口外,Ascend Extension for PyTorch提供了部分自定义接口,包括自定义算子、亲和库和其他接口,支持PyTorch接口和自定义接口连接,具体可参见[《Ascend Extension for PyTorch自定义API参考》](https://www.hiascend.com/document/detail/zh/Pytorch/710/apiref/torchnpuCustomsapi/context/%E6%A6%82%E8%BF%B0.md)以及[《PyTorch原生接口清单》](https://www.hiascend.com/document/detail/zh/Pytorch/710/apiref/PyTorchNativeapi/ptaoplist_000003.html)。
|
||||
Ascend Extension for PyTorch是PyTorch适配插件,支持用户使用PyTorch在昇腾设备上进行训练和推理。Ascend Extension for PyTorch适配后支持用户使用PyTorch原生接口。除了原生PyTorch接口外,Ascend Extension for PyTorch提供了部分自定义接口,包括自定义算子、亲和库和其他接口,支持PyTorch接口和自定义接口连接,具体可参见[《Ascend Extension for PyTorch自定义API参考》](https://www.hiascend.com/document/detail/zh/Pytorch/730/apiref/torchnpuCustomsapi/docs/context/overview.md)以及[《PyTorch原生接口清单》](https://www.hiascend.com/document/detail/zh/Pytorch/730/apiref/PyTorchNativeapi/docs/zh/native_apis/pytorch_2-9-0/overview.md)。
|
||||
|
||||
参考[PyTorch社区公开接口规范](https://github.com/pytorch/pytorch/wiki/Public-API-definition-and-documentation),Ascend Extension for PyTorch提供了对外的自定义接口。如果一个函数看起来符合公开接口的标准且在文档中有展示,则该接口是公开接口。否则,使用该功能前可以在社区询问该功能是否确实是公开的或意外暴露的接口,因为这些未暴露接口将来可能会被修改或者删除。
|
||||
|
||||
@@ -225,7 +225,7 @@ PyTorch提供分布式训练能力,支持在单机和多机场景下进行训
|
||||
| 所属平面 | 不涉及 | 不涉及 |
|
||||
| 版本 | 所有版本 | 所有版本 |
|
||||
| 特殊场景 | 无 | 无 |
|
||||
| 备注 | 该通信过程由开源软件PyTorch控制,配置为PyTorch原生设置,可参考[PyTorch文档](https://pytorch.org/docs/stable/distributed.html#launch-utility)。源端口由操作系统自动分配,分配范围由操作系统的配置决定,例如ubuntu:采用/proc/sys/net/ipv4/ipv4_local_port_range文件指定,可通过cat /proc/sys/net/ipv4/ipv4_local_port_range或sysctl net.ipv4.ip_local_port_range查看 | 该通信过程由CANN中HCCL组件控制,torch_npu不进行控制,端口范围可参考[《环境变量参考》](https://www.hiascend.com/document/detail/zh/canncommercial/82RC1/maintenref/envvar/envref_07_0001.html)的“执行相关 > 集合通信 >HCCL_IF_BASE_PORT” |
|
||||
| 备注 | 该通信过程由开源软件PyTorch控制,配置为PyTorch原生设置,可参考[PyTorch文档](https://pytorch.org/docs/stable/distributed.html#launch-utility)。源端口由操作系统自动分配,分配范围由操作系统的配置决定,例如ubuntu:采用/proc/sys/net/ipv4/ipv4_local_port_range文件指定,可通过cat /proc/sys/net/ipv4/ipv4_local_port_range或sysctl net.ipv4.ip_local_port_range查看 | 该通信过程由CANN中HCCL组件控制,torch_npu不进行控制,端口范围可参考[《环境变量参考》](https://www.hiascend.com/document/detail/zh/canncommercial/850/maintenref/envvar/envref_07_0001.html)的“执行相关 > 集合通信 >HCCL_IF_BASE_PORT” |
|
||||
|
||||
## 漏洞机制说明
|
||||
|
||||
|
||||
+22
-14
@@ -1,11 +1,19 @@
|
||||
FROM quay.io/pypa/manylinux2014_aarch64:2023-10-07-c1e05d1
|
||||
FROM pytorch/manylinux2_28_aarch64-builder:cpu-aarch64-v2.11.0-rc6
|
||||
|
||||
# Set pip
|
||||
ENV PATH /usr/local/bin:$PATH
|
||||
|
||||
RUN echo "alias ll='ls -l --color=auto'" >> /root/.bashrc
|
||||
|
||||
# Set pip&python
|
||||
RUN cd /usr/local/bin \
|
||||
&& ln -s /opt/_internal/cpython-3.9.18/bin/pip3.9 pip3.9 \
|
||||
&& ln -s /opt/_internal/cpython-3.10.13/bin/pip3.10 pip3.10 \
|
||||
&& ln -s /opt/_internal/cpython-3.11.6/bin/pip3.11 pip3.11 \
|
||||
&& ln -s python3.9 python3
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/pip3.10 pip3.10 \
|
||||
&& ln -sf /opt/_internal/cpython-3.11.15/bin/pip3.11 pip3.11 \
|
||||
&& ln -sf /opt/_internal/cpython-3.12.13/bin/pip3.12 pip3.12 \
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/pip3.10 pip3 \
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/python3.10 python3.10 \
|
||||
&& ln -sf /opt/_internal/cpython-3.11.15/bin/python3.11 python3.11 \
|
||||
&& ln -sf /opt/_internal/cpython-3.12.13/bin/python3.12 python3.12 \
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/python3.10 python3
|
||||
|
||||
# Set pip source
|
||||
RUN mkdir /root/.pip \
|
||||
@@ -32,16 +40,16 @@ RUN if [ "$CONFIG_FOR_LCOV" = "1" ]; then \
|
||||
fi
|
||||
|
||||
# Install pip package(build)
|
||||
RUN pip3.9 install pyyaml \
|
||||
&& pip3.9 install torch==2.1.0 \
|
||||
&& pip3.9 install numpy==1.21.3
|
||||
|
||||
RUN pip3.10 install pyyaml \
|
||||
&& pip3.10 install torch==2.1.0 \
|
||||
&& pip3.10 install numpy==1.21.3
|
||||
&& pip3.10 install torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.10 install numpy==1.23.2
|
||||
|
||||
RUN pip3.11 install pyyaml \
|
||||
&& pip3.11 install torch==2.1.0 \
|
||||
&& pip3.11 install numpy==1.23.2
|
||||
&& pip3.11 install torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.11 install numpy==1.26.2
|
||||
|
||||
RUN pip3.12 install pyyaml \
|
||||
&& pip3.12 install torch==2.11.0 --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.12 install numpy==1.26.2
|
||||
|
||||
WORKDIR /home
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ docker run -it -v /{code_path}/pytorch:/home/pytorch manylinux-builder:v1 bash
|
||||
```
|
||||
**Compile torch_npu**
|
||||
|
||||
Take Python 3.9 as an example
|
||||
Take Python 3.10 as an example
|
||||
```Shell
|
||||
cd /home/pytorch
|
||||
bash ci/build.sh --python=3.9
|
||||
bash ci/build.sh --python=3.10
|
||||
```
|
||||
|
||||
+22
-17
@@ -1,14 +1,19 @@
|
||||
FROM pytorch/manylinux-builder:cpu-2.1
|
||||
FROM pytorch/manylinux2_28-builder:cpu-v2.11.0-rc6
|
||||
|
||||
# Install python
|
||||
ENV PATH /usr/local/bin:$PATH
|
||||
|
||||
RUN echo "alias ll='ls -l --color=auto'" >> /root/.bashrc
|
||||
|
||||
# Set pip&python
|
||||
RUN cd /usr/local/bin \
|
||||
&& ln -s /opt/_internal/cpython-3.9.0/bin/pip3.9 pip3.9 \
|
||||
&& ln -s /opt/_internal/cpython-3.10.1/bin/pip3.10 pip3.10 \
|
||||
&& ln -s /opt/_internal/cpython-3.11.0/bin/pip3.11 pip3.11 \
|
||||
&& ln -s /opt/_internal/cpython-3.9.0/bin/python3.9 python3.9 \
|
||||
&& ln -s /opt/_internal/cpython-3.10.1/bin/python3.10 python3.10 \
|
||||
&& ln -s /opt/_internal/cpython-3.11.0/bin/python3.11 python3.11 \
|
||||
&& ln -s python3.9 python3
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/pip3.10 pip3.10 \
|
||||
&& ln -sf /opt/_internal/cpython-3.11.15/bin/pip3.11 pip3.11 \
|
||||
&& ln -sf /opt/_internal/cpython-3.12.13/bin/pip3.12 pip3.12 \
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/pip3.10 pip3 \
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/python3.10 python3.10 \
|
||||
&& ln -sf /opt/_internal/cpython-3.11.15/bin/python3.11 python3.11 \
|
||||
&& ln -sf /opt/_internal/cpython-3.12.13/bin/python3.12 python3.12 \
|
||||
&& ln -sf /opt/_internal/cpython-3.10.20/bin/python3.10 python3
|
||||
|
||||
# Set pip source
|
||||
RUN mkdir /root/.pip \
|
||||
@@ -35,16 +40,16 @@ RUN if [ "$CONFIG_FOR_LCOV" = "1" ]; then \
|
||||
fi
|
||||
|
||||
# Install pip package(build)
|
||||
RUN pip3.9 install pyyaml \
|
||||
&& pip3.9 install torch==2.1.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.9 install numpy==1.21.3
|
||||
|
||||
RUN pip3.10 install pyyaml \
|
||||
&& pip3.10 install torch==2.1.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.10 install numpy==1.21.3
|
||||
&& pip3.10 install torch==2.11.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.10 install numpy==1.23.2
|
||||
|
||||
RUN pip3.11 install pyyaml \
|
||||
&& pip3.11 install torch==2.1.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.11 install numpy==1.23.2
|
||||
&& pip3.11 install torch==2.11.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.11 install numpy==1.26.2
|
||||
|
||||
RUN pip3.12 install pyyaml \
|
||||
&& pip3.12 install torch==2.11.0+cpu --index-url https://download.pytorch.org/whl/cpu \
|
||||
&& pip3.12 install numpy==1.26.2
|
||||
|
||||
WORKDIR /home
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/test/cpu
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
pyyaml
|
||||
setuptools
|
||||
|
||||
@@ -703,8 +703,10 @@ classifiers = [
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
]
|
||||
|
||||
requirements = ['torch==2.11.0+cpu' if platform.machine() == 'x86_64' else 'torch==2.11.0']
|
||||
|
||||
setup(
|
||||
name=os.environ.get('TORCH_NPU_PACKAGE_NAME', 'torch_npu'),
|
||||
@@ -729,6 +731,7 @@ setup(
|
||||
define_macros=[('_GLIBCXX_USE_CXX11_ABI', '1' if USE_CXX11_ABI else '0'), ('GLIBCXX_USE_CXX11_ABI', '1' if USE_CXX11_ABI else '0')]
|
||||
),
|
||||
],
|
||||
install_requires=requirements,
|
||||
extras_require={
|
||||
},
|
||||
package_data={
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--extra-index-url https://download.pytorch.org/whl/test/cpu
|
||||
--extra-index-url https://download.pytorch.org/whl/cpu
|
||||
-f https://data.pyg.org/whl/torch-2.10.0+cpu.html
|
||||
|
||||
coverage
|
||||
|
||||
@@ -520,7 +520,7 @@ bool IsGteCANNVersion(const std::string version, const std::string module)
|
||||
if (major1 == 8 && minor1 < 5 && major2 == 8 && minor2 < 5) {
|
||||
current_num = VersionToNum(currentVersion);
|
||||
boundary_num = VersionToNum(version);
|
||||
} else if (major1 >= 8 && minor1 >= 5 && major2 >= 8 && minor2 >= 5) {
|
||||
} else if ((major1 == 8 && minor1 == 5 && major2 == 8 && minor2 == 5) or (major1 > 8 && major2 > 8)) {
|
||||
current_num = VersionV2ToNum(currentVersion);
|
||||
boundary_num = VersionV2ToNum(version);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user