Skip to content
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
49 changes: 9 additions & 40 deletions nix-builder/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ final: prev:
(import ./pkgs/python-modules/hooks)
];

xpuPackages = final.xpuPackages_2025_3_1;
xpuPackages = final.xpuPackages_2025_3_2;
}
// (import ./pkgs/cutlass { pkgs = final; })
// (
Expand All @@ -284,42 +284,11 @@ final: prev:
}) versions
)
)
// (
let
flattenVersion = prev.lib.strings.replaceStrings [ "." ] [ "_" ];
readPackageMetadata = path: (builtins.fromJSON (builtins.readFile path));
versions = [
"7.1.1"
"7.2.1"
];
newRocmPackages = final.callPackage ./pkgs/rocm-packages { };
in
builtins.listToAttrs (
map (version: {
name = "rocmPackages_${flattenVersion (prev.lib.versions.majorMinor version)}";
value = newRocmPackages {
packageMetadata = readPackageMetadata ./pkgs/rocm-packages/rocm-${version}-metadata.json;
};
}) versions
)
)
// (
let
flattenVersion = prev.lib.strings.replaceStrings [ "." ] [ "_" ];
readPackageMetadata = path: (builtins.fromJSON (builtins.readFile path));
xpuVersions = [
"2025.3.2"
"2026.0.0"
"2026.1.0"
];
newXpuPackages = final.callPackage ./pkgs/xpu-packages { };
in
builtins.listToAttrs (
map (version: {
name = "xpuPackages_${flattenVersion version}";
value = newXpuPackages {
packageMetadata = readPackageMetadata ./pkgs/xpu-packages/intel-deep-learning-${version}.json;
};
}) xpuVersions
)
)
// (import ./pkgs/rocm-packages {
inherit (final) callPackage;
inherit (prev) lib;
})
// (import ./pkgs/xpu-packages {
inherit (final) callPackage;
inherit (prev) lib;
})
Comment on lines +287 to +294

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

2 changes: 1 addition & 1 deletion nix-builder/pkgs/rocm-packages/components.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ prev.lib.mapAttrs (
inherit (metadata) components deps version;
rocmPackages = final;
}
) prev.packageMetadata
) prev.manifest
56 changes: 25 additions & 31 deletions nix-builder/pkgs/rocm-packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
{
lib,
# Needs to be from the `final` set to get all overrides.
callPackage,
newScope,
}:

{
packageMetadata,
# Needs to be from the `prev` set. `lib` functions are used to create
# the set structure, so using lib from `final` will lead to an infinite
# recursion.
lib,
}:

let
inherit (lib.fixedPoints) extends composeManyExtensions;
flattenVersion = lib.replaceStrings [ "." ] [ "_" ];
mkPackages = callPackage ./mk-packages.nix { };
manifests =
lib.mapAttrs'
(
fileName: type:
let
version = lib.removeSuffix ".json" fileName;
in
{
name = version;
value = lib.importJSON (./manifests/${fileName});
}
)

(builtins.readDir ./manifests);
Comment on lines +14 to +27

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤌


fixedPoint = final: {
inherit lib packageMetadata;
};
composed = composeManyExtensions [
# Hooks
(import ./hooks.nix)
# Base package set.
(import ./components.nix)
# Overrides (adding dependencies, etc.)
(import ./overrides.nix)
# Compiler toolchain.
(callPackage ./llvm.nix { })
# Packages that are joins of other packages.
(callPackage ./joins.nix { })
# Add aotriton
(final: prev: {
inherit (final.callPackage ../aotriton { })
aotriton_0_11_1
aotriton_0_11_2
aotriton_0_12
aotriton_0_13
;
})
];
in
lib.makeScope newScope (extends composed fixedPoint)
lib.mapAttrs' (version: manifest: {
name = "rocmPackages_${flattenVersion (lib.versions.majorMinor version)}";
value = mkPackages manifest;
}) manifests
37 changes: 37 additions & 0 deletions nix-builder/pkgs/rocm-packages/mk-packages.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
callPackage,
newScope,
}:

manifest:

let
inherit (lib.fixedPoints) extends composeManyExtensions;

fixedPoint = final: {
inherit lib manifest;
};
composed = composeManyExtensions [
# Hooks
(import ./hooks.nix)
# Base package set.
(import ./components.nix)
# Overrides (adding dependencies, etc.)
(import ./overrides.nix)
# Compiler toolchain.
(callPackage ./llvm.nix { })
# Packages that are joins of other packages.
(callPackage ./joins.nix { })
# Add aotriton
(final: prev: {
inherit (final.callPackage ../aotriton { })
aotriton_0_11_1
aotriton_0_11_2
aotriton_0_12
aotriton_0_13
;
})
];
in
lib.makeScope newScope (extends composed fixedPoint)
Loading
Loading