Update metal to 0.53.0

Use prebuilt sfpi which is patched to work on NixOS and nix sandbox and
elsewhere.
This commit is contained in:
Artturin 2024-12-17 21:39:41 +02:00
parent 8f850c7c62
commit 9abd0fb916
3 changed files with 32 additions and 4 deletions

View file

@ -52,6 +52,7 @@
udev-rules = scope.kmd.udev-rules;
kmd-test = scope.kmd.test;
sfpi = scope.sfpi.sfpi;
sfpi-prebuilt = scope.sfpi.prebuilt;
tt-gcc = scope.sfpi.tt-gcc;
smi = scope.smi;
luwen = scope.luwen.luwen;

View file

@ -21,7 +21,7 @@ let
llvmPackages = llvmPackages_17;
depsDir = "deps";
version = "unstable-2024-10-04";
version = "0.53.0";
metal-deps = metal.overrideAttrs (previousAttrs: {
name = "tt-metal-deps-${version}.tar.gz";
@ -63,8 +63,8 @@ let
src = fetchFromGitHub {
owner = "tenstorrent";
repo = "tt-metal";
rev = "697ccc724048108e9f11a3c9ed5171a17ac9fd9c";
hash = "sha256-pBfJAtSyRKtU3iG2P3hVuo2LXHBFOU+3XmRkbDuDvDQ=";
rev = "154e6993aed78213446c59731e41c3617d83c1f1";
hash = "sha256-edtlE4CVsTO4BW0PKhkN0IxdV666Tu/Y1jgZ2Exljeo=";
fetchSubmodules = true;
fetchLFS = true;
};
@ -106,7 +106,7 @@ let
substituteInPlace tt_metal/hw/CMakeLists.txt \
--replace-fail "FetchContent_MakeAvailable(sfpi)" ""
mkdir -p runtime
ln -s ${sfpi.sfpi} runtime/sfpi
ln -s ${sfpi.prebuilt} runtime/sfpi
'';
ARCH_NAME = "wormhole_b0";

View file

@ -27,5 +27,32 @@ rec {
'';
};
prebuilt = pkgs.stdenv.mkDerivation rec {
pname = "tt-gcc";
version = "5.0.0";
src = pkgs.fetchzip {
url = "https://github.com/tenstorrent/sfpi/releases/download/v5.0.0/sfpi-release.tgz";
hash = "sha256-RBhJ6BWmvB06zWoELTumpzroHDMpNXU0/WC6elgAkW0=";
};
nativeBuildInputs = with pkgs; [
autoPatchelfHook
];
buildInputs = with pkgs; [
libmpc
mpfr
gmp
zlib
expat
];
installPhase = ''
cp -r . $out
'';
};
tt-gcc = import ./tt-gcc.nix { inherit pkgs; };
}