Skip to content

Commit ebd9199

Browse files
committed
fix parallel in cmake
1 parent b3cdf0c commit ebd9199

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

3rdparty/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
add_subdirectory(googletest)
2+
3+
set(DNNL_BUILD_THREADPOOL_CPU ON CACHE BOOL "Build with Threadpool CPU support")
4+
set(DNNL_CPU_RUNTIME "OMP" CACHE STRING "CPU runtime (OMP, TBB, SEQ)")
5+
set(DNNL_BUILD_EXAMPLES OFF CACHE BOOL "Build examples")
6+
set(DNNL_BUILD_TESTS OFF CACHE BOOL "Build tests")
7+
set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE BOOL "Enable concurrent execution")
28
add_subdirectory(oneDNN)
39

10+
if(CMAKE_BUILD_PARALLEL_LEVEL)
11+
set(DNNL_BUILD_PARALLEL ${CMAKE_BUILD_PARALLEL_LEVEL})
12+
else()
13+
set(DNNL_BUILD_PARALLEL 2) # Ограничение по умолчанию
14+
endif()
15+
416
# Unified TBB Configuration
517
option(TBB_TEST "Build TBB tests" OFF)
618
option(TBB_EXAMPLES "Build TBB examples" OFF)

0 commit comments

Comments
 (0)