Skip to content

Commit

Permalink
Restore disabling benchmarks from ci scripts (removed in #493) (#1458)
Browse files Browse the repository at this point in the history
* Restore disabling benchmarks from ci scripts (removed in #493)
  • Loading branch information
wmaxey committed Mar 1, 2024
1 parent 4495154 commit 2acbea2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ci/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CXX_STANDARD=17
CUDA_COMPILER=${CUDACXX:-nvcc} # $CUDACXX if set, otherwise `nvcc`
CUDA_ARCHS= # Empty, use presets by default.
GLOBAL_CMAKE_OPTIONS=()
DISABLE_CUB_BENCHMARKS= # Enable to force-disable building CUB benchmarks.

# Check if the correct number of arguments has been provided
function usage {
Expand Down Expand Up @@ -47,7 +48,7 @@ while [ "${#args[@]}" -ne 0 ]; do
-std) CXX_STANDARD="${args[1]}"; args=("${args[@]:2}");;
-cuda) CUDA_COMPILER="${args[1]}"; args=("${args[@]:2}");;
-arch) CUDA_ARCHS="${args[1]}"; args=("${args[@]:2}");;
-disable-benchmarks) ENABLE_CUB_BENCHMARKS="false"; args=("${args[@]:1}");;
-disable-benchmarks) DISABLE_CUB_BENCHMARKS=1; args=("${args[@]:1}");;
-cmake-options)
if [ -n "${args[1]}" ]; then
IFS=' ' read -ra split_args <<< "${args[1]}"
Expand Down
7 changes: 5 additions & 2 deletions ci/build_cub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ version_compare() {

ENABLE_CUB_BENCHMARKS="false"
ENABLE_CUB_RDC="false"

if [[ "$CUDA_COMPILER" == *nvcc* ]]; then
ENABLE_CUB_RDC="true"
NVCC_VERSION=$($CUDA_COMPILER --version | grep release | awk '{print $6}' | cut -c2-)
if [[ $(version_compare $NVCC_VERSION 11.5) == "true" ]]; then
if [[ -n "${DISABLE_CUB_BENCHMARKS}" ]]; then
echo "Benchmarks have been forcefully disabled."
elif [[ $(version_compare $NVCC_VERSION 11.5) == "true" ]]; then
ENABLE_CUB_BENCHMARKS="true"
echo "nvcc version is $NVCC_VERSION. Building CUB benchmarks."
else
echo "nvcc version is $NVCC_VERSION. Not building CUB benchmarks because nvcc version is less than 11.5."
fi
else
echo "nvcc version is not determined (likely using a non-NVCC compiler). Not building CUB benchmarks."
echo "Not building with NVCC, disabling RDC and benchmarks."
fi

if [[ "$HOST_COMPILER" == *icpc* ]]; then
Expand Down

0 comments on commit 2acbea2

Please sign in to comment.