Skip to content

Commit

Permalink
Handle OpenMP libraries in portable way (issue plaidml#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbabokin committed Aug 29, 2024
1 parent 9c53a05 commit 4decd2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/xsmm-dnn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ target_include_directories(xsmm_dnn_mlp PRIVATE ${XSMM_DNN_INCLUDE_DIRS})
target_link_libraries(xsmm_dnn_mlp PRIVATE xsmm)
if (OPENMP_FOUND)
target_compile_options(xsmm_dnn_mlp PRIVATE ${OpenMP_C_FLAGS})
target_link_libraries(xsmm_dnn_mlp PRIVATE omp)
target_link_libraries(xsmm_dnn_mlp PRIVATE OpenMP::OpenMP_C)
endif()
install(TARGETS xsmm_dnn_mlp RUNTIME DESTINATION bin)
6 changes: 1 addition & 5 deletions tools/tpp-run/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ if(USE_OneDNN)
set(ONEDNN_LIBS_INCL "-ltpp_dnnl_runner_utils")
endif()

if(USE_OpenMP)
set(OPENMP_LIBS_INCL "-lomp")
endif()

set(LIBS
${dialect_libs}
${conversion_libs}
Expand Down Expand Up @@ -88,7 +84,7 @@ target_link_options(tpp-run PRIVATE
-lmlir_runner_utils
-lmlir_async_runtime
${TPP_GPU_LINK_FLAGS}
${OPENMP_LIBS_INCL}
$<$<BOOL:${USE_OpenMP}>:${OpenMP_C_LIBRARIES}>
-Wl,--as-needed
)

Expand Down

0 comments on commit 4decd2d

Please sign in to comment.