File: nsys

package info (click to toggle)
nvidia-cuda-toolkit 11.8.0-5~deb12u1
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm
  • size: 18,338,396 kB
  • sloc: ansic: 172,472; cpp: 57,058; javascript: 21,597; python: 12,656; xml: 12,438; makefile: 2,949; sh: 2,056; perl: 352
file content (30 lines) | stat: -rwxr-xr-x 751 bytes parent folder | download | duplicates (3)
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
#!/bin/bash

shopt -s execfail
try_exec() {
    if [[ -x "$1" ]]; then
        exec "$@"
    fi
}

die() {
    echo "$@" >&2
    exit 1
}

case "$(uname -m)" in
    x86_64) arch=x64 ;;
    aarch64) arch=sbsa-armv8 ;;
    ppc64le) arch=ppc64le ;;
    *)
        die "Error: Nsight Systems is not supported on $(uname -m)"
        ;;
esac

DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
CUDA_INSTALL_DIR=$(cd "$DIR/.." && pwd)
try_exec "$CUDA_INSTALL_DIR"/nsight-systems-2022.4.2/target-linux-"$arch"/nsys "$@"
try_exec /opt/nvidia/nsight-systems/2022.4.2/target-linux-"$arch"/nsys "$@"
try_exec /opt/nvidia/nsight-systems-cli/2022.4.2/target-linux-"$arch"/nsys "$@"

die "Error: Nsight Systems 2022.4.2 hasn't been installed with CUDA Toolkit 11.8"