Skip to main content

PTO kernels

Project description

pto-kernels

A collection of high-performance custom kernels for Ascend NPUs, built on top of pto-isa — the Parallel Tile Operation virtual instruction set architecture designed by Ascend CANN.

PTO focuses on tile-level operations, enabling efficient, composable kernel development targeting Huawei's Ascend AI processors.


Prerequisites

  • A configured torch-npu environment
  • Ascend toolkit installed at /usr/local/Ascend/ascend-toolkit

Run the one-time setup before building:

make setup_once

Install repository using pip

The repository is "pip installable", i.e.,

export CMAKE_GENERATOR="Unix Makefiles" && pip install -v git+https://github.com/huawei-csl/pto-kernels.git

Build

source /usr/local/Ascend/ascend-toolkit/set_env.sh
pip3 install -r requirements.txt
make wheel

This produces an installable Python wheel:

pto_kernels-X.Y.Z-*.whl

Installation

pip install --force-reinstall pto_kernels-*.whl

Testing

make test

Repository Structure

pto-kernels/
├── csrc/                  # C++ kernel source files
├── python/pto_kernels/    # Python bindings and utilities
├── examples/jit_cpp/      # JIT compilation examples
├── tests/                 # Test suite
├── scripts/               # Helper scripts
├── doxygen/               # API documentation config
└── CMakeLists.txt         # CMake build configuration

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.


License

BSD-3-Clause-Clear — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pto_kernels-0.1.4.tar.gz (503.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pto_kernels-0.1.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.27+ ARM64

pto_kernels-0.1.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_27_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.27+ x86-64

pto_kernels-0.1.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.27+ ARM64

pto_kernels-0.1.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_27_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.27+ x86-64

pto_kernels-0.1.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.27+ ARM64

File details

Details for the file pto_kernels-0.1.4.tar.gz.

File metadata

  • Download URL: pto_kernels-0.1.4.tar.gz
  • Upload date:
  • Size: 503.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pto_kernels-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9a3ec6daad48ff72ef10b616480d64a987ed807ff6e07a7c3ae580538c046974
MD5 bbced3b7f5ee128e614b34a4c753da35
BLAKE2b-256 86fa4fe82286fd63deb13df2cec277e03439e0646f0cbbbd565789a0fdb7302f

See more details on using hashes here.

File details

Details for the file pto_kernels-0.1.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl.

File metadata

File hashes

Hashes for pto_kernels-0.1.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl
Algorithm Hash digest
SHA256 076bca276163ddc3fa4fc92d81afce26daf9540bf51b04a1eae0d3e59743634b
MD5 86705aef4455627adb84d16a3dab9470
BLAKE2b-256 7ccaa023b8cb77e816c70e34b9e21df65bbccb548e0e3572e38326c1c2cbcda6

See more details on using hashes here.

File details

Details for the file pto_kernels-0.1.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pto_kernels-0.1.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 19b8a99918551788dfa393c97f722b3b73c7818c2bc2b37f9ee1a8b1ed6e54df
MD5 634f85b5e8a7745356823ddfee5a981f
BLAKE2b-256 94728e202966ebab15965cad32f6367d55ac15951f9f3fb2d440a828f952ab58

See more details on using hashes here.

File details

Details for the file pto_kernels-0.1.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl.

File metadata

File hashes

Hashes for pto_kernels-0.1.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl
Algorithm Hash digest
SHA256 482efb1ff68d9820451dda729ea75f7fc359270025b337c15c04e32e5a39f660
MD5 3120b75919061183f4038cb0ed619cfe
BLAKE2b-256 f19ccc71be628a58c45507b655cd32a5717c7acd8d49e8846231ba01fe292ec2

See more details on using hashes here.

File details

Details for the file pto_kernels-0.1.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for pto_kernels-0.1.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 3eb381920f4abb7af3403d22447cb0ab5ed2a454f7fa0e376237306a03091000
MD5 efbc8934067efacfe8e55eebac6c33ff
BLAKE2b-256 d4cb229b1ad5025d97fa759ac2eee8473d0d5e2595cef63d69d2f595a0ab12c5

See more details on using hashes here.

File details

Details for the file pto_kernels-0.1.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl.

File metadata

File hashes

Hashes for pto_kernels-0.1.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_27_aarch64.whl
Algorithm Hash digest
SHA256 b32b6b9cab8cee314a2a5e12f6d05d814d54fb36e7f9cc640ece3c2a7ba36e1b
MD5 1a3e45bc309c2ec2445af6bf6ad93f0e
BLAKE2b-256 b289f208acb8577b0bc7aab44d7ad557f5a32c91e4515f2ef3068cb02112eae6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page