1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/bin/bash
set -euo pipefail
CPU_ONLY=false
GPU_ONLY=false
ci_dir=$(dirname "$0")
new_args=$("${ci_dir}/util/extract_switches.sh" -cpu-only -gpu-only -- "$@")
eval set -- ${new_args}
while true; do
case "$1" in
-cpu-only)
CPU_ONLY=true
shift
;;
-gpu-only)
GPU_ONLY=true
shift
;;
--)
shift
break
;;
*)
echo "Unknown argument: $1"
exit 1
;;
esac
done
source "${ci_dir}/build_common.sh"
print_environment_details
./build_thrust.sh "$@"
if $CPU_ONLY; then
PRESETS=("thrust-cpu-cpp$CXX_STANDARD")
GPU_REQUIRED=false
elif $GPU_ONLY; then
PRESETS=("thrust-gpu-cpp$CXX_STANDARD")
GPU_REQUIRED=true
else
PRESETS=("thrust-cpp$CXX_STANDARD")
GPU_REQUIRED=true
fi
for PRESET in ${PRESETS[@]}; do
test_preset "Thrust (${PRESET})" ${PRESET} ${GPU_REQUIRED}
done
print_time_summary
|