File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ set(LLAMA_CUDA_PEER_MAX_BATCH_SIZE "128" CACHE STRING
51
51
"llama: max. batch size for using peer access" )
52
52
option (LLAMA_HIPBLAS "llama: use hipBLAS" OFF )
53
53
54
+ # Other
55
+ option (LLAMA_OPENMP "llama: use OpenMP" OFF )
54
56
55
57
#
56
58
# Compile flags
@@ -286,6 +288,17 @@ if (LLAMA_LTO)
286
288
endif ()
287
289
endif ()
288
290
291
+ if (LLAMA_OPENMP)
292
+ find_package (OpenMP)
293
+ if (OpenMP_FOUND)
294
+ message (STATUS "OpenMP found" )
295
+ add_compile_definitions (GGML_USE_OPENMP)
296
+ set (LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} OpenMP::OpenMP_C OpenMP::OpenMP_CXX)
297
+ else ()
298
+ message (WARNING "OpenMP not found" )
299
+ endif ()
300
+ endif ()
301
+
289
302
# this version of Apple ld64 is buggy
290
303
execute_process (
291
304
COMMAND ${CMAKE_C_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} -Wl,-v
You can’t perform that action at this time.
0 commit comments