Programming language for writing efficient custom operators with native support for Python standard specifications
Project description
pyasc
🔥Latest News
- [2025/11] pyasc项目首次上线。
🚀概述
pyasc是一种用于编写高效自定义算子的编程语言,原生支持python标准规范。基于pyasc编写的算子程序,通过编译器编译和运行时调度,运行在昇腾AI处理器上。
pyasc编程接口与Ascend C类库接口一一对应,旨在提供与Ascend C接口相同的编程能力,目前正逐步开放中。有关pyasc编程接口的支持范围和约束,请参考Ascend C API。对于编程所需的抽象硬件架构和编程模型的相关知识,请参考《Ascend C算子开发》。本项目支持的AI处理器包括:Ascend 910C、Ascend 910B。
🔍目录结构
关键目录如下:
├── bin # 工具文件
├── docs # 说明文档
│ ├── figures # 文档图片
│ └── python-api # API接口文档
├── include # 后端头文件和td文件
│ └── ascir ## ascir头文件和td文件
├── lib # 后端源文件
│ ├── Dialect ## mlir方言定义源文件
│ ├── TableGen ## tablegen扩展代码文件
│ └── Target ## mlir目标代码转换源文件
├── python # python前端代码
│ ├── asc ## 用户可见的python包,对外发布的wheel包中以此目录为主,其他代码则按需打包
│ ├── src ## pybind相关代码,cpp格式
│ ├── test ## python格式的测试用例集
│ └── tutorials ## 供用户参考的样例集
└── test # 后端的测试用例集
├── Dialect ## mlir方言定义模块测试用例
├── Target ## mlir目标代码转换模块测试用例
└── tools ## 后端工具相关测试用例
⚡️快速入门
若您希望快速体验pyasc的使用过程,请访问如下文档获取简易教程。
📖学习教程
若您希望深入体验项目或参与项目贡献,请访问如下文档获取详细教程。
- API列表:介绍项目提供的Ascend C Python API信息,方便快速查询。
- 调试调优:介绍常见的算子调试和调优方法。
- pyasc模块与架构:介绍pyasc的模块与架构。
- Ascend C Python编程接口开发指南:介绍如何开发Ascend C API的Python编程接口。
- pyasc的python语法支持情况说明:介绍pyasc项目支持和不支持的python语法。
- API文档自动生成工具使用指南:介绍本项目接口文档的生成方法。
💻 软硬件配套说明
pyasc所需的软硬件环境依赖如下:
- 昇腾产品:Atlas A2训练/推理产品, Atlas A3训练/推理产品
- CPU架构:
aarch64/x86_64 - 系统:支持的Linux(进行兼容性查询)
- 软件依赖:
python3.9-3.12
不同pyasc发行版可支持的硬件平台及所需的CANN版本如下表:
| pyasc社区版本 | 支持CANN包版本 | 支持昇腾产品 |
|---|---|---|
| v1.1.0 | 社区版8.5.0.alpha001及以上 | Atlas A2训练/推理产品 Atlas A3训练/推理产品 |
| v1.0.0 | 社区版8.5.0.alpha001、8.5.0.alpha002 | Atlas A2训练/推理产品 Atlas A3训练/推理产品 |
👥 合作贡献者
- 哈尔滨工业大学苏统华老师团队、王甜甜老师团队
📝相关信息
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyasc-0.4.0-cp312-cp312-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp312-cp312-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 12.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f76f73c2488203852c5a4b71b7abdeb0f1829c43bae0b83254c568d71afbe00
|
|
| MD5 |
677cb82fdf06cc6ef40057ce02c77070
|
|
| BLAKE2b-256 |
c4e59ae47c29e20c1e6a0babb98b565aa5ac1dfba709ce55dcdff99febeaf0a1
|
File details
Details for the file pyasc-0.4.0-cp312-cp312-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp312-cp312-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 34.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93e22bdb1fe1246360cb86530eb5828d1d656ebd0eb4bd11f91f3dc1dbe28f2e
|
|
| MD5 |
87e980ce3437880e743a5f6aeb12353b
|
|
| BLAKE2b-256 |
d2e65c792ebdbf21296d91b8cff4933ad9a0b7df3385e7f685baea41548a2f09
|
File details
Details for the file pyasc-0.4.0-cp311-cp311-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp311-cp311-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 12.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eade409743a811dc03852a5d99ab6cf4642beb57b604185c3eeaa7562fb1253
|
|
| MD5 |
c7618b3d5d01d278b079d8d633db39cf
|
|
| BLAKE2b-256 |
5e8ced5c8179ac3691fb59162c439cae681c2bcdcb737fa64f6d3ccb3e1ce28d
|
File details
Details for the file pyasc-0.4.0-cp311-cp311-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp311-cp311-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 35.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
184e6b5d10d7b33bad6b02feea336d16a51714215f621a246609a866b86f3698
|
|
| MD5 |
a708cc3e9d4bed451cc6542930df1867
|
|
| BLAKE2b-256 |
156c67d60658104801fee7b8f5caa6b384b097b72d4b3a67c4368e32699b410d
|
File details
Details for the file pyasc-0.4.0-cp310-cp310-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp310-cp310-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 12.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
231337ad6115b9519fcceb882b5e2a364374b2b7e830caf0d9f246eaddb492d2
|
|
| MD5 |
7f70320b37196e1e82746b365d177690
|
|
| BLAKE2b-256 |
0b3c27e09d3ba0f70e12bec1afc6a68209aee63e7c85efe033f3e6935efbe4f3
|
File details
Details for the file pyasc-0.4.0-cp310-cp310-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp310-cp310-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 35.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5617d77eefee66f4143465dd65b642a832670c73ea1a97a1b1cbccf00aca9239
|
|
| MD5 |
363e782719199df25a13f9321d6c84ea
|
|
| BLAKE2b-256 |
b356d0ac12681e35d0bc5d32ee49860bb4ee88613d9f2acb41d8c8fdd89faab6
|
File details
Details for the file pyasc-0.4.0-cp39-cp39-manylinux_2_31_x86_64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp39-cp39-manylinux_2_31_x86_64.whl
- Upload date:
- Size: 12.7 MB
- Tags: CPython 3.9, manylinux: glibc 2.31+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b765c3289cad1ea044b947565031612b36176b7490af735c94d13cf5adf6397d
|
|
| MD5 |
90ae43fb6f04ae1dac5c24321ef4d393
|
|
| BLAKE2b-256 |
48db9fa4c7d41e9c123d777a3a733b1977d6e88099d516dcdb9987d4b64e748a
|
File details
Details for the file pyasc-0.4.0-cp39-cp39-manylinux_2_31_aarch64.whl.
File metadata
- Download URL: pyasc-0.4.0-cp39-cp39-manylinux_2_31_aarch64.whl
- Upload date:
- Size: 35.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.31+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cef36aa1705e2af1dcc1982d34e12eff1aafa1dee23aba2133baa15b46e6292b
|
|
| MD5 |
36988ce6d817648008769cfb6927145b
|
|
| BLAKE2b-256 |
0c3951221807c77a6f15081cdfd1ce7bb58aa910fc5b6eb2c0731375e02866cd
|