Add simple CUDA version check, warn on mismatch

This commit is contained in:
Michael Vines 2018-06-21 13:19:46 -07:00
parent c4a59896f8
commit 771478bc68
1 changed files with 15 additions and 0 deletions

View File

@ -17,6 +17,21 @@ fi
tar zxvf solana-perf.tgz
)
if [[ -r /usr/local/cuda/version.txt && -r cuda-version.txt ]]; then
if ! diff /usr/local/cuda/version.txt cuda-version.txt > /dev/null; then
echo ==============================================
echo Warning: possible CUDA version mismatch
echo
echo "Expected version: $(cat cuda-version.txt)"
echo "Detected version: $(cat /usr/local/cuda/version.txt)"
echo ==============================================
fi
else
echo ==============================================
echo Warning: unable to validate CUDA version
echo ==============================================
fi
echo "Downloaded solana-perf version: $(cat solana-perf-HEAD.txt)"
exit 0