Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
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
9 changes: 5 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
};
inherit (nixpkgs) lib;

buildVersion = import ./lib/build-version.nix;
buildName = (import ./lib/build-variants.nix { inherit lib; }).buildName;

buildSets = defaultBuildSetsPerSystem.${system};

Expand Down Expand Up @@ -152,11 +152,12 @@
++ allOutputs python3Packages.kernels
++ lib.optionals stdenv.hostPlatform.isLinux (allOutputs stdenvGlibc_2_27)
);
buildSetLinkFarm = buildSet: pkgs.linkFarm (buildVersion buildSet) (buildSetOutputs buildSet);
buildSetLinkFarm =
buildSet: pkgs.linkFarm (buildName buildSet.buildConfig) (buildSetOutputs buildSet);
in
pkgs.linkFarm "packages-for-cache" (
map (buildSet: {
name = buildVersion buildSet;
name = buildName (buildSet.buildConfig);
path = buildSetLinkFarm buildSet;
}) buildSets
);
Expand All @@ -182,7 +183,7 @@
# This package set is exposed so that we can prebuild the Torch versions.
torch = builtins.listToAttrs (
map (buildSet: {
name = buildVersion buildSet;
name = buildName (buildSet.buildConfig);
value = buildSet.torch;
}) buildSets
);
Expand Down
36 changes: 0 additions & 36 deletions lib/build-version.nix

This file was deleted.

8 changes: 4 additions & 4 deletions lib/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

let
abi = torch: if torch.passthru.cxx11Abi then "cxx11" else "cxx98";
torchBuildVersion = import ./build-version.nix;
buildName = (import ./build-variants.nix { inherit lib; }).buildName;
supportedCudaCapabilities = builtins.fromJSON (
builtins.readFile ../build2cmake/src/cuda_supported_archs.json
);
Expand Down Expand Up @@ -171,7 +171,7 @@ rec {
extensionForTorch =
{ path, rev }:
buildSet: {
name = torchBuildVersion buildSet;
name = buildName buildSet.buildConfig;
value = mkTorchExtension buildSet {
inherit path rev doGetKernelCheck;
stripRPath = true;
Expand Down Expand Up @@ -235,7 +235,7 @@ rec {
mkShell = pkgs.mkShell.override { inherit (buildSet.extension) stdenv; };
in
{
name = torchBuildVersion buildSet;
name = buildName buildSet.buildConfig;
value = mkShell {
nativeBuildInputs = with pkgs; pythonNativeCheckInputs python3.pkgs;

Expand Down Expand Up @@ -275,7 +275,7 @@ rec {
mkShell = pkgs.mkShell.override { inherit (buildSet.extension) stdenv; };
in
{
name = torchBuildVersion buildSet;
name = buildName buildSet.buildConfig;
value = mkShell {
nativeBuildInputs =
with pkgs;
Expand Down
Loading