Fix CXX recognition issues for rocThrust
Fix CI check for min CMake version on CUDA Thrust Temporarily disable CUDA Thrust w/ TBB for now
This commit is contained in:
parent
fe4007b446
commit
dc42388df3
@ -75,6 +75,10 @@ macro(setup)
|
||||
find_package(rocprim REQUIRED CONFIG)
|
||||
find_package(rocthrust REQUIRED CONFIG)
|
||||
endif ()
|
||||
|
||||
# for HIP we treat *.cu files as CXX otherwise CMake doesn't compile them
|
||||
set_source_files_properties(${IMPL_SOURCES} PROPERTIES LANGUAGE CXX)
|
||||
|
||||
register_link_library(roc::rocthrust)
|
||||
else ()
|
||||
message(FATAL_ERROR "Unsupported THRUST_IMPL provided: ${THRUST_IMPL}")
|
||||
|
||||
@ -57,7 +57,7 @@ run_build() {
|
||||
local cmake_code=$?
|
||||
|
||||
"$CMAKE_BIN" --build "$build" -j "$(nproc)" &>>"$log"
|
||||
"$CMAKE_BIN" --build "$build" --target install -j "$(nproc)" &>>"$log"
|
||||
"$CMAKE_BIN" --build "$build" --target install -j "$(nproc)" &>>"$log"
|
||||
local cmake_code=$?
|
||||
set -e
|
||||
|
||||
@ -171,10 +171,27 @@ build_gcc() {
|
||||
# -DCUDA_TOOLKIT_ROOT_DIR=${NVHPC_CUDA_DIR:?} \
|
||||
# -DCUDA_ARCH=$NV_ARCH"
|
||||
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=CUDA"
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=OMP"
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=TBB"
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=CPP"
|
||||
|
||||
# CMake >= 3.15 only due to Nvidia's Thrust CMake requirements
|
||||
local current=$("$CMAKE_BIN" --version | head -n 1 | cut -d ' ' -f3)
|
||||
local required="3.15.0"
|
||||
if [ "$(printf '%s\n' "$required" "$current" | sort -V | head -n1)" = "$required" ]; then
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=CUDA"
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=OMP"
|
||||
run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=CPP"
|
||||
|
||||
# FIXME CUDA Thrust + TBB throws the following error:
|
||||
# /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h(9146): error: identifier "__builtin_ia32_rndscaless_round" is undefined
|
||||
# /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h(9155): error: identifier "__builtin_ia32_rndscalesd_round" is undefined
|
||||
# /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h(14797): error: identifier "__builtin_ia32_rndscaless_round" is undefined
|
||||
# /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h(14806): error: identifier "__builtin_ia32_rndscalesd_round" is undefined
|
||||
# /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512dqintrin.h(1365): error: identifier "__builtin_ia32_fpclassss" is undefined
|
||||
# /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512dqintrin.h(1372): error: identifier "__builtin_ia32_fpclasssd" is undefined
|
||||
|
||||
# run_build $name "${GCC_CXX:?}" THRUST "$cxx -DCMAKE_CUDA_COMPILER=${NVHPC_NVCC:?} -DCUDA_ARCH=$NV_ARCH -DSDK_DIR=$NVHPC_CUDA_DIR/include -DTHRUST_IMPL=CUDA -DBACKEND=TBB"
|
||||
else
|
||||
echo "CMake version ${current} < ${required}, skipping Thrust models"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user