tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
rocthrust: init at 2.16.0-5.3.1
Madoura
3 years ago
ec690a4c
edbebe1d
+93
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
rocthrust
default.nix
top-level
all-packages.nix
+91
pkgs/development/libraries/rocthrust/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchFromGitHub
4
4
+
, cmake
5
5
+
, rocm-cmake
6
6
+
, rocm-runtime
7
7
+
, rocm-device-libs
8
8
+
, rocm-comgr
9
9
+
, rocprim
10
10
+
, hip
11
11
+
, gtest ? null
12
12
+
, buildTests ? false
13
13
+
, buildBenchmarks ? false
14
14
+
}:
15
15
+
16
16
+
assert buildTests -> gtest != null;
17
17
+
18
18
+
# Doesn't seem to work, thousands of errors compiling with no clear fix
19
19
+
# Is this an upstream issue? We don't seem to be missing dependencies
20
20
+
assert buildTests == false;
21
21
+
assert buildBenchmarks == false;
22
22
+
23
23
+
stdenv.mkDerivation rec {
24
24
+
pname = "rocthrust";
25
25
+
rocmVersion = "5.3.1";
26
26
+
version = "2.16.0-${rocmVersion}";
27
27
+
28
28
+
# Comment out these outputs until tests/benchmarks are fixed (upstream?)
29
29
+
# outputs = [
30
30
+
# "out"
31
31
+
# ] ++ lib.optionals buildTests [
32
32
+
# "test"
33
33
+
# ] ++ lib.optionals buildBenchmarks [
34
34
+
# "benchmark"
35
35
+
# ];
36
36
+
37
37
+
src = fetchFromGitHub {
38
38
+
owner = "ROCmSoftwarePlatform";
39
39
+
repo = "rocThrust";
40
40
+
rev = "rocm-${rocmVersion}";
41
41
+
hash = "sha256-cT0VyEVz86xR6qubAY2ncTxtCRTwXrNTWcFyf3mV+y0=";
42
42
+
};
43
43
+
44
44
+
nativeBuildInputs = [
45
45
+
cmake
46
46
+
rocm-cmake
47
47
+
rocprim
48
48
+
hip
49
49
+
];
50
50
+
51
51
+
buildInputs = [
52
52
+
rocm-runtime
53
53
+
rocm-device-libs
54
54
+
rocm-comgr
55
55
+
] ++ lib.optionals buildTests [
56
56
+
gtest
57
57
+
];
58
58
+
59
59
+
cmakeFlags = [
60
60
+
"-DCMAKE_CXX_COMPILER=hipcc"
61
61
+
"-DHIP_ROOT_DIR=${hip}"
62
62
+
# Manually define CMAKE_INSTALL_<DIR>
63
63
+
# See: https://github.com/NixOS/nixpkgs/pull/197838
64
64
+
"-DCMAKE_INSTALL_BINDIR=bin"
65
65
+
"-DCMAKE_INSTALL_LIBDIR=lib"
66
66
+
"-DCMAKE_INSTALL_INCLUDEDIR=include"
67
67
+
] ++ lib.optionals buildTests [
68
68
+
"-DBUILD_TEST=ON"
69
69
+
] ++ lib.optionals buildBenchmarks [
70
70
+
"-DBUILD_BENCHMARKS=ON"
71
71
+
];
72
72
+
73
73
+
# Comment out these outputs until tests/benchmarks are fixed (upstream?)
74
74
+
# postInstall = lib.optionalString buildTests ''
75
75
+
# mkdir -p $test/bin
76
76
+
# mv $out/bin/test_* $test/bin
77
77
+
# '' + lib.optionalString buildBenchmarks ''
78
78
+
# mkdir -p $benchmark/bin
79
79
+
# mv $out/bin/benchmark_* $benchmark/bin
80
80
+
# '' + lib.optionalString (buildTests || buildBenchmarks) ''
81
81
+
# rmdir $out/bin
82
82
+
# '';
83
83
+
84
84
+
meta = with lib; {
85
85
+
description = "ROCm parallel algorithm library";
86
86
+
homepage = "https://github.com/ROCmSoftwarePlatform/rocThrust";
87
87
+
license = with licenses; [ asl20 ];
88
88
+
maintainers = with maintainers; [ Madouura ];
89
89
+
broken = rocmVersion != hip.version;
90
90
+
};
91
91
+
}
+2
pkgs/top-level/all-packages.nix
···
14907
14907
inherit (llvmPackages_rocm) clang;
14908
14908
};
14909
14909
14910
14910
+
rocthrust = callPackage ../development/libraries/rocthrust { };
14911
14911
+
14910
14912
rtags = callPackage ../development/tools/rtags {
14911
14913
inherit (darwin) apple_sdk;
14912
14914
};