nvidia-thrust: rm as deprecated

The GitHub repo has been archived, the new thing is
[cccl](https://github.com/nvidia/cccl)
This commit is contained in:
Someone Serge
2023-12-04 20:24:32 +00:00
parent 0c4b1fcfba
commit 9cc210a783
4 changed files with 1 additions and 120 deletions
@@ -1,102 +0,0 @@
{ lib
, config
, fetchFromGitHub
, stdenv
, cmake
, pkg-config
, cudaPackages ? { }
, symlinkJoin
, tbb
, hostSystem ? "CPP"
, deviceSystem ? if config.cudaSupport then "CUDA" else "OMP"
}:
# Policy for device_vector<T>
assert builtins.elem deviceSystem [
"CPP" # Serial on CPU
"OMP" # Parallel with OpenMP
"TBB" # Parallel with Intel TBB
"CUDA" # Parallel on GPU
];
# Policy for host_vector<T>
# Always lives on CPU, but execution can be made parallel
assert builtins.elem hostSystem [ "CPP" "OMP" "TBB" ];
let
pname = "nvidia-thrust";
version = "1.16.0";
inherit (cudaPackages) backendStdenv cudaFlags;
cudaCapabilities = map cudaFlags.dropDot cudaFlags.cudaCapabilities;
tbbSupport = builtins.elem "TBB" [ deviceSystem hostSystem ];
cudaSupport = deviceSystem == "CUDA";
# TODO: Would like to use this:
cudaJoined = symlinkJoin {
name = "cuda-packages-unsplit";
paths = with cudaPackages; [
cuda_nvcc
cuda_nvrtc # symbols: cudaLaunchDevice, &c; notice postBuild
cuda_cudart # cuda_runtime.h
libcublas
];
postBuild = ''
ln -s $out/lib $out/lib64
'';
};
in
stdenv.mkDerivation {
inherit pname version;
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "thrust";
rev = version;
fetchSubmodules = true;
hash = "sha256-/EyznxWKuHuvHNjq+SQg27IaRbtkjXR2zlo2YgCWmUQ=";
};
# NVIDIA's "compiler hacks" seem like work-arounds for legacy toolchains and
# cause us errors such as:
# > Thrust's test harness uses CMAKE_CXX_COMPILER for the CUDA host compiler.
# > Refusing to overwrite specified CMAKE_CUDA_HOST_COMPILER
# So we un-fix cmake after them:
postPatch = ''
echo > cmake/ThrustCompilerHacks.cmake
'';
buildInputs = lib.optionals tbbSupport [ tbb ];
nativeBuildInputs = [
cmake
pkg-config
] ++ lib.optionals cudaSupport [
# Goes in native build inputs because thrust looks for headers
# in a path relative to nvcc...
cudaJoined
];
cmakeFlags = [
"-DTHRUST_INCLUDE_CUB_CMAKE=${if cudaSupport then "ON" else "OFF"}"
"-DTHRUST_DEVICE_SYSTEM=${deviceSystem}"
"-DTHRUST_HOST_SYSTEM=${hostSystem}"
"-DTHRUST_AUTO_DETECT_COMPUTE_ARCHS=OFF"
"-DTHRUST_DISABLE_ARCH_BY_DEFAULT=ON"
] ++ lib.optionals cudaFlags.enableForwardCompat [
"-DTHRUST_ENABLE_COMPUTE_FUTURE=ON"
] ++ map (sm: "THRUST_ENABLE_COMPUTE_${sm}") cudaCapabilities;
passthru = {
inherit cudaSupport cudaPackages cudaJoined;
};
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 ];
};
}
@@ -6,8 +6,6 @@
, cmake
, cudaPackages ? { }
, cudaSupport ? config.cudaSupport
, nvidia-thrust
, useThrustSourceBuild ? true
, pythonSupport ? true
, pythonPackages
, llvmPackages
@@ -27,8 +25,6 @@
, runCommand
}@inputs:
assert cudaSupport -> nvidia-thrust.cudaSupport;
let
pname = "faiss";
version = "1.7.4";
@@ -44,9 +40,6 @@ let
cuda_cudart # cuda_runtime.h
libcublas
libcurand
] ++ lib.optionals useThrustSourceBuild [
nvidia-thrust
] ++ lib.optionals (!useThrustSourceBuild) [
cuda_cccl
] ++ lib.optionals (cudaPackages ? cuda_profiler_api) [
cuda_profiler_api # cuda_profiler_api.h
+1
View File
@@ -644,6 +644,7 @@ mapAliases ({
noto-fonts-cjk = noto-fonts-cjk-sans; # Added 2021-12-16
noto-fonts-emoji = noto-fonts-color-emoji; # Added 2023-09-09
noto-fonts-extra = noto-fonts; # Added 2023-04-08
nvidia-thrust = throw "nvidia-thrust has been removed because the project was deprecated; use cudaPackages.cuda_cccl";
### O ###
-11
View File
@@ -11276,16 +11276,6 @@ with pkgs;
nvfetcher = haskell.lib.compose.justStaticExecutables haskellPackages.nvfetcher;
nvidia-thrust = callPackage ../development/libraries/nvidia-thrust { };
nvidia-thrust-intel = callPackage ../development/libraries/nvidia-thrust {
hostSystem = "TBB";
deviceSystem = if config.cudaSupport then "CUDA" else "TBB";
};
nvidia-thrust-cuda = callPackage ../development/libraries/nvidia-thrust {
deviceSystem = "CUDA";
};
miller = callPackage ../tools/text/miller { };
@@ -39988,7 +39978,6 @@ with pkgs;
faissWithCuda = faiss.override {
cudaSupport = true;
nvidia-thrust = nvidia-thrust-cuda;
};
fityk = callPackage ../applications/science/misc/fityk { };