nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 backendStdenv,
3 buildRedist,
4 cuda_cupti,
5 cudaAtLeast,
6 lib,
7}:
8buildRedist {
9 redistName = "cuda";
10 pname = "cuda_nvprof";
11
12 allowFHSReferences = true;
13
14 outputs = [
15 "out"
16 ]
17 # The `bin` and `lib` output are only available on SBSA starting with CUDA 11.8.
18 ++ lib.optionals (backendStdenv.hostRedistSystem != "linux-sbsa" || cudaAtLeast "11.8") [
19 "bin"
20 "lib"
21 ];
22
23 buildInputs = [
24 cuda_cupti
25 ];
26
27 autoPatchelfIgnoreMissingDeps = [
28 "libcuda.so.1"
29 ];
30
31 meta = {
32 description = "Collect and view profiling data from the command-line";
33 longDescription = ''
34 The `nvprof` profiling tool enables you to collect and view profiling data from the command-line. `nvprof`
35 enables the collection of a timeline of CUDA-related activities on both CPU and GPU, including kernel execution,
36 memory transfers, memory set and CUDA API calls and events or metrics for CUDA kernels. Profiling options are
37 provided to `nvprof` through command-line options. Profiling results are displayed in the console after the
38 profiling data is collected, and may also be saved for later viewing by either `nvprof` or the Visual Profiler.
39 '';
40 homepage = "https://docs.nvidia.com/cuda/profiler-users-guide#nvprof";
41 changelog = "https://docs.nvidia.com/cuda/profiler-users-guide#changelog";
42 };
43}