diff options
author | Brad King <brad.king@kitware.com> | 2016-05-20 13:15:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-05-20 13:15:57 (GMT) |
commit | 94b9ead117a1aa6320cd434d020273b904731432 (patch) | |
tree | ed7aa87e79711411c077ebecb708e05da41bae8b /Modules | |
parent | e07f7e6cd56609c1debd9a49b88f939b8b6b8840 (diff) | |
parent | cc95001b1cc20367ea127ea09ea91960782e65a3 (diff) | |
download | CMake-94b9ead117a1aa6320cd434d020273b904731432.zip CMake-94b9ead117a1aa6320cd434d020273b904731432.tar.gz CMake-94b9ead117a1aa6320cd434d020273b904731432.tar.bz2 |
Merge topic 'FindCUDA-fp16'
cc95001b FindCUDA: Detect and report FP16 support
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindCUDA.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 4f52d25..0718116 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -264,6 +264,7 @@ # CUDA_VERSION_MINOR -- The minor version. # CUDA_VERSION # CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR +# CUDA_HAS_FP16 -- Whether a short float (float16,fp16) is supported. # # CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set). # CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the @@ -683,6 +684,12 @@ find_path(CUDA_TOOLKIT_INCLUDE find_path(CUDA_TOOLKIT_INCLUDE device_functions.h) mark_as_advanced(CUDA_TOOLKIT_INCLUDE) +if (CUDA_VERSION VERSION_GREATER "7.0" OR EXISTS "${CUDA_TOOLKIT_INCLUDE}/cuda_fp16.h") + set(CUDA_HAS_FP16 TRUE) +else() + set(CUDA_HAS_FP16 FALSE) +endif() + # Set the user list of include dir to nothing to initialize it. set (CUDA_NVCC_INCLUDE_ARGS_USER "") set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) |