cuda-12.4 / bin /nsys
yangzhch6's picture
Initial model upload
184d68f verified
#!/bin/sh
exec_if_exists() {
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=$(dirname "$(readlink -f -- "$0")")
CUDA_INSTALL_DIR=$(cd "$DIR/.." && pwd)
exec_if_exists "$CUDA_INSTALL_DIR"/nsight-systems-2023.4.4/target-linux-"$arch"/nsys "$@"
exec_if_exists /opt/nvidia/nsight-systems/2023.4.4/target-linux-"$arch"/nsys "$@"
exec_if_exists /opt/nvidia/nsight-systems-cli/2023.4.4/target-linux-"$arch"/nsys "$@"
die "Error: Nsight Systems 2023.4.4 hasn't been installed with CUDA Toolkit 12.4"