forked from rarias/jungle
Compare commits
27 Commits
mega-merge
...
0a01e7bdf8
| Author | SHA1 | Date | |
|---|---|---|---|
|
0a01e7bdf8
|
|||
|
2aae2c93ab
|
|||
|
7bc6fc9b02
|
|||
|
0994be3b93
|
|||
|
1375a068a0
|
|||
|
a329893fbe
|
|||
|
7c833c556e
|
|||
|
c0dab997a2
|
|||
|
0307b07231
|
|||
|
0aa69ba4f9
|
|||
|
e7622da9df
|
|||
|
4de4b6da1d
|
|||
|
8e30063cdd
|
|||
|
2d5d0053f8
|
|||
|
32acd179f9
|
|||
|
421f0d44e4
|
|||
|
faa4b48538
|
|||
|
3e033836fc
|
|||
|
29c8c4826b
|
|||
|
6765635462
|
|||
|
0a5b3403d4
|
|||
|
6dfa515b3b
|
|||
|
6bef5ab4c6
|
|||
|
02d9f5a062
|
|||
|
fcc9719ccd
|
|||
|
1e36c3b204
|
|||
|
972518c2d8
|
@@ -7,6 +7,7 @@
|
||||
./base/august-shutdown.nix
|
||||
./base/boot.nix
|
||||
./base/env.nix
|
||||
./base/fish.nix
|
||||
./base/fs.nix
|
||||
./base/hw.nix
|
||||
./base/net.nix
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
||||
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
|
||||
ncdu perf ldns pv
|
||||
nix-output-monitor
|
||||
nixfmt-tree
|
||||
# From jungle overlay
|
||||
osumb nixgen
|
||||
];
|
||||
@@ -28,9 +30,22 @@
|
||||
VISUAL = "vim";
|
||||
};
|
||||
|
||||
programs.bash.promptInit = ''
|
||||
PS1="\h\\$ "
|
||||
'';
|
||||
programs.bash.promptInit = # bash
|
||||
''
|
||||
if echo "$PATH" | grep -qc '/nix/store'; then
|
||||
# Inside a nix shell, dumb prompt
|
||||
PS1="\h\\$ "
|
||||
elif [ "$TERM" != "dumb" ] ; then
|
||||
PROMPT_COLOR="1;31m"
|
||||
((UID)) && PROMPT_COLOR="1;32m"
|
||||
|
||||
PS1="\n\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] "
|
||||
|
||||
if test "$TERM" = "xterm"; then
|
||||
PS1="\[\033]2;\h:\u:\w\007\]$PS1"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
time.timeZone = "Europe/Madrid";
|
||||
i18n.defaultLocale = "en_DK.UTF-8";
|
||||
|
||||
3
m/common/base/fish.nix
Normal file
3
m/common/base/fish.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
programs.fish.enable = true;
|
||||
}
|
||||
@@ -87,6 +87,13 @@
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIIFiqXqt88VuUfyANkZyLJNiuroIITaGlOOTMhVDKjf abonerib@bsc"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
fzf
|
||||
jujutsu
|
||||
neovim
|
||||
starship
|
||||
];
|
||||
};
|
||||
|
||||
vlopez = {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{ lib, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common/ssf.nix
|
||||
../module/hut-substituter.nix
|
||||
./hydra.nix
|
||||
];
|
||||
|
||||
# Select this using the ID to avoid mismatches
|
||||
@@ -30,4 +31,22 @@
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
};
|
||||
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
bindAddress = "0.0.0.0";
|
||||
port = 5000;
|
||||
package = pkgs.haskell.lib.overrideSrc (pkgs.haskell.packages.ghc96.nix-serve-ng.override { nix = pkgs.nixVersions.nix_2_28; }) {
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://jungle.bsc.es/git/abonerib/nix-serve-ng.git";
|
||||
rev = "9c056641300a826db66b66d7e584b2541d38927a";
|
||||
hash = "sha256-y69ZchFiZOU71eyeljcQgLxkLk5JUzZfanq8Yzw4MkI=";
|
||||
};
|
||||
version = "unstable";
|
||||
};
|
||||
|
||||
secretKeyFile = "/var/cache-priv-key.pem";
|
||||
# Public key:
|
||||
# 10.0.40.6:8jBhIdXEBap+Qo+vc1/fnV9vj43A2oDk839EEheRr/U=
|
||||
};
|
||||
}
|
||||
|
||||
57
m/weasel/hydra.nix
Normal file
57
m/weasel/hydra.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.hydra = {
|
||||
enable = true;
|
||||
|
||||
# Wrap hydra so it puts quiet flag every time... This is dumb and annoying,
|
||||
# but i can't override the systemd ExecStart without running into infinite
|
||||
# recursion.
|
||||
package = pkgs.symlinkJoin {
|
||||
name = "hydra-quiet";
|
||||
paths = [ pkgs.hydra ];
|
||||
postBuild = ''
|
||||
for prog in hydra-queue-runner hydra-evaluator ; do
|
||||
prev=$(realpath $out/bin/$prog)
|
||||
rm $out/bin/$prog
|
||||
cat >$out/bin/$prog <<EOF
|
||||
#!/bin/sh
|
||||
args=()
|
||||
for arg in "\$@"; do
|
||||
if [ "\$arg" != "-v" ]; then
|
||||
args+=("\$arg")
|
||||
fi
|
||||
done
|
||||
exec $prev --quiet "\''${args[@]}"
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/$prog
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
hydraURL = "http://localhost:3001"; # externally visible URL
|
||||
notificationSender = "hydra@jungle.bsc.es"; # e-mail of Hydra service
|
||||
port = 3001;
|
||||
# a standalone Hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
|
||||
buildMachinesFiles = [ ];
|
||||
# you will probably also want, otherwise *everything* will be built from scratch
|
||||
useSubstitutes = true;
|
||||
listenHost = "0.0.0.0"; # Force IPv4
|
||||
};
|
||||
|
||||
systemd.services.hydra-send-stats.enable = lib.mkForce false;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ config.services.hydra.port ];
|
||||
|
||||
nix.settings.extra-allowed-uris = [
|
||||
"git+ssh://git@bscpm04.bsc.es"
|
||||
"git+ssh://git@gitlab-internal.bsc.es"
|
||||
"https://github.com"
|
||||
"git+ssh://github.com"
|
||||
];
|
||||
}
|
||||
13
overlay.nix
13
overlay.nix
@@ -9,6 +9,9 @@ let
|
||||
bscPkgs = {
|
||||
agenix = prev.callPackage ./pkgs/agenix/default.nix { };
|
||||
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
|
||||
aoccUnwrapped = callPackage ./pkgs/aocc/unwrapped.nix { };
|
||||
aocc = callPackage ./pkgs/aocc/default.nix { };
|
||||
stdenvAocc = final.overrideCC final.stdenv final.aocc;
|
||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||
@@ -34,6 +37,7 @@ let
|
||||
linuxPackages_latest = prev.linuxPackages_latest.extend(_final: _prev: {
|
||||
amd-uprof-driver = _prev.callPackage ./pkgs/amd-uprof/driver.nix { };
|
||||
});
|
||||
llvm-intel = callPackage ./pkgs/llvm-intel/default.nix { };
|
||||
lmbench = callPackage ./pkgs/lmbench/default.nix { };
|
||||
# Broken and unmantained
|
||||
# mcxx = callPackage ./pkgs/mcxx/default.nix { };
|
||||
@@ -55,7 +59,9 @@ let
|
||||
osumb = callPackage ./pkgs/osu/default.nix { };
|
||||
ovni = callPackage ./pkgs/ovni/default.nix { };
|
||||
ovniGit = final.ovni.override { useGit = true; };
|
||||
papi = callPackage ./pkgs/papi/default.nix { papi = prev.papi; };
|
||||
paraverKernel = callPackage ./pkgs/paraver/kernel.nix { };
|
||||
pertalde = callPackage ./pkgs/pertalde/default.nix { };
|
||||
pocl = callPackage ./pkgs/pocl/default.nix { };
|
||||
pocl-unpublished = callPackage ./pkgs/pocl/default.nix {
|
||||
gitUrl = "git@github.com:pocl/unpublished.git";
|
||||
@@ -81,7 +87,14 @@ let
|
||||
tasycl-acpp = callPackage ./pkgs/tasycl/default.nix { useIntel = false; };
|
||||
unified-runtime = callPackage ./pkgs/unified-runtime/default.nix { };
|
||||
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||
taopencl = callPackage ./pkgs/taopencl/default.nix { };
|
||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||
|
||||
_cuda = prev._cuda.extend (_: _prev: final.lib.recursiveUpdate _prev {
|
||||
extensions = _prev.extensions ++ [(finalAttrs: _: {
|
||||
tacuda = finalAttrs.callPackage ./pkgs/tacuda/default.nix { };
|
||||
})];
|
||||
});
|
||||
};
|
||||
|
||||
tests = rec {
|
||||
|
||||
@@ -47,6 +47,7 @@ in
|
||||
inherit version;
|
||||
src = uprofSrc;
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
nativeBuildInputs = [ autoPatchelfHook radare2 ];
|
||||
buildInputs = [
|
||||
|
||||
@@ -18,6 +18,7 @@ in stdenv.mkDerivation {
|
||||
set +x
|
||||
'';
|
||||
hardeningDisable = [ "pic" "format" ];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
patches = [ ./makefile.patch ./hrtimer.patch ./remove-wr-rdmsrq.patch ];
|
||||
makeFlags = [
|
||||
|
||||
17
pkgs/aocc/default.nix
Normal file
17
pkgs/aocc/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
wrapCCWith,
|
||||
aoccUnwrapped,
|
||||
}:
|
||||
|
||||
let
|
||||
cc = aoccUnwrapped;
|
||||
in
|
||||
wrapCCWith {
|
||||
inherit cc;
|
||||
nixSupport.cc-cflags = [ "-isystem ${cc}/include" ];
|
||||
|
||||
extraBuildCommands = ''
|
||||
wrap aocc $wrapper $ccPath/clang
|
||||
wrap aocc++ $wrapper $ccPath/clang++
|
||||
'';
|
||||
}
|
||||
52
pkgs/aocc/unwrapped.nix
Normal file
52
pkgs/aocc/unwrapped.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
lib,
|
||||
fetchurl,
|
||||
stdenv,
|
||||
autoPatchelfHook,
|
||||
rocmPackages,
|
||||
zlib,
|
||||
libffi,
|
||||
elfutils,
|
||||
}:
|
||||
|
||||
let
|
||||
# in newer nixpkgs the runtime is hsakmt
|
||||
rocmRuntime = if rocmPackages ? hsakmt then rocmPackages.hsakmt else rocmPackages.rocm-runtime;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "aocc-compiler";
|
||||
version = "5.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.amd.com/developer/eula/aocc/aocc-5-0/aocc-compiler-5.0.0.tar";
|
||||
sha256 = "sha256-lm+sLSx1np3m6WnBCtp6ezBsET9/HgfqN2gp7IY4Dao=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
buildInputs = [
|
||||
elfutils
|
||||
zlib
|
||||
rocmRuntime
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"installPhase"
|
||||
"fixupPhase"
|
||||
];
|
||||
dontStrip = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -a . $out/
|
||||
|
||||
ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit rocmRuntime;
|
||||
isClang = true; # Needed for wrapCCWith
|
||||
};
|
||||
|
||||
meta.mainProgram = "clang";
|
||||
}
|
||||
@@ -59,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.pm.bsc.es/rarias/bench6";
|
||||
|
||||
@@ -16,6 +16,8 @@ stdenv.mkDerivation {
|
||||
};
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/rodarima/bigotes";
|
||||
description = "Versatile benchmark tool";
|
||||
|
||||
@@ -10,11 +10,14 @@
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "cudainfo";
|
||||
src = ./.;
|
||||
buildInputs = [
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
cudatoolkit # Required for nvcc
|
||||
(lib.getOutput "static" cudaPackages.cuda_cudart) # Required for -lcudart_static
|
||||
autoAddDriverRunpath
|
||||
];
|
||||
buildInputs = [
|
||||
(lib.getOutput "static" cudaPackages.cuda_cudart) # Required for -lcudart_static
|
||||
];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a cudainfo $out/bin
|
||||
@@ -23,6 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
name = "cudainfo-test";
|
||||
requiredSystemFeatures = [ "cuda" ];
|
||||
dontBuild = true;
|
||||
strictDeps = true;
|
||||
nativeCheckInputs = [
|
||||
finalAttrs.finalPackage # The cudainfo package from above
|
||||
strace # When it fails, it will show the trace
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#, python3Packages
|
||||
, installShellFiles
|
||||
, symlinkJoin
|
||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||
, enablePapi ? true
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
|
||||
patches = [ ./rdma-core.patch ./max-mem.patch ];
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ let
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,etc,lib,include}
|
||||
mkdir -p $out/share/man
|
||||
@@ -150,6 +151,7 @@ let
|
||||
];
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [ "libhwloc.so.5" ];
|
||||
|
||||
@@ -193,6 +195,7 @@ let
|
||||
];
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [ "libsycl.so.6" ];
|
||||
|
||||
@@ -260,6 +263,7 @@ let
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
@@ -348,6 +352,7 @@ let
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib}
|
||||
|
||||
200
pkgs/llvm-intel/default.nix
Normal file
200
pkgs/llvm-intel/default.nix
Normal file
@@ -0,0 +1,200 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
ninja,
|
||||
addDriverRunpath,
|
||||
cmake,
|
||||
emhash,
|
||||
fetchFromGitHub,
|
||||
khronos-ocl-icd-loader,
|
||||
libbacktrace,
|
||||
opencl-headers,
|
||||
parallel-hashmap,
|
||||
perl,
|
||||
pkg-config,
|
||||
python3,
|
||||
spirv-headers,
|
||||
spirv-tools,
|
||||
symlinkJoin,
|
||||
zlib,
|
||||
|
||||
cudaPackages,
|
||||
enableCuda ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "6.2.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "llvm";
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-j8+DmGKO0qDF5JjH+DlkLKs1kBz6dS7ukwySd/Crqv0=";
|
||||
};
|
||||
|
||||
pinned = {
|
||||
inherit parallel-hashmap;
|
||||
|
||||
vc-intrinsics.src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "vc-intrinsics";
|
||||
rev = "4e51b2467104a257c22788e343dafbdde72e28bb";
|
||||
sha256 = "sha256-AHXeKbih4bzmcuu+tx2TeS7Ixmk54uS1vKFVxI6ZP8g=";
|
||||
};
|
||||
|
||||
unified-memory-framework.src = fetchFromGitHub {
|
||||
owner = "oneapi-src";
|
||||
repo = "unified-memory-framework";
|
||||
tag = "v0.11.0";
|
||||
sha256 = "sha256-k8QdP2u1QOoeCZ6ps4sM8+1iZq/H3q0lqCfVk8mz9KI=";
|
||||
};
|
||||
|
||||
ocl-headers = opencl-headers.overrideAttrs {
|
||||
version = "2024.10.24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "OpenCL-Headers";
|
||||
tag = "v2024.10.24";
|
||||
sha256 = "sha256-KDlruE0IG8d+lAChxYyc6dg5XOvqCMrMyO69sdAzejA=";
|
||||
};
|
||||
};
|
||||
|
||||
ocl-icd = khronos-ocl-icd-loader;
|
||||
|
||||
spirv-headers = spirv-headers.overrideAttrs {
|
||||
version = "1.4.309.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "SPIRV-Headers";
|
||||
tag = "vulkan-sdk-1.4.309.0";
|
||||
sha256 = "sha256-Q1i6i5XimULuGufP6mimwDW674anAETUiIEvDQwvg5Y=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fetchcontent_cmakeFlags = lib.mapAttrsToList (
|
||||
name: value: (lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_${lib.toUpper name}" (toString value.src))
|
||||
) pinned;
|
||||
|
||||
# Hack to fix #include <emhash/...>
|
||||
emhash' = symlinkJoin {
|
||||
name = "emhash";
|
||||
paths = [ emhash ];
|
||||
postBuild = ''
|
||||
pushd $out/include
|
||||
ln -s . emhash
|
||||
popd
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "intel-llvm";
|
||||
inherit src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
spirv-tools
|
||||
addDriverRunpath
|
||||
]
|
||||
++ lib.optionals enableCuda [
|
||||
cudaPackages.cuda_nvcc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
emhash'
|
||||
libbacktrace
|
||||
zlib
|
||||
|
||||
pinned.ocl-icd
|
||||
pinned.ocl-headers
|
||||
pinned.spirv-headers
|
||||
]
|
||||
++ lib.optionals enableCuda [
|
||||
cudaPackages.cudatoolkit
|
||||
];
|
||||
|
||||
patches = [ ./fix-ur.patch ]; # Has been fixed Fixed in next release
|
||||
|
||||
preBuild = ''
|
||||
chmod -R u+w /build/source
|
||||
'';
|
||||
|
||||
cmakeDir = "../llvm";
|
||||
|
||||
cmakeFlags =
|
||||
let
|
||||
cmakeList = name: l: lib.cmakeOptionType "list" name (builtins.concatStringsSep ";" l);
|
||||
|
||||
LLVM_EXTERNAL_PROJECTS = [
|
||||
"sycl"
|
||||
"llvm-spirv"
|
||||
"opencl"
|
||||
"xpti"
|
||||
"xptifw"
|
||||
"compiler-rt"
|
||||
"sycl-jit"
|
||||
]
|
||||
++ lib.optionals enableCuda [
|
||||
"libclc"
|
||||
];
|
||||
in
|
||||
[
|
||||
(lib.cmakeBool "LLVM_ENABLE_ASSERTIONS" true)
|
||||
|
||||
(cmakeList "LLVM_TARGETS_TO_BUILD" (
|
||||
[
|
||||
"host"
|
||||
"SPIRV"
|
||||
]
|
||||
++ lib.optionals enableCuda [ "NVPTX" ]
|
||||
))
|
||||
(cmakeList "LLVM_EXTERNAL_PROJECTS" LLVM_EXTERNAL_PROJECTS)
|
||||
(cmakeList "LLVM_ENABLE_PROJECTS" ([ "clang" ] ++ LLVM_EXTERNAL_PROJECTS))
|
||||
|
||||
(lib.cmakeBool "UR_USE_EXTERNAL_UMF" false)
|
||||
(lib.cmakeOptionType "path" "UR_OPENCL_INCLUDE_DIR" (toString pinned.ocl-headers))
|
||||
(lib.cmakeOptionType "path" "UR_OPENCL_ICD_LOADER_LIBRARY" (toString pinned.ocl-icd))
|
||||
(lib.cmakeFeature "UR_OPENCL_ICD_LOADER_LIBRARY" (toString pinned.ocl-icd))
|
||||
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" false)
|
||||
(lib.cmakeBool "LLVM_BUILD_TOOLS" true)
|
||||
(lib.cmakeBool "LLVM_ENABLE_ZSTD" true)
|
||||
(lib.cmakeBool "LLVM_USE_STATIC_ZSTD" true)
|
||||
(lib.cmakeBool "LLVM_ENABLE_DOXYGEN" false)
|
||||
(lib.cmakeBool "LLVM_ENABLE_LLD" false)
|
||||
(lib.cmakeBool "LLVM_ENABLE_SPHINX" false)
|
||||
(lib.cmakeBool "LLVM_SPIRV_ENABLE_LIBSPIRV_DIS" false)
|
||||
(lib.cmakeBool "SYCL_ENABLE_WERROR" false)
|
||||
(lib.cmakeBool "SYCL_INCLUDE_TESTS" false)
|
||||
(lib.cmakeBool "SYCL_ENABLE_EXTENSION_JIT" true)
|
||||
(lib.cmakeBool "SYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB" false)
|
||||
(lib.cmakeBool "SYCL_ENABLE_XPTI_TRACING" true)
|
||||
(lib.cmakeBool "XPTI_ENABLE_WERROR" false)
|
||||
|
||||
(cmakeList "SYCL_ENABLE_BACKENDS" ([ "opencl" ] ++ lib.optionals enableCuda [ "cuda" ]))
|
||||
]
|
||||
++ fetchcontent_cmakeFlags
|
||||
++ lib.optionals enableCuda [
|
||||
(lib.cmakeOptionType "list" "LIBCLC_TARGETS_TO_BUILD" "nvptx64--nvidiacl")
|
||||
(lib.cmakeBool "LIBCLC_GENERATE_REMANGLED_VARIANTS" true)
|
||||
(lib.cmakeBool "LIBCLC_NATIVECPU_HOST_TARGET" false)
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/intel/llvm";
|
||||
description = "Intel staging area for llvm.org contribution";
|
||||
maintainers = with lib.maintainers.bsc; [ abonerib ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = [
|
||||
lib.licenses.asl20
|
||||
lib.licenses.llvm-exception
|
||||
];
|
||||
};
|
||||
}
|
||||
23
pkgs/llvm-intel/fix-ur.patch
Normal file
23
pkgs/llvm-intel/fix-ur.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff --git a/unified-runtime/source/adapters/cuda/CMakeLists.txt b/unified-runtime/source/adapters/cuda/CMakeLists.txt
|
||||
index a8401c71a..2ab363926 100644
|
||||
--- a/unified-runtime/source/adapters/cuda/CMakeLists.txt
|
||||
+++ b/unified-runtime/source/adapters/cuda/CMakeLists.txt
|
||||
@@ -62,14 +62,14 @@ add_library(cudadrv SHARED IMPORTED GLOBAL)
|
||||
if (WIN32)
|
||||
set_target_properties(
|
||||
cudadrv PROPERTIES
|
||||
- IMPORTED_IMPLIB ${CUDA_cuda_driver_LIBRARY}
|
||||
- INTERFACE_INCLUDE_DIRECTORIES ${CUDAToolkit_INCLUDE_DIRS}
|
||||
+ IMPORTED_IMPLIB "${CUDA_cuda_driver_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${CUDAToolkit_INCLUDE_DIRS}"
|
||||
)
|
||||
else()
|
||||
set_target_properties(
|
||||
cudadrv PROPERTIES
|
||||
- IMPORTED_LOCATION ${CUDA_cuda_driver_LIBRARY}
|
||||
- INTERFACE_INCLUDE_DIRECTORIES ${CUDAToolkit_INCLUDE_DIRS}
|
||||
+ IMPORTED_LOCATION "${CUDA_cuda_driver_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${CUDAToolkit_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -48,6 +48,7 @@ in stdenv.mkDerivation {
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
|
||||
passthru = {
|
||||
CC = "clang";
|
||||
|
||||
@@ -39,7 +39,9 @@ stdenv.mkDerivation rec {
|
||||
perl
|
||||
pkg-config
|
||||
python3
|
||||
] ++ lib.optionals enableNosv [
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals enableNosv [
|
||||
nosv
|
||||
] ++ lib.optionals enableOvni [
|
||||
ovni
|
||||
@@ -54,6 +56,7 @@ stdenv.mkDerivation rec {
|
||||
dontStrip = enableDebug;
|
||||
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBOMP_OMPD_SUPPORT=OFF"
|
||||
@@ -71,6 +74,28 @@ stdenv.mkDerivation rec {
|
||||
rm -f $out/libllvmrt/libomp.*
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
# There are not cmake flags to force nOS-V, it enables it when found through
|
||||
# pkg-config. If enableNosv is set, but we fail to find it at build time,
|
||||
# the build will succeed but won't use nOS-V (libompv won't be created).
|
||||
# This is a sanity check to ensure that after install we have the proper
|
||||
# files.
|
||||
installCheckPhase =
|
||||
if enableNosv then
|
||||
''
|
||||
test -f $out/lib/libompv.so
|
||||
test -f $out/libllvmrt/libompv.so
|
||||
test ! -f $out/lib/libomp.so
|
||||
test ! -f $out/libllvmrt/libomp.so
|
||||
''
|
||||
else
|
||||
''
|
||||
test -f $out/lib/libomp.so
|
||||
test -f $out/libllvmrt/libomp.so
|
||||
test ! -f $out/lib/libompv.so
|
||||
test ! -f $out/libllvmrt/libompv.so
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit nosv;
|
||||
};
|
||||
|
||||
@@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
enableParallelBuilding = false;
|
||||
strictDeps = true;
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(
|
||||
|
||||
@@ -9,6 +9,7 @@ python3Packages.buildPythonApplication {
|
||||
src = ./.;
|
||||
|
||||
doCheck = false;
|
||||
strictDeps = true;
|
||||
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
|
||||
@@ -53,6 +53,7 @@ in mpich.overrideAttrs (old: {
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
strictDeps = true;
|
||||
|
||||
meta = old.meta // {
|
||||
maintainers = old.meta.maintainers ++ (with lib.maintainers.bsc; [ rarias ]);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
, jemallocNanos6 ? null
|
||||
, cachelineBytes ? 64
|
||||
, enableGlibcxxDebug ? false
|
||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||
, enablePapi ? true
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
|
||||
, gitBranch ? "master"
|
||||
@@ -80,7 +80,8 @@ in
|
||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG") ++
|
||||
# Most nanos6 api symbols are resolved at runtime, so prefer
|
||||
# ifunc by default
|
||||
(optional isCross "--with-symbol-resolution=ifunc");
|
||||
(optional isCross "--with-symbol-resolution=ifunc") ++
|
||||
(optional enablePapi "--with-papi=${papi}");
|
||||
|
||||
postConfigure = lib.optionalString (!enableDebug) ''
|
||||
# Disable debug
|
||||
@@ -95,16 +96,14 @@ in
|
||||
dontStrip = enableDebug;
|
||||
separateDebugInfo = true;
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
pkg-config
|
||||
|
||||
# TODO: papi_version is needed for configure:
|
||||
# ./configure: line 27378: papi_version: command not found
|
||||
# This probably breaks cross-compilation
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
|
||||
@@ -8,6 +8,7 @@ stdenv.mkDerivation {
|
||||
version = "0.0.1";
|
||||
src = ./nixgen;
|
||||
dontUnpack = true;
|
||||
strictDeps = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
preBuild = "env";
|
||||
dontPatchShebangs = true;
|
||||
strictDeps = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.pm.bsc.es/rarias/nixtools";
|
||||
|
||||
@@ -48,6 +48,7 @@ in
|
||||
enableParallelBuilding = true;
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-nosv=${nosv}"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
, numactl
|
||||
, hwloc
|
||||
, papi
|
||||
, enablePapi ? stdenv.hostPlatform == stdenv.buildPlatform # Disabled when cross-compiling
|
||||
, enablePapi ? true
|
||||
, cacheline ? 64 # bits
|
||||
, ovni ? null
|
||||
, useGit ? false
|
||||
@@ -40,16 +40,17 @@ let
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "nosv";
|
||||
inherit (source) src version;
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
configureFlags = [
|
||||
"--with-ovni=${ovni}"
|
||||
"CACHELINE_WIDTH=${toString cacheline}"
|
||||
];
|
||||
] ++ lib.optionals enablePapi [ "--with-papi=${papi}" ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
@@ -59,6 +60,7 @@ in
|
||||
hwloc
|
||||
ovni
|
||||
] ++ lib.optionals enablePapi [ papi ];
|
||||
patches = [ ./fix-papi.patch ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://gitlab.bsc.es/nos-v/nos-v";
|
||||
|
||||
136
pkgs/nosv/fix-papi.patch
Normal file
136
pkgs/nosv/fix-papi.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
Commit ID: c09633f172ce4075e0a05a33f6dcbe8e03e1202a
|
||||
Change ID: onmwypnnrysktutwsvotqovzponvwrxs
|
||||
Bookmarks: fix/papi fix/papi@git fix/papi@origin
|
||||
Author : Aleix Boné <aleix.boneribo@bsc.es> (2025-12-10 11:14:14)
|
||||
Committer: Aleix Boné <aleix.boneribo@bsc.es> (2025-12-12 12:56:48)
|
||||
|
||||
Improve PAPI m4 module for cross compilation
|
||||
|
||||
diff --git a/m4/papi.m4 b/m4/papi.m4
|
||||
index de90584870..8398f856f5 100644
|
||||
--- a/m4/papi.m4
|
||||
+++ b/m4/papi.m4
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file is part of Nanos6 and is licensed under the terms contained in the COPYING file.
|
||||
#
|
||||
-# Copyright (C) 2021-2022 Barcelona Supercomputing Center (BSC)
|
||||
+# Copyright (C) 2021-2025 Barcelona Supercomputing Center (BSC)
|
||||
|
||||
AC_DEFUN([AC_CHECK_PAPI],
|
||||
[
|
||||
@@ -8,34 +8,38 @@
|
||||
[papi],
|
||||
[AS_HELP_STRING([--with-papi=prefix], [specify the installation prefix of PAPI])],
|
||||
[ ac_cv_use_papi_prefix=$withval ],
|
||||
- [ ac_cv_use_papi_prefix="" ]
|
||||
+ [ ac_cv_use_papi_prefix="check" ]
|
||||
)
|
||||
|
||||
if test x"${ac_cv_use_papi_prefix}" = x"no"; then
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([${ac_cv_use_papi_prefix}])
|
||||
ac_use_papi=no
|
||||
- elif test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
- AC_MSG_RESULT([${ac_cv_use_papi_prefix}])
|
||||
- papi_LIBS="-L${ac_cv_use_papi_prefix}/lib -lpapi -Wl,-rpath,${ac_cv_use_papi_prefix}/lib"
|
||||
- papi_CFLAGS="-I$ac_cv_use_papi_prefix/include"
|
||||
- ac_use_papi=yes
|
||||
- else
|
||||
+ elif test x"${ac_cv_use_papi_prefix}" = x""; then
|
||||
+ AC_MSG_RESULT([invalid prefix])
|
||||
+ AC_MSG_ERROR([papi prefix specified but empty])
|
||||
+ elif test x"${ac_cv_use_papi_prefix}" = x"yes" -o x"${ac_cv_use_papi_prefix}" = x"check"; then
|
||||
PKG_CHECK_MODULES(
|
||||
[papi],
|
||||
- [papi],
|
||||
+ [papi >= 5.6.0],
|
||||
[
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([retrieved from pkg-config])
|
||||
papi_CFLAGS="${papi_CFLAGS}"
|
||||
ac_use_papi=yes
|
||||
+ ac_papi_version_correct=yes
|
||||
], [
|
||||
AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
AC_MSG_RESULT([not available])
|
||||
ac_use_papi=no
|
||||
]
|
||||
)
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([the PAPI installation prefix])
|
||||
+ AC_MSG_RESULT([${ac_cv_use_papi_prefix}])
|
||||
+ papi_LIBS="-L${ac_cv_use_papi_prefix}/lib -lpapi -Wl,-rpath,${ac_cv_use_papi_prefix}/lib"
|
||||
+ papi_CFLAGS="-I$ac_cv_use_papi_prefix/include"
|
||||
+ ac_use_papi=yes
|
||||
fi
|
||||
|
||||
if test x"${ac_use_papi}" = x"yes" ; then
|
||||
@@ -53,10 +57,10 @@
|
||||
ac_use_papi=yes
|
||||
],
|
||||
[
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
- AC_MSG_ERROR([PAPI cannot be found.])
|
||||
+ if test x"${ac_cv_use_papi_prefix}" = x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI >= 5.6.0 cannot be found.])
|
||||
else
|
||||
- AC_MSG_WARN([PAPI cannot be found.])
|
||||
+ AC_MSG_WARN([PAPI >= 5.6.0 not available.])
|
||||
fi
|
||||
ac_use_papi=no
|
||||
]
|
||||
@@ -64,30 +68,38 @@
|
||||
|
||||
CFLAGS="${ac_save_CFLAGS}"
|
||||
LIBS="${ac_save_LIBS}"
|
||||
+ elif test x"${ac_cv_use_papi_prefix}" = x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI >= 5.6.0 cannot be found.])
|
||||
fi
|
||||
|
||||
- if test x"${ac_use_papi}" = x"yes" ; then
|
||||
- if test x"${ac_cv_use_papi_prefix}" != x"" ; then
|
||||
+ if test x"${ac_use_papi}" = x"yes" -a x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ if test x"${ac_cv_use_papi_prefix}" != x"yes" -a x"${ac_cv_use_papi_prefix}" != x"check" ; then
|
||||
papiBinary=${ac_cv_use_papi_prefix}/bin/papi_version
|
||||
else
|
||||
papiBinary=papi_version
|
||||
fi
|
||||
- papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
|
||||
- AX_COMPARE_VERSION(
|
||||
- [[${papiVersion}]],
|
||||
- [[ge]],
|
||||
- [[5.6.0]],
|
||||
- [[ac_papi_version_correct=yes]],
|
||||
- [[ac_papi_version_correct=no]]
|
||||
- )
|
||||
|
||||
- if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
- AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
- ac_use_papi=no
|
||||
+ if test x"$cross_compiling" = x"yes" ; then
|
||||
+ AC_MSG_WARN([Cross-compiling detected, skipping PAPI version check])
|
||||
else
|
||||
- AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
- AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ papiVersion=`$papiBinary | sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/'`
|
||||
+
|
||||
+ AX_COMPARE_VERSION(
|
||||
+ [[${papiVersion}]],
|
||||
+ [[ge]],
|
||||
+ [[5.6.0]],
|
||||
+ [[ac_papi_version_correct=yes]],
|
||||
+ [[ac_papi_version_correct=no]]
|
||||
+ )
|
||||
+
|
||||
+ if test x"${ac_papi_version_correct}" != x"yes" ; then
|
||||
+ AC_MSG_ERROR([PAPI version must be >= 5.6.0.])
|
||||
+ ac_use_papi=no
|
||||
+ else
|
||||
+ AC_MSG_CHECKING([if the PAPI version >= 5.6.0.])
|
||||
+ AC_MSG_RESULT([${ac_papi_version_correct}])
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
doCheck = true;
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ mpiAll ];
|
||||
buildInputs = [ mpiAll ];
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
@@ -40,6 +40,7 @@ in
|
||||
inherit (source) src version;
|
||||
dontStrip = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
postPatch = ''
|
||||
patchShebangs --build test/
|
||||
'';
|
||||
|
||||
22
pkgs/papi/default.nix
Normal file
22
pkgs/papi/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
stdenv,
|
||||
papi,
|
||||
}:
|
||||
|
||||
if stdenv.hostPlatform == stdenv.buildPlatform then
|
||||
papi
|
||||
else
|
||||
papi.overrideAttrs (old: {
|
||||
configureFlags = (old.configureFlags or [ ]) ++ [
|
||||
"--enable-perf_event_uncore=no"
|
||||
"--with-sysdetect=no"
|
||||
"--with-ffsll"
|
||||
"--with-tls=__thread"
|
||||
"--with-virtualtimer=clock_thread_cputime_id"
|
||||
"--with-walltimer=clock_realtime"
|
||||
"--with-perf-events"
|
||||
"--with-CPU=${stdenv.hostPlatform.uname.processor}"
|
||||
"--with-arch=${stdenv.hostPlatform.uname.processor}"
|
||||
];
|
||||
patches = (old.patches or [ ]) ++ [ ./fix-ar-cross.patch ];
|
||||
})
|
||||
19
pkgs/papi/fix-ar-cross.patch
Normal file
19
pkgs/papi/fix-ar-cross.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
diff --git a/sde_lib/Makefile b/sde_lib/Makefile
|
||||
index 8518f92..90a9953 100644
|
||||
--- a/sde_lib/Makefile
|
||||
+++ b/sde_lib/Makefile
|
||||
@@ -1,4 +1,5 @@
|
||||
CC ?= gcc
|
||||
+AR ?= ar
|
||||
SDE_INC = -I. -I..
|
||||
SDE_LD = -ldl -pthread
|
||||
CFLAGS += -Wextra -Wall -O2
|
||||
@@ -18,7 +19,7 @@ dynamic: $(DOBJS)
|
||||
rm -f *_d.o
|
||||
|
||||
static: $(SOBJS)
|
||||
- ar rs libsde.a $(SOBJS)
|
||||
+ $(AR) rs libsde.a $(SOBJS)
|
||||
rm -f *_s.o
|
||||
|
||||
clean:
|
||||
@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontStrip = true;
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
|
||||
preConfigure = ''
|
||||
export CFLAGS="-O3"
|
||||
|
||||
@@ -34,6 +34,7 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
|
||||
preConfigure = ''
|
||||
export CFLAGS="-O3 -DPARALLEL_ENABLED"
|
||||
|
||||
47
pkgs/pertalde/default.nix
Normal file
47
pkgs/pertalde/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
python3,
|
||||
fetchPypi,
|
||||
cargo,
|
||||
rustPlatform,
|
||||
rustc,
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "pertalde";
|
||||
version = "0.1.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-KdS5yNYR+8z81hMBTl9oNiLi17cVLyoZBNNR88T/gOY=";
|
||||
};
|
||||
in
|
||||
python3.pkgs.buildPythonApplication {
|
||||
inherit pname version src;
|
||||
pyproject = true;
|
||||
strictDeps = true;
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-dQ8EKlYZq+Urtb+0zxRi/Vh/ormIGCNKHy/9entyb7g=";
|
||||
};
|
||||
|
||||
# error[E0554]: `#![feature]` may not be used on the stable release channel
|
||||
env.RUSTC_BOOTSTRAP = true;
|
||||
|
||||
build-system = [
|
||||
cargo
|
||||
rustPlatform.cargoSetupHook
|
||||
rustPlatform.maturinBuildHook
|
||||
rustc
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Some command-line utilities on paraver traces";
|
||||
homepage = "https://pypi.org/project/pertalde/";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers.bsc; [ abonerib ];
|
||||
mainProgram = "ptd";
|
||||
};
|
||||
}
|
||||
@@ -13,6 +13,7 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-A1dd9T9SIEHDCiVT2UwV6T02BSLh9ej6LC/2l54hgwI=";
|
||||
doCheck = false;
|
||||
strictDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Prometheus SLURM Exporter";
|
||||
|
||||
@@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
hardeningDisable = [ "all" ];
|
||||
dontStrip = true;
|
||||
strictDeps = true;
|
||||
configureFlags = [ "--with-ovni=${ovni}" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
72
pkgs/tacuda/default.nix
Normal file
72
pkgs/tacuda/default.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
backendStdenv,
|
||||
fetchFromGitHub,
|
||||
automake,
|
||||
autoconf,
|
||||
libtool,
|
||||
gnumake,
|
||||
autoreconfHook,
|
||||
boost,
|
||||
cudatoolkit,
|
||||
libcublas,
|
||||
cuda_cudart,
|
||||
|
||||
useGit ? false,
|
||||
gitUrl ? "git@gitlab-internal.bsc.es:task-awareness/tacuda/tacuda.git",
|
||||
gitBranch ? "main",
|
||||
gitCommit ? "35234f9445e6149a2bd38d119841e2485d6ee05e",
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
release_ver = "2.1.0";
|
||||
release = {
|
||||
version = release_ver;
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "tacuda";
|
||||
rev = release_ver;
|
||||
hash = "sha256-Cj3EiLVJSLvRv0ydeg7Vp4SpkniEqHkcWF+YOJQ8EcM=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
in
|
||||
|
||||
backendStdenv.mkDerivation {
|
||||
pname = "tacuda";
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
gnumake
|
||||
];
|
||||
|
||||
patches = [ ./fix_config.patch ];
|
||||
|
||||
configureFlags = [ "--with-cuda-include=${cudatoolkit}/include" ];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
libcublas
|
||||
cuda_cudart
|
||||
];
|
||||
|
||||
}
|
||||
13
pkgs/tacuda/fix_config.patch
Normal file
13
pkgs/tacuda/fix_config.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/m4/cuda.m4 b/m4/cuda.m4
|
||||
index 23f5c94..8f9b534 100644
|
||||
--- a/m4/cuda.m4
|
||||
+++ b/m4/cuda.m4
|
||||
@@ -40,7 +40,7 @@ search_libs="cuda cublas cudart"
|
||||
required_libs=""
|
||||
|
||||
m4_foreach([function],
|
||||
- [cuInit,
|
||||
+ [
|
||||
cublasSgemm,
|
||||
cudaStreamCreate,
|
||||
cudaLaunchKernel,
|
||||
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
|
||||
pname = "tagaspi";
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
version = "2.0";
|
||||
src = fetchFromGitHub {
|
||||
|
||||
@@ -45,6 +45,7 @@ in stdenv.mkDerivation {
|
||||
inherit (source) src version;
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
|
||||
48
pkgs/taopencl/default.nix
Normal file
48
pkgs/taopencl/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
stdenv,
|
||||
automake,
|
||||
autoconf,
|
||||
libtool,
|
||||
gnumake,
|
||||
boost,
|
||||
mpi,
|
||||
autoreconfHook,
|
||||
ocl-icd,
|
||||
opencl-headers,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "taopencl";
|
||||
version = finalAttrs.src.shortRev;
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "git@gitlab-internal.bsc.es:task-awareness/taopencl/taopencl.git";
|
||||
ref = "master";
|
||||
rev = "c3b7b32ae8fa4af7ceff598532a881f8f1490aaf";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
strictDeps = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-opencl-lib=${ocl-icd}/lib"
|
||||
"--with-opencl-include=${opencl-headers}/include"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
gnumake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
mpi
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
hardeningDisable = [ "all" ];
|
||||
})
|
||||
@@ -9,6 +9,7 @@ python3Packages.buildPythonApplication {
|
||||
src = ./.;
|
||||
|
||||
doCheck = false;
|
||||
strictDeps = true;
|
||||
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
|
||||
@@ -23,9 +23,6 @@ in stdenv.mkDerivation {
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
|
||||
# nOS-V requires access to /sys/devices to request NUMA information
|
||||
requiredSystemFeatures = [ "sys-devices" ];
|
||||
|
||||
buildInputs = [ openmp ];
|
||||
|
||||
buildPhase = ''
|
||||
|
||||
Reference in New Issue
Block a user