tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
rocfft: init at 1.0.18-5.3.1
Madoura
3 years ago
9acda2f4
30b66b2b
+116
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
rocfft
default.nix
top-level
all-packages.nix
+114
pkgs/development/libraries/rocfft/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
+
, hip
10
10
+
, sqlite
11
11
+
, python3
12
12
+
, gtest ? null
13
13
+
, boost ? null
14
14
+
, fftw ? null
15
15
+
, fftwFloat ? null
16
16
+
, llvmPackages ? null
17
17
+
, buildTests ? false
18
18
+
, buildBenchmarks ? false
19
19
+
}:
20
20
+
21
21
+
assert buildTests -> gtest != null;
22
22
+
assert buildBenchmarks -> fftw != null;
23
23
+
assert buildBenchmarks -> fftwFloat != null;
24
24
+
assert (buildTests || buildBenchmarks) -> boost != null;
25
25
+
assert (buildTests || buildBenchmarks) -> llvmPackages != null;
26
26
+
27
27
+
stdenv.mkDerivation rec {
28
28
+
pname = "rocfft";
29
29
+
rocmVersion = "5.3.1";
30
30
+
version = "1.0.18-${rocmVersion}";
31
31
+
32
32
+
outputs = [
33
33
+
"out"
34
34
+
] ++ lib.optionals buildTests [
35
35
+
"test"
36
36
+
] ++ lib.optionals buildBenchmarks [
37
37
+
"benchmark"
38
38
+
];
39
39
+
40
40
+
src = fetchFromGitHub {
41
41
+
owner = "ROCmSoftwarePlatform";
42
42
+
repo = "rocFFT";
43
43
+
rev = "rocm-${rocmVersion}";
44
44
+
hash = "sha256-jb2F1fRe+YLloYJ/KtzrptUDhmdBDBtddeW/g55owKM=";
45
45
+
};
46
46
+
47
47
+
nativeBuildInputs = [
48
48
+
cmake
49
49
+
rocm-cmake
50
50
+
hip
51
51
+
];
52
52
+
53
53
+
buildInputs = [
54
54
+
rocm-runtime
55
55
+
rocm-device-libs
56
56
+
rocm-comgr
57
57
+
sqlite
58
58
+
python3
59
59
+
] ++ lib.optionals buildTests [
60
60
+
gtest
61
61
+
] ++ lib.optionals (buildTests || buildBenchmarks) [
62
62
+
boost
63
63
+
fftw
64
64
+
fftwFloat
65
65
+
llvmPackages.openmp
66
66
+
];
67
67
+
68
68
+
propogatedBuildInputs = lib.optionals buildTests [
69
69
+
fftw
70
70
+
fftwFloat
71
71
+
];
72
72
+
73
73
+
cmakeFlags = [
74
74
+
"-DCMAKE_C_COMPILER=hipcc"
75
75
+
"-DCMAKE_CXX_COMPILER=hipcc"
76
76
+
"-DUSE_HIP_CLANG=ON"
77
77
+
"-DSQLITE_USE_SYSTEM_PACKAGE=ON"
78
78
+
# Manually define CMAKE_INSTALL_<DIR>
79
79
+
# See: https://github.com/NixOS/nixpkgs/pull/197838
80
80
+
"-DCMAKE_INSTALL_BINDIR=bin"
81
81
+
"-DCMAKE_INSTALL_LIBDIR=lib"
82
82
+
"-DCMAKE_INSTALL_INCLUDEDIR=include"
83
83
+
] ++ lib.optionals buildTests [
84
84
+
"-DBUILD_CLIENTS_TESTS=ON"
85
85
+
] ++ lib.optionals buildBenchmarks [
86
86
+
"-DBUILD_CLIENTS_RIDER=ON"
87
87
+
"-DBUILD_CLIENTS_SAMPLES=ON"
88
88
+
];
89
89
+
90
90
+
postInstall = lib.optionalString buildTests ''
91
91
+
mkdir -p $test/{bin,lib/fftw}
92
92
+
cp -a $out/bin/* $test/bin
93
93
+
ln -s ${fftw}/lib/libfftw*.so $test/lib/fftw
94
94
+
ln -s ${fftwFloat}/lib/libfftw*.so $test/lib/fftw
95
95
+
rm -r $out/lib/fftw
96
96
+
rm $test/bin/{rocfft_rtc_helper,*-rider} || true
97
97
+
'' + lib.optionalString buildBenchmarks ''
98
98
+
mkdir -p $benchmark/bin
99
99
+
cp -a $out/bin/* $benchmark/bin
100
100
+
rm $benchmark/bin/{rocfft_rtc_helper,*-test} || true
101
101
+
'' + lib.optionalString (buildTests || buildBenchmarks ) ''
102
102
+
mv $out/bin/rocfft_rtc_helper $out
103
103
+
rm -r $out/bin/*
104
104
+
mv $out/rocfft_rtc_helper $out/bin
105
105
+
'';
106
106
+
107
107
+
meta = with lib; {
108
108
+
description = "FFT implementation for ROCm ";
109
109
+
homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT";
110
110
+
license = with licenses; [ mit ];
111
111
+
maintainers = with maintainers; [ Madouura ];
112
112
+
broken = rocmVersion != hip.version;
113
113
+
};
114
114
+
}
+2
pkgs/top-level/all-packages.nix
···
14887
14887
14888
14888
rocsparse = callPackage ../development/libraries/rocsparse { };
14889
14889
14890
14890
+
rocfft = callPackage ../development/libraries/rocfft { };
14891
14891
+
14890
14892
rtags = callPackage ../development/tools/rtags {
14891
14893
inherit (darwin) apple_sdk;
14892
14894
};