summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSomeone Serge <sergei.kozlukov@aalto.fi>2022-04-12 16:57:03 +0300
committerSomeone Serge <sergei.kozlukov@aalto.fi>2023-04-01 05:47:12 +0300
commit95d21285bd596cd2adc11f516d6a989599863440 (patch)
tree81a18e8a6987c0e3fd47e725925e081d64540099
parentfaiss: respect config.cudaCapabilities (diff)
downloadnixpkgs-95d21285bd596cd2adc11f516d6a989599863440.tar.gz
nvidia-thrust: init at 1.16.0
-rw-r--r--pkgs/development/libraries/nvidia-thrust/default.nix61
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/libraries/nvidia-thrust/default.nix b/pkgs/development/libraries/nvidia-thrust/default.nix
new file mode 100644
index 000000000000..ea83b083d1b4
--- /dev/null
+++ b/pkgs/development/libraries/nvidia-thrust/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, fetchFromGitHub
+, stdenv
+, cmake
+, cudaPackages
+, symlinkJoin
+}:
+let
+ pname = "nvidia-thrust";
+ version = "1.16.0";
+
+ # TODO: Would like to use this:
+ cudaJoined = symlinkJoin {
+ name = "cuda-packages-unsplit";
+ paths = with cudaPackages; [
+ cuda_nvcc
+ cuda_cudart # cuda_runtime.h
+ libcublas
+ ];
+ };
+in
+stdenv.mkDerivation {
+ inherit pname version;
+
+ src = fetchFromGitHub {
+ owner = "NVIDIA";
+ repo = "thrust";
+ rev = version;
+ fetchSubmodules = true;
+ hash = "sha256-/EyznxWKuHuvHNjq+SQg27IaRbtkjXR2zlo2YgCWmUQ=";
+ };
+
+ nativeBuildInputs = [
+ cmake
+
+ # goes in native build inputs because thrust looks for headers
+ # in a path relative to nvcc...
+ #
+ # Works when build=host, but we only support
+ # cuda on x86_64 anyway
+
+ # TODO: but instead using this
+ # cudaJoined
+ cudaPackages.cudatoolkit
+ ];
+
+ cmakeFlags = [
+ "-DTHRUST_INCLUDE_CUB_CMAKE=ON"
+ ];
+
+ meta = with lib; {
+ description = ''
+ A high-level C++ parallel algorithms library
+ that builds on top of CUDA, TBB, OpenMP, etc.
+ '';
+ homepage = "https://github.com/NVIDIA/thrust";
+ license = licenses.asl20;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ SomeoneSerge ];
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index fca8efb5b8fc..2e16e72f19c3 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10306,6 +10306,8 @@ with pkgs;
nvfetcher = haskell.lib.compose.justStaticExecutables haskellPackages.nvfetcher;
+ nvidia-thrust = callPackage ../development/libraries/nvidia-thrust { };
+
miller = callPackage ../tools/text/miller { };
milu = callPackage ../applications/misc/milu { };