blob: 1d4e6988612049b282a12cbb6aa4b1f6185c4eae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{
buildRedist,
cudaAtLeast,
lib,
libnvjitlink,
}:
buildRedist {
redistName = "cuda";
pname = "libcusparse";
outputs = [
"out"
"dev"
"include"
"lib"
"static"
"stubs"
];
# Through 12.6.3.3 libnvJitLink is DT_NEEDED and the buildInputs entry below covers it; from
# 12.7.3.1 it is dlopen'd instead, so it needs a runpath. Unconditional from 12.0 because the
# entry is a no-op on the releases which already resolve it. 12.7.x asks for the unversioned
# soname, so the providing output must carry the .so symlink. Gated like the buildInputs entry:
# libnvjitlink does not exist before CUDA 12.0, and libcusparse does not reference it there.
appendRunpaths = lib.optionals (cudaAtLeast "12.0") [
"${lib.getLib libnvjitlink}/lib" # libnvJitLink.so, libnvJitLink.so.%s
];
buildInputs =
# Dependency from 12.0 and on
lib.optionals (cudaAtLeast "12.0") [ libnvjitlink ];
meta = {
description = "GPU-accelerated basic linear algebra subroutines for sparse matrix computations for unstructured sparsity";
longDescription = ''
The cuSPARSE APIs provides GPU-accelerated basic linear algebra subroutines for sparse matrix computations for
unstructured sparsity.
'';
homepage = "https://developer.nvidia.com/cusparse";
changelog = "https://docs.nvidia.com/cuda/cusparse";
};
}
|