Skip to content

feat: add tenstorrent extension #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:
- spin
- stargz-snapshotter
- tailscale
- tenstorrent
- thunderbolt
- uinput
- usb-modem-drivers
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ TARGETS += revpi-firmware
TARGETS += spin
TARGETS += stargz-snapshotter
TARGETS += tailscale
TARGETS += tenstorrent
TARGETS += thunderbolt
TARGETS += uinput
TARGETS += usb-modem-drivers
Expand Down
1 change: 1 addition & 0 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vars:
UTIL_LINUX_SHA256: 5c1daf733b04e9859afdc3bd87cc481180ee0f88b5c0946b16fdec931975fb79
UTIL_LINUX_SHA512: 0024955056ba7b4c54040a917f9919f49692e57ba6d42d17a6c29c1eefe88bf48b1214a545072b71c468829a63a8f15237f49733e9127c134e11126d1e435124
ENA_VERSION: 2.13.3 # update this when updating PKGS_VERSION in Makefile
TENSTORRENT_VERSION: 1.33

# renovate: datasource=git-tags extractVersion=^libtiprc-(?<version>.*)$ depName=git://linux-nfs.org/~steved/libtirpc
LIBTIRPC_VERSION: 1-3-3
Expand Down
35 changes: 35 additions & 0 deletions drivers/tenstorrent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# tenstorrent extension

This extension provides [Tennstorrent](https://github.com/tenstorrent/tt-kmd) drivers for Talos Linux.

## Installation

See [Installing Extensions](https://github.com/siderolabs/extensions#installing-extensions).

## Usage

```yaml
machine:
kernel:
modules:
- name: tenstorrent
```

## Verifying

You can verify the modules are enabled by reading the `/proc/modules` where it _should_ show the module is live.

For example:

```bash
❯ talosctl read /proc/modules
```

In addition, if you actually have Tenstorrent hardware installed, you should be able to verify the devices that begin with `/dev/tenstorrent/*`.

For example:

```bash
❯ talosctl ls -l /dev/tenstorrent/*
NODE MODE UID GID SIZE(B) LASTMOD NAME
```
10 changes: 10 additions & 0 deletions drivers/tenstorrent/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: tenstorrent
version: "$VERSION"
author: Tenstorrent AI ULC
description: |
Driver for Tenstorrent AI processing hardware
compatibility:
talos:
version: ">= v1.9.0"
25 changes: 25 additions & 0 deletions drivers/tenstorrent/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: tenstorrent
variant: scratch
shell: /bin/bash
dependencies:
- stage: base
# The pkgs version for a particular release of Talos as defined in
# https://github.com/siderolabs/talos/blob/<talos version>/pkg/machinery/gendata/data/pkgs
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/tenstorrent-pkg:{{ .VERSION }}"
steps:
- prepare:
- |
sed -i 's#$VERSION#{{ .VERSION }}#' /pkg/manifest.yaml
- install:
- |
mkdir -p /rootfs/usr/lib/modules
mkdir -p /rootfs/etc/udev/rules.d

- |
cp -R /usr/lib/modules/* /rootfs/usr/lib/modules/
cp -R /etc/udev/rules.d/* /rootfs/etc/udev/rules.d/
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
2 changes: 2 additions & 0 deletions drivers/tenstorrent/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# update when pkgs version is updated
VERSION: "{{ .TENSTORRENT_VERSION }}"
Loading