Skip to main content

Python bindings for luwen

Project description

Luwen

Named after Antonie van Leeuwenhoek, inventor of the microscope.

documentation crates.io pkg pypi bindings

About

Luwen is a user-mode abstraction layer for accessing Tenstorrent accelerator hardware, designed to be used as a common interface for tooling development across hardware generations. It runs on the host system and manages communication with lower-level drivers and firmware.

Design

There are three supported use cases:

  1. High-level interface to software tooling allowing all syseng diagnostics collectable via tt-smi and tt-mod to be read back and interacted with as a library.
    • Only supports PCIe connections and remote connections via PCI.
    • Ignores implementation details of using communication channels, such as TLB allocation and core selection.
  2. General chip discovery and initialization, replacing create-ethernet-map and tt-smi. Will probably also add the ability to issue resets.
  3. Low-level syseng-only debug capability (via Python bindings, as pyluwen).
    • To avoid needing to have multiple in-flight stacks, access the implemented communication APIs directly.
    • Direct access to the types defined in luwen-pci, allowing modification of TLBs and cores being used.

Installation

See the included INSTALL.md for detailed instructions on how to build and install Luwen.

Support

Hardware

Luwen officially supports the following Tenstorrent hardware:

  • Wormhole
  • Blackhole

Firmware

Please ensure you have a supported firmware version installed on your device. You can flash the firmware using tt-flash.

[!IMPORTANT]

The current minimum supported firmware version is: v18.

Driver (KMD)

Luwen communicates with your device through a kernel-mode driver. You can find instructions on installing the driver on the project homepage.

[!IMPORTANT]

The current minimum supported driver version is: v2.0.0.

Organization

Cargo — Rust's package manager — allows for a workspace of several crates to be specified within its manifest. Within this project, workspace crates are used with the structure as follows:

./
├── Cargo.lock       # cargo lockfile
├── Cargo.toml       # cargo manifest
├── README.md        # this document
├── ...
├── apps/            # use-case applications
├── bind/            # language bindings
│   ├── libluwen/    # bindings for C++
│   └── pyluwen/     # bindings for Python
├── crates/          # implementation crates
│   ├── luwen-api/   # core generalized API
│   ├── luwen-def/   # common definitions
│   ├── luwen-kmd/   # low-level driver API
│   └── luwen-pci/   # PCI implementation
├── examples/        # application examples
├── src/             # top-level library
└── tests/           # integration tests

License

This project is licensed under Apache License 2.0. You have permission to use this code under the conditions of the license pursuant to the rights it grants.

This software assists in programming Tenstorrent products. Making, using, or selling hardware, models, or IP may require the license of rights (such as patent rights) from Tenstorrent or others.

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

pyluwen-0.7.16.tar.gz (1.7 MB view details)

Uploaded Source

Built Distributions

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

pyluwen-0.7.16-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (771.1 kB view details)

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

pyluwen-0.7.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (771.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyluwen-0.7.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (772.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pyluwen-0.7.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (772.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file pyluwen-0.7.16.tar.gz.

File metadata

  • Download URL: pyluwen-0.7.16.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyluwen-0.7.16.tar.gz
Algorithm Hash digest
SHA256 b75767ee33f3bf45e342d69630bcf6ce0cb43c3692dcc1b7babcecc8eb2bf1bd
MD5 f78a33670583642ac7bd5b68dae30a0b
BLAKE2b-256 0d1f2564cbb01417f4fa1c541a9e6caaea7c7f59522f71f4bf3da66ae2f9778f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluwen-0.7.16.tar.gz:

Publisher: release.yml on tenstorrent/luwen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyluwen-0.7.16-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyluwen-0.7.16-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a0c04fe1c6cbfd63ad9b4c9512c0dc92980a3527cae0dfb33a757e673ec060a4
MD5 341c4749b3e5b4beae607e12f41b5f70
BLAKE2b-256 9bd5c37b3367d1c5c31bd54d36722d2d2b1442f1656ada0ba4d1da3029f532a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluwen-0.7.16-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tenstorrent/luwen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyluwen-0.7.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyluwen-0.7.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3381f98d41ada5fa6608f4653f48862af833c4bec54389b9f559e1bd9179ba7
MD5 6d33aafb547c2aa09b95859642016824
BLAKE2b-256 e0c5c065a2458e8f2d949dbce88603e1b87c6af3828bf8da8db13dc679910f0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluwen-0.7.16-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tenstorrent/luwen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyluwen-0.7.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyluwen-0.7.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5cb9bf870997f4964ad5ee32da565dda496cc4c54173fb1f674ea2e942d6388
MD5 e77ea5e269ad2752ae947ca1e380332f
BLAKE2b-256 5a0c46728f9aade1295eb09eab3f695356ccadd0003affa16a97ca238f8c168f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluwen-0.7.16-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tenstorrent/luwen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyluwen-0.7.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyluwen-0.7.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 23d13e5e543c9eac7af4e9aa5adda6ca637fe2442614606dd78824b23257a2c1
MD5 867c51560d18859ed8387cb3ae5f7b7c
BLAKE2b-256 14167b192edafba352eec2d07c28544277e91c6102f0dc97aea042048a492bd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyluwen-0.7.16-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on tenstorrent/luwen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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