Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore disabling benchmarks from ci scripts (removed in #493) #1458

Merged
merged 6 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading