Skip to content

Commit 4299d1e

Browse files
committed
Add no GPU support comment
1 parent 838bbaa commit 4299d1e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

flang-rt/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,23 @@ endif ()
102102
option(FLANG_RT_INCLUDE_TESTS "Generate build targets for the flang-rt unit and regression-tests." "${LLVM_INCLUDE_TESTS}")
103103

104104

105-
set(FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT "" CACHE STRING "Compile flang-rt with GPU support (CUDA or OpenMP)")
105+
set(FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT "" CACHE STRING "Compile Flang-RT with GPU support (CUDA or OpenMP)")
106106
set_property(CACHE FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT PROPERTY STRINGS
107107
""
108108
CUDA
109109
OpenMP
110110
)
111111
if (NOT FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT)
112+
# Support for GPUs disabled
112113
elseif (FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT STREQUAL "CUDA")
114+
# Support for CUDA
113115
set(FLANG_RT_LIBCUDACXX_PATH "" CACHE PATH "Path to libcu++ package installation")
114116
option(FLANG_RT_CUDA_RUNTIME_PTX_WITHOUT_GLOBAL_VARS "Do not compile global variables' definitions when producing PTX library" OFF)
115117
elseif (FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT STREQUAL "OpenMP")
116-
set(FLANG_RT_DEVICE_ARCHITECTURES "all" CACHE STRING
117-
"List of OpenMP device architectures to be used to compile the Fortran runtime (e.g. 'gfx1103;sm_90')")
118+
# Support for OpenMP offloading
119+
set(FLANG_RT_DEVICE_ARCHITECTURES "all" CACHE STRING
120+
"List of OpenMP device architectures to be used to compile the Fortran runtime (e.g. 'gfx1103;sm_90')"
121+
)
118122
else ()
119123
message(FATAL_ERROR "Invalid value '${FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT}' for FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT; must be empty, 'CUDA', or 'OpenMP'")
120124
endif ()

0 commit comments

Comments
 (0)