CATLASS DSL
CATLASS DSL 是 CATLASS 的 Python 前端。它在 AscendNPU-IR 的基础上构建 TLA Dialect,将 Python 中描述的 TLA 操作降级为 MLIR,并由 AscendNPU-IR 工具链编译为可执行的核函数产物。
目前,CATLASS DSL 主要对 TLA 框架提供了DSL封装,可以使用tla.make_tensor等API来描述TLA操作,完成算子的实现。未来,我们将继续扩展CATLASS DSL,在全量支持TLA tensor抽象接口、矩阵向量计算等接口的基础之上,进行类似CATLASS 模板的封装,实现对齐CATLASS C++模板算子的开发体验。
文档
- 快速开始:安装与首个示例
- Kernel 开发指南:核心概念(语法约束、控制流、Layout、Tensor 接入、编译启动)与调测优化
- DSL 框架开发指南:环境搭建、构建测试、特性开发、进阶 CMake 调试
- API 文档:Kernel / Host API 参考与文档生成
快速开始
安装 CATLASS DSL 并运行首个算子示例,请参阅快速开始。
兼容性
CATLASS DSL 各版本支持的硬件平台及所需的最低 CANN 版本如下表:
| CATLASS DSL 版本 | 最低支持 CANN 包版本 | 支持昇腾产品 |
|---|---|---|
| 当前 | >= 9.1.0 |
Ascend 950PR / Ascend 950DT |
软硬件环境要求:
- CPU 架构:
aarch64/x86_64 - 系统:CANN 支持的 Linux
- 软件依赖:Python
>= 3.10, < 3.14、CMake>= 3.28, < 4.0、Ninja>= 1.12、Clang / Clang++>= 10(构建 AscendNPU-IR 时;推荐 19)、lld、lit、FileCheck 与 LLVM 配套、AscendNPU-IRfeature/regbase@a07821269…
完整的环境要求与安装方式见环境准备。
目录概览
python/tla_dsl/
├── 3rdparty/AscendNPU-IR/ # AscendNPU-IR 子模块
├── catlass/ # Python 前端与运行时
├── csrc/mlir/ # TLA Dialect 与编译器实现
├── docs/ # 文档
├── examples/ # 端到端示例
├── tests/ # 单元、lit 与端到端测试
├── Dockerfile # 开发环境镜像定义
├── build_docker_image.sh # 镜像构建入口
├── build.sh # 项目构建入口
└── requirements.txt # 开发 Python 依赖
Metadata
Release files for ascend-catlass-dsl 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 428.9 MB
Release files / ascend_catlass_dsl-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.2 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
96b91371cf1b5752c8c189b646293e247596f1464b50f50ab787f6d020f92f91
|
|
BLAKE2b-256 checksum How to use checksums |
b77af1c6fa0ad956ca28985db8d964f4e529c92ec59a550bc89e9acbe298f1b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 52.9 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
35f9d32149059d3334a669662be61d7e6e6305e78457ec7eeb7a65f674bbc60e
|
|
BLAKE2b-256 checksum How to use checksums |
1dc1fff1882bf1f71622111339408b06ba271677d6f62a80acab9f40fc12f4ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.2 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
14217606f603b438b9d6a9ab59c0ae472245bb08ae81dea40103075a9173e545
|
|
BLAKE2b-256 checksum How to use checksums |
24143be1ca85ca9debb9dacd3315a632a0783faeb1e211032b374b17f12114f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 52.9 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
d10d7eb4d4c69e450ba4f0acb0a5d915a839a7c32b8bd71e170982d9f9b33165
|
|
BLAKE2b-256 checksum How to use checksums |
96824051c42517337833e0f2d806b8d55fe45dcb72715b409c5249630837185e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.3 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1c9e0f7e6e933a2ea658145777af51c8bf352b8e06a25c453de4bc6c7b74a130
|
|
BLAKE2b-256 checksum How to use checksums |
e8a41a8e7ce018573de1ad6f3ca9a26ea6037462adf00f37c0429df79710b8a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 53.0 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
5f8a7250129ab4cbd1d6fb8aa3430cf48668c1d1d954b28399399b4d90238190
|
|
BLAKE2b-256 checksum How to use checksums |
0b8d2ae0a5af0ef6efc91c8e2992a7e2786302b720a0de18ffe8471d4e8f74ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 54.3 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
877118cf57d21d3fce58efe1d38729854bba08404ffaeb7e1573f39a1557226b
|
|
BLAKE2b-256 checksum How to use checksums |
261911650f43f9ec5237f18e23d1202cd08bfffa7815f1af5077f3b6da0433f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / ascend_catlass_dsl-2.1.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | ascend_catlass_dsl-2.1.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 53.0 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
90a127e9754368c18891d2d99f72d503f4ce8f543ed285bd1da48e4abf9bb7d4
|
|
BLAKE2b-256 checksum How to use checksums |
c8dd0f06163189a8073e42f5fb350c2228908e113f496230fb519ac2c2514e93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logSecurity for ascend-catlass-dsl 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for ascend_catlass_dsl-2.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.