Skip to content

Commit

Permalink
Add support for CUDA 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminW3 committed Nov 26, 2019
1 parent 219d09d commit 6c8b617
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 261 deletions.
272 changes: 28 additions & 244 deletions .travis.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Accelerator Back-ends
| std::thread | std::thread |Host CPU (multi core)|sequential|parallel (preemptive multitasking)|
| Boost.Fiber | boost::fibers::fiber |Host CPU (single core)|sequential|parallel (cooperative multitasking)|
|TBB|TBB 2.2+|Host CPU (multi core)|parallel (preemptive multitasking)|sequential (only 1 thread per block)|
|CUDA|CUDA 8.0-10.0|NVIDIA GPUs|parallel (undefined)|parallel (lock-step within warps)|
|CUDA|CUDA 8.0-10.2|NVIDIA GPUs|parallel (undefined)|parallel (lock-step within warps)|
|HIP(nvcc)|[HIP 1.5+](https://github.com/ROCm-Developer-Tools/HIP)|NVIDIA GPUs SM 2.0+|parallel (undefined)|parallel (lock-step within warps)|


Expand All @@ -74,7 +74,7 @@ This library uses C++11 (or newer when available).
| std::thread |:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|
| Boost.Fiber |:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:x:|:white_check_mark:|
|TBB|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|:white_check_mark:|
|CUDA (nvcc)|:white_check_mark: <br/> (CUDA 8.0-10.1)|:white_check_mark: <br/> (CUDA 9.0-10.1)|:white_check_mark: <br/> (CUDA 9.2-10.1) |:x:|:white_check_mark: <br/> (CUDA 9.1-10.1)|:white_check_mark: <br/> (CUDA 10.1)|:white_check_mark: <br/> (CUDA 10.1)|:white_check_mark: <br/> (CUDA 10.1)|:white_check_mark: <br/> (CUDA 10.1)|:x:|:x:|:white_check_mark: <br/> (CUDA 10.0-10.1)|
|CUDA (nvcc)|:white_check_mark: <br/> (CUDA 8.0-10.2)|:white_check_mark: <br/> (CUDA 9.0-10.2)|:white_check_mark: <br/> (CUDA 9.2-10.2) |:x:|:white_check_mark: <br/> (CUDA 9.1-10.2)|:white_check_mark: <br/> (CUDA 10.1-10.2)|:white_check_mark: <br/> (CUDA 10.1-10.2)|:white_check_mark: <br/> (CUDA 10.1-10.2)|:white_check_mark: <br/> (CUDA 10.1-10.2)|:x:|:x:|:white_check_mark: <br/> (CUDA 10.0-10.2)|
|CUDA (clang) | - | - | - | - | :white_check_mark: <br/> (CUDA 8.0)| :white_check_mark: <br/> (CUDA 8.0)| :white_check_mark: <br/> (CUDA 8.0-9.0) | :white_check_mark: <br/> (CUDA 8.0-9.2) | :white_check_mark: <br/> (CUDA 8.0-10.0) | :white_check_mark: <br/> (CUDA 9.2-10.1) | - | - |
|[HIP](doc/markdown/user/implementation/mapping/HIP.md) (nvcc)|:white_check_mark: <br/> (nvcc 9.0+)|:x:|:x:|:x:|:x:|:x:|:x:|:x:|:x:|:x:|:x:|:x:|

Expand Down
26 changes: 16 additions & 10 deletions alpakaConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ IF(ALPAKA_ACC_GPU_CUDA_ENABLE)
IF(CUDA_VERSION GREATER_EQUAL 10.0)
MESSAGE(FATAL_ERROR "Clang versions lower than 8 do not support CUDA 10.0 or greater!")
ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_VERSION LESS 9.0)
IF(CUDA_VERSION GREATER_EQUAL 10.1)
MESSAGE(FATAL_ERROR "Clang versions lower than 9 do not support CUDA 10.1 or greater!")
ELSEIF(CMAKE_CXX_COMPILER_VERSION LESS 10.0)
IF(CUDA_VERSION GREATER_EQUAL 10.2)
MESSAGE(FATAL_ERROR "Clang versions lower than 10 do not support CUDA 10.2 or greater!")
ENDIF()
ENDIF()

Expand Down Expand Up @@ -545,6 +545,10 @@ IF(ALPAKA_ACC_GPU_CUDA_ENABLE)
IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)
MESSAGE(FATAL_ERROR "NVCC 10.1 does not support GCC 9+. Please use GCC 4.9, 5, 6, 7 or 8!")
ENDIF()
ELSEIF(CUDA_VERSION VERSION_EQUAL 10.2)
IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)
MESSAGE(FATAL_ERROR "NVCC 10.1 does not support GCC 9+. Please use GCC 4.9, 5, 6, 7 or 8!")
ENDIF()
ENDIF()
ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
IF(CUDA_VERSION VERSION_EQUAL 8.0)
Expand All @@ -571,6 +575,10 @@ IF(ALPAKA_ACC_GPU_CUDA_ENABLE)
IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)
MESSAGE(FATAL_ERROR "NVCC 10.1 does not support clang 9+. Please use clang 4, 5, 6, 7 or 8!")
ENDIF()
ELSEIF(CUDA_VERSION VERSION_EQUAL 10.2)
IF(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 9.0)
MESSAGE(FATAL_ERROR "NVCC 10.1 does not support clang 9+. Please use clang 4, 5, 6, 7 or 8!")
ENDIF()
ENDIF()
ENDIF()

Expand Down Expand Up @@ -678,16 +686,14 @@ IF(ALPAKA_ACC_GPU_CUDA_ENABLE)
# avoids warnings on host-device signature of 'std::__shared_count<>'
IF(CUDA_VERSION EQUAL 10.0)
LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2905)
ENDIF()

# avoids warnings on host-device signature of 'std::__shared_count<>'
IF(CUDA_VERSION EQUAL 10.1)
ELSEIF(CUDA_VERSION EQUAL 10.1)
LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2912)
ELSEIF(CUDA_VERSION EQUAL 10.2)
LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2976)
ENDIF()

# avoids warnings on host-device signature of 'std::__shared_count<>'
IF(CUDA_VERSION EQUAL 10.2)
LIST(APPEND CUDA_NVCC_FLAGS -Xcudafe --diag_suppress=2976)
IF(CUDA_VERSION GREATER_EQUAL 10.2)
LIST(APPEND CUDA_NVCC_FLAGS -Werror=all-warnings)
ENDIF()

IF(ALPAKA_CUDA_KEEP_FILES)
Expand Down
9 changes: 9 additions & 0 deletions cmake/dev.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,12 @@ ELSE()
ENDIF()
ENDIF()
ENDIF()

# nvcc
IF(ALPAKA_ACC_GPU_CUDA_ENABLE)
IF(NOT ALPAKA_CUDA_COMPILER MATCHES "clang")
IF(CUDA_VERSION GREATER_EQUAL 10.2)
LIST(APPEND CUDA_NVCC_FLAGS -Werror=all-warnings)
ENDIF()
ENDIF()
ENDIF()
13 changes: 11 additions & 2 deletions script/travis/install_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ then
ALPAKA_CUDA_PKG_DEB_NAME=cuda-repo-ubuntu1804-10-1-local
ALPAKA_CUDA_PKG_FILE_NAME="${ALPAKA_CUDA_PKG_DEB_NAME}"-10.1.168-418.67_1.0-1_amd64.deb
ALPAKA_CUDA_PKG_FILE_PATH=https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/${ALPAKA_CUDA_PKG_FILE_NAME}
elif [ "${ALPAKA_CUDA_VERSION}" == "10.2" ]
then
ALPAKA_CUDA_PKG_DEB_NAME=cuda-repo-ubuntu1804-10-2-local
ALPAKA_CUDA_PKG_FILE_NAME="${ALPAKA_CUDA_PKG_DEB_NAME}"-10.2.89-440.33.01_1.0-1_amd64.deb
ALPAKA_CUDA_PKG_FILE_PATH=http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/${ALPAKA_CUDA_PKG_FILE_NAME}
else
echo CUDA versions other than 8.0, 9.0, 9.1, 9.2, 10.0 and 10.1 are not currently supported on linux!
echo CUDA versions other than 8.0, 9.0, 9.1, 9.2, 10.0, 10.1 and 10.2 are not currently supported on linux!
fi
if [ -z "$(ls -A ${ALPAKA_CI_CUDA_DIR})" ]
then
Expand Down Expand Up @@ -96,8 +101,12 @@ then
then
ALPAKA_CUDA_PKG_FILE_NAME=cuda_10.1.168_425.25_win10.exe
ALPAKA_CUDA_PKG_FILE_PATH=https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/${ALPAKA_CUDA_PKG_FILE_NAME}
elif [ "${ALPAKA_CUDA_VERSION}" == "10.2" ]
then
ALPAKA_CUDA_PKG_FILE_NAME=cuda_10.2.89_441.22_win10.exe
ALPAKA_CUDA_PKG_FILE_PATH=http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/${ALPAKA_CUDA_PKG_FILE_NAME}
else
echo CUDA versions other than 10.0 and 10.1 are not currently supported on Windows!
echo CUDA versions other than 10.0, 10.1 and 10.2 are not currently supported on Windows!
fi

curl -L -o cuda_installer.exe ${ALPAKA_CUDA_PKG_FILE_PATH}
Expand Down
2 changes: 0 additions & 2 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

CMAKE_MINIMUM_REQUIRED(VERSION 3.11.0)

PROJECT("alpakaUnitTest")

################################################################################
# Add subdirectories.
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion test/unit/queue/src/CollectiveQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
struct QueueCollectiveTestKernel
{
template<typename TAcc>
ALPAKA_FN_ACC auto operator()(
auto operator()(
TAcc const & acc,
int* resultsPtr) const
-> void
Expand Down

0 comments on commit 6c8b617

Please sign in to comment.