see perf-libs all the time (#3748)

This commit is contained in:
Rob Walker
2019-04-12 08:38:14 -07:00
committed by GitHub
parent 8b08fe265a
commit 656b3139e3

View File

@@ -30,10 +30,10 @@ if [[ -n $USE_INSTALL || ! -f "$(dirname "${BASH_SOURCE[0]}")"/../Cargo.toml ]];
else else
solana_program() { solana_program() {
declare program="$1" declare program="$1"
declare features="" declare features="--features="
if [[ "$program" =~ ^(.*)-cuda$ ]]; then if [[ "$program" =~ ^(.*)-cuda$ ]]; then
program=${BASH_REMATCH[1]} program=${BASH_REMATCH[1]}
features="--features=cuda" features+="cuda,"
fi fi
if [[ -r "$(dirname "${BASH_SOURCE[0]}")"/../"$program"/Cargo.toml ]]; then if [[ -r "$(dirname "${BASH_SOURCE[0]}")"/../"$program"/Cargo.toml ]]; then
@@ -45,18 +45,10 @@ else
declare manifest_path="--manifest-path=$program/Cargo.toml" declare manifest_path="--manifest-path=$program/Cargo.toml"
printf "cargo run $manifest_path $maybe_release $maybe_package --bin solana-%s %s -- " "$program" "$features" printf "cargo run $manifest_path $maybe_release $maybe_package --bin solana-%s %s -- " "$program" "$features"
} }
if [[ -n $SOLANA_CUDA ]]; then
# shellcheck disable=2154 # 'here' is referenced but not assigned # shellcheck disable=2154 # 'here' is referenced but not assigned
if [[ -z $here ]]; then LD_LIBRARY_PATH=$(cd "$here/../target/perf-libs" && pwd):$LD_LIBRARY_PATH
echo "|here| is not defined"
exit 1
fi
# Locate perf libs downloaded by |./fetch-perf-libs.sh|
LD_LIBRARY_PATH=$(cd "$here" && dirname "$PWD"/target/perf-libs):$LD_LIBRARY_PATH
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
fi fi
fi
solana_bench_tps=$(solana_program bench-tps) solana_bench_tps=$(solana_program bench-tps)
solana_drone=$(solana_program drone) solana_drone=$(solana_program drone)