TCL kernels for NPU
Project description
furiosa-kernels
A Python package providing TCL kernels as reusable Kernel data objects.
Install
cd /path/to/npu-tools/furiosa-kernels
pip install -e ".[dev]"
Test
pytest tests/ -v
Usage
Load a kernel from a .tc file
from furiosa_kernels import Kernel
k = Kernel.from_file(name='my_kernel', path='path/to/my_kernel.tc')
print(k.dsl)
Build a kernel with Python eDSL
import furiosa.tcl as tcl
from furiosa_kernels import Kernel
@tcl.kernel
def my_kernel(
weight: bf16[E, D, F],
gather_index: i32[G],
) -> bf16[G, D, F]:
output: bf16[G, D, F] = tcl.gather(weight, gather_index, E)
return output
k = Kernel.from_edsl(my_kernel)
print(k.dsl)
CLI: convert eDSL to DSL
scripts/run_kernel.py converts @tcl.kernel functions to TCL IR:
# Print generated DSL for a kernel
python scripts/run_kernel.py convert path/to/kernels.py my_kernel
# List all @tcl.kernel functions in a file
python scripts/run_kernel.py list path/to/kernels.py
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
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
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 furiosa_kernels-2026.3.0-py3-none-any.whl.
File metadata
- Download URL: furiosa_kernels-2026.3.0-py3-none-any.whl
- Upload date:
- Size: 507.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e9b66f982173c3b7c63f1d5d96ccef53f69421839b27cd88e7be10a74bbb18c
|
|
| MD5 |
2c677f18f535b1aef1150cdd1703ff9b
|
|
| BLAKE2b-256 |
c98796f0bcee0c8cc0ed24708e4cfc0bc141709a69d54a4d1ec02a04c4850ded
|