Last active
April 23, 2021 04:02
-
-
Save FindHao/6c94a755ab6304a985fd86992317d77a to your computer and use it in GitHub Desktop.
nsys script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "Wrong arguments" | |
exit | |
fi | |
working_dir=$1 | |
first_arg=$2 | |
# if [[ $first_arg != \./* ]]; | |
# then | |
# working_dir=$(dirname $first_arg) | |
# fi | |
execute_name=$(basename $first_arg) | |
cd $working_dir | |
mkdir reports | |
cd reports | |
rm report*.qdrep | |
rm report*.sqlite | |
rm report*.csv | |
cd .. | |
for i in {1..10}; do | |
nsys profile -o reports/report${i}_$execute_name -t cuda "${@:2}" | |
cd reports | |
nsys stats -f csv -o report${i}_$execute_name ./report${i}_$execute_name.qdrep | |
nsys stats -f csv --report gpumemtimesum -o report${i}_$execute_name ./report${i}_$execute_name.qdrep | |
cd .. | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment