![]() Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33?narHash=sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U%3D' (2023-10-04) → 'github:edolstra/flake-compat/ff81ac966bb2cae68946d5ed5fc4994f96d0ffec?narHash=sha256-NeCCThCEP3eCl2l/%2B27kNNK7QrwZB1IJCrXfrbv5oqU%3D' (2024-12-04) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/06cf0e1da4208d3766d898b7fdab6513366d45b9?narHash=sha256-S5kVU7U82LfpEukbn/ihcyNt2%2BEvG7Z5unsKW9H/yFA%3D' (2024-09-29) → 'github:NixOS/nixpkgs/d70bd19e0a38ad4790d3913bf08fcbfc9eeca507?narHash=sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ%3D' (2024-12-19) • Updated input 'utils': 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a?narHash=sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ%3D' (2024-09-17) → 'github:numtide/flake-utils/11707dc2f618dd54ca8739b309ec4fc024de578b?narHash=sha256-l0KFg5HjrsfsO/JpG%2Br7fRrqm12kzFHyUHqHCVpMMbI%3D' (2024-11-13) |
||
---|---|---|
pkgs | ||
tests | ||
.gitignore | ||
default.nix | ||
flake.lock | ||
flake.nix | ||
README.md | ||
shell.nix |
Tenstorrent Software (unofficial, WIP)
Installing kmod
Add this flake to your configuration flake's inputs and pin its nixpkgs
to your version.
tt-flake = {
url = "github:Artturin/tt-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
Enable hugepages and IOMMU passthrough. One 1G page is needed per Grayskull, and two for each Wormhole. Add the kernel module to your configuration.
flake.nix
:
hostname = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
...
(import ./machines/hostname/configuration.nix)
# perhaps this module could be shipped by the flake in the future
({ pkgs, ... }: {
boot.extraModulePackages = [ tt-flake.packages.x86_64-linux.kmd ];
boot.kernelParams = [ "hugepagesz=1G" "hugepages=2" "iommu=pt" ];
boot.kernelModules = [ "tenstorrent" ];
services.udev.packages = [ tt-flake.packages.x86_64-linux.udev-rules ];
})
...
Reboot and run the tests. Some of the tests may require root.
nix run github:Artturin/tt-flake#kmd-test
If you get AER is disabled.
add --skip-aer
.
You should see testing output on stdout, and some errors (with a possible stack trace) in dmesg.
stdout
:
Testing /dev/tenstorrent/0 @ 0000:a8:00.0
Testing /dev/tenstorrent/1 @ 0000:76:00.0
dmesg
:
[ 173.045092] tenstorrent: pin_user_pages_longterm failed: -14
[ 173.046086] tenstorrent: could only pin 1 of 2 pages
As far as I can tell, these failures are exercised by the tests, and a clean stdout
means there is no issue.