summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-11-09 22:32:31 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-11-09 22:32:31 +0100
commit2e63c4a31f946a8bafa92c49c1a0a116c0eb6dae (patch)
tree9d9b1022350a21d106a954513cc9567fd974e781 /default.nix
parent5c708bb3a0c9faec82a0deb32478370f9d780ea8 (diff)
downloadlibs-lbm-2e63c4a31f946a8bafa92c49c1a0a116c0eb6dae.tar.gz
Fixing rocm up
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix22
1 files changed, 19 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index cc36692..e577796 100644
--- a/default.nix
+++ b/default.nix
@@ -36,14 +36,22 @@ let
'';
};
- adaptive-cpp = pkgs.callPackage .nix/adaptive-cpp.nix {
+ # One builder, two instances, so the ROCm and non-ROCm toolchains differ in
+ # exactly one input and nothing else.
+ mkAdaptiveCpp = enableRocm: pkgs.callPackage .nix/adaptive-cpp.nix {
inherit stdenv llvmPackages lld;
config = {
- inherit rocm;
+ rocm = enableRocm;
};
};
+ adaptive-cpp-base = mkAdaptiveCpp false;
+ adaptive-cpp-rocm = mkAdaptiveCpp true;
+
+ # What the examples and the default build use. Flip with --arg rocm true.
+ adaptive-cpp = if rocm then adaptive-cpp-rocm else adaptive-cpp-base;
+
forstio = let
forstioSrc = stdenv.mkDerivation {
name = "forstio-src";
@@ -77,8 +85,16 @@ in rec {
core = pkgs.callPackage ./modules/core/.nix/derivation.nix {
inherit forstio stdenv clang-tools pname version;
};
+ # Both toolchains, same sources, same everything else -- so a failure
+ # in one and not the other points at the backend rather than the code.
sycl = pkgs.callPackage ./modules/sycl/.nix/derivation.nix {
- inherit forstio stdenv clang-tools pname version kel adaptive-cpp;
+ inherit forstio stdenv clang-tools pname version kel;
+ adaptive-cpp = adaptive-cpp-base;
+ };
+ sycl-rocm = pkgs.callPackage ./modules/sycl/.nix/derivation.nix {
+ inherit forstio stdenv clang-tools pname version kel;
+ adaptive-cpp = adaptive-cpp-rocm;
+ variant = "-rocm";
};
};
};