File: nsys-ui

package info (click to toggle)
nvidia-cuda-toolkit 12.4.1-2
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, trixie
  • size: 18,505,836 kB
  • sloc: ansic: 203,477; cpp: 64,769; python: 34,699; javascript: 22,006; xml: 13,410; makefile: 3,085; sh: 2,343; perl: 352
file content (34 lines) | stat: -rwxr-xr-x 833 bytes parent folder | download | duplicates (6)
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
#!/bin/sh

exec_if_exists() {
    if [ -x "$1" ]; then
        exec "$@"
    fi
}

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

case "$(uname -m)" in
    x86_64)
        NSYS_HOST_DIR=host-linux-x64
        ;;
    aarch64)
        NSYS_HOST_DIR=host-linux-armv8
        ;;
    ppc64le)
        die "Error: Nsight Systems GUI is not supported on $(uname -m). Please use the command-line tool: nsys"
        ;;
    *)
        die "Error: Nsight Systems is not supported on $(uname -m)"
        ;;
esac

DIR=$(dirname "$(readlink -f -- "$0")")
CUDA_INSTALL_DIR=$(cd "$DIR/.." && pwd)
exec_if_exists "$CUDA_INSTALL_DIR"/nsight-systems-2023.4.4/"${NSYS_HOST_DIR}"/nsys-ui "$@"
exec_if_exists /opt/nvidia/nsight-systems/2023.4.4/"${NSYS_HOST_DIR}"/nsys-ui "$@"

die "Error: Nsight Systems 2023.4.4 hasn't been installed with CUDA Toolkit 12.4"