2018-06-20 15:11:59 -07:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
if [[ $(uname) != Linux ]]; then
|
|
|
|
echo Performance libraries are only available for Linux
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ $(uname -m) != x86_64 ]]; then
|
|
|
|
echo Performance libraries are only available for x86_64 architecture
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-08-16 18:49:23 -07:00
|
|
|
mkdir -p target/perf-libs
|
2018-06-20 15:11:59 -07:00
|
|
|
(
|
2018-08-16 18:49:23 -07:00
|
|
|
cd target/perf-libs
|
|
|
|
(
|
|
|
|
set -x
|
|
|
|
curl https://solana-perf.s3.amazonaws.com/master/x86_64-unknown-linux-gnu/solana-perf.tgz | tar zxvf -
|
|
|
|
)
|
2018-06-20 15:11:59 -07:00
|
|
|
|
2018-08-16 18:49:23 -07:00
|
|
|
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
|
2018-06-21 13:19:46 -07:00
|
|
|
echo ==============================================
|
2018-08-16 18:49:23 -07:00
|
|
|
echo Warning: unable to validate CUDA version
|
2018-06-21 13:19:46 -07:00
|
|
|
echo ==============================================
|
|
|
|
fi
|
|
|
|
|
2018-08-16 18:49:23 -07:00
|
|
|
echo "Downloaded solana-perf version: $(cat solana-perf-HEAD.txt)"
|
|
|
|
)
|
2018-06-20 15:11:59 -07:00
|
|
|
|
|
|
|
exit 0
|