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) ;;
aarch64|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=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
CUDA_INSTALL_DIR=$(cd "$DIR/.." && pwd)
try_exec "$CUDA_INSTALL_DIR"/nsight-systems-2022.4.2/host-linux-x64/nsys-ui "$@"
try_exec /opt/nvidia/nsight-systems/2022.4.2/host-linux-x64/nsys-ui "$@"
die "Error: Nsight Systems 2022.4.2 hasn't been installed with CUDA Toolkit 11.8"
|