mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
umpire: Add cuda support
This commit is contained in:
parent
c2f9a2c471
commit
585af9ec70
@ -2,8 +2,13 @@
|
|||||||
, lib
|
, lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
|
, config
|
||||||
|
, cudaSupport ? config.cudaSupport
|
||||||
|
, cudaPackages ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert cudaSupport -> cudaPackages != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "umpire";
|
pname = "umpire";
|
||||||
version = "2024.07.0";
|
version = "2024.07.0";
|
||||||
@ -16,7 +21,22 @@ stdenv.mkDerivation rec {
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
] ++ lib.optionals cudaSupport [
|
||||||
|
cudaPackages.cuda_nvcc
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = lib.optionals cudaSupport (with cudaPackages; [
|
||||||
|
cudatoolkit
|
||||||
|
cuda_cudart
|
||||||
|
]);
|
||||||
|
|
||||||
|
cmakeFlags = lib.optionals cudaSupport [
|
||||||
|
"-DCUDA_TOOLKIT_ROOT_DIR=${cudaPackages.cudatoolkit}"
|
||||||
|
"-DENABLE_CUDA=ON"
|
||||||
|
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Application-focused API for memory management on NUMA & GPU architectures";
|
description = "Application-focused API for memory management on NUMA & GPU architectures";
|
||||||
|
Loading…
Reference in New Issue
Block a user