gpuCI:
Use the gpuCI-provided BUILD_TYPE variable.
`ci/local/build.bash`: Add -l/--local-image, which doesn't pull from Docker hub.
Improve pre-commit and post-commit build workloads.
MODIFY
ci/common/build.bash
ci/common/build.bash
@@ -32,22 +32,43 @@ export HOME=${WORKSPACE}
# Switch to project root; also root of repo checkout.
cd ${WORKSPACE}
-# If it's a nightly build, append current YYMMDD to version.
-if [ "${BUILD_MODE}" == "branch" ]; then
- export VERSION_SUFFIX=`date +%y%m%d`
-fi
-
# The Docker image sets up `${CXX}` and `${CUDACXX}`.
-CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_CUDA_COMPILER=${CUDACXX}"
+CMAKE_FLAGS="-G Ninja -DCMAKE_CXX_COMPILER='${CXX}' -DCMAKE_CUDA_COMPILER='${CUDACXX}'"
-# If it's a nightly build, build all configurations.
if [ "${BUILD_MODE}" == "branch" ]; then
- CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_WORKLOAD=FULL"
+ # Post-commit build.
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_INCLUDE_CUB_CMAKE=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_ENABLE_MULTICONFIG=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP11=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_IGNORE_DEPRECATED_CPP_11=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP14=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_CPP=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_TBB=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_OMP=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_WORKLOAD=LARGE"
+else
+ # Pre-commit build.
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_DISABLE_ARCH_BY_DEFAULT=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_ENABLE_COMPUTE_50=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_ENABLE_COMPUTE_60=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_ENABLE_COMPUTE_70=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_ENABLE_COMPUTE_80=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_INCLUDE_CUB_CMAKE=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_ENABLE_MULTICONFIG=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP11=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_IGNORE_DEPRECATED_CPP_11=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_DIALECT_CPP14=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_CPP=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_TBB=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_OMP=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_ENABLE_SYSTEM_CUDA=ON"
+ CMAKE_FLAGS="${CMAKE_FLAGS} -DTHRUST_MULTICONFIG_WORKLOAD=SMALL"
fi
CTEST_FLAGS=""
-if [ "${BUILD_KIND}" == "cpu" ]; then
+if [ "${BUILD_TYPE}" == "cpu" ]; then
CTEST_FLAGS="${CTEST_FLAGS} -E '^cub|^thrust.*cuda'"
fi
@@ -69,12 +90,12 @@ ${CUDACXX} --version
mkdir -p build
cd build
-if [ ! -f CMakeLists.txt ]; then
+#if [ ! -f CMakeLists.txt ]; then
logger "Configure Thrust and CUB..."
cmake ${CMAKE_FLAGS} ..
-else
- logger "Existing Thrust and CUB configuration found, skipping configure..."
-fi
+#else
+# logger "Existing Thrust and CUB configuration found, skipping configure..."
+#fi
logger "Build Thrust and CUB..."
cmake --build . -j${PARALLEL_LEVEL} "${@}"
@@ -84,5 +105,5 @@ cmake --build . -j${PARALLEL_LEVEL} "${@}"
################################################################################
logger "Test Thrust and CUB..."
-ctest ${CTEST_FLAGS}
+ctest ${CTEST_FLAGS} "${@}"

MODIFY
ci/cpu/build.bash
ci/cpu/build.bash
@@ -13,7 +13,6 @@ SCRIPT_PATH=$(cd $(dirname ${0}); pwd -P)
REPOSITORY_PATH=$(realpath ${SCRIPT_PATH}/../..)
-export BUILD_KIND=cpu
export PARALLEL_LEVEL=4
source ${REPOSITORY_PATH}/ci/common/build.bash

MODIFY
ci/gpu/build.bash
ci/gpu/build.bash
@@ -13,7 +13,6 @@ SCRIPT_PATH=$(cd $(dirname ${0}); pwd -P)
REPOSITORY_PATH=$(realpath ${SCRIPT_PATH}/../..)
-export BUILD_KIND=gpu
export PARALLEL_LEVEL=4
source ${REPOSITORY_PATH}/ci/common/build.bash

MODIFY
ci/local/build.bash
ci/local/build.bash
@@ -25,6 +25,9 @@ function usage {
echo "-i <image>, --image <image>"
echo " Docker image to use (default: ${IMAGE})"
echo
+ echo "-l, --local-image"
+ echo " Use the local version of the image instead of pulling from Docker hub."
+ echo
echo "-s, --shell-only"
echo " Skip building and testing and launch an interactive shell instead."
echo
@@ -44,6 +47,8 @@ REPOSITORY_PATH=$(realpath ${SCRIPT_PATH}/../..)
IMAGE="gpuci/cccl:cuda11.0-devel-ubuntu18.04-gcc5"
+LOCAL_IMAGE=0
+
SHELL_ONLY=0
CLEAN=0
@@ -66,6 +71,8 @@ do
shift # The next argument is the image.
IMAGE="${1}"
;;
+ -l) ;&
+ --local-image) LOCAL_IMAGE=1 ;;
-s) ;&
--shell-only) SHELL_ONLY=1 ;;
-c) ;&
@@ -168,9 +175,11 @@ if [ "${NVIDIA_DOCKER_INSTALLED}" == 0 ]; then
exit -4
fi
-source ../ci/common/determine_build_parallelism.bash
+source ${REPOSITORY_PATH}/ci/common/determine_build_parallelism.bash
+if [ "${LOCAL_IMAGE}" == 0 ]; then
docker pull "${IMAGE}"
+fi
docker run --rm -it ${GPU_OPTS} \
--cap-add=SYS_PTRACE \
@@ -180,7 +189,7 @@ docker run --rm -it ${GPU_OPTS} \
-v "${PASSWD_PATH}":/etc/passwd:ro \
-v "${GROUP_PATH}":/etc/group:ro \
-e "WORKSPACE=${REPOSITORY_PATH_IN_CONTAINER}" \
- -e "BUILD_KIND=gpu"
+ -e "BUILD_TYPE=gpu" \
-e "PARALLEL_LEVEL=${PARALLEL_LEVEL}" \
-w "${REPOSITORY_PATH_IN_CONTAINER}" \
"${IMAGE}" bash -c "${COMMAND}"

gpuCI:
- Use the gpuCI-provided BUILD_TYPE variable.
- `ci/local/build.bash`: Add -l/--local-image, which doesn't pull from Docker hub.
- Improve pre-commit and post-commit build workloads.