Skip to content
Snippets Groups Projects
Commit 6747ed58 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Compile a shared tensor_runtime library without openmp symbol missing

parent 8ff2e980
No related branches found
No related tags found
No related merge requests found
......@@ -78,17 +78,16 @@ endforeach()
# -- Adding tensor_runtime targets
function(add_tensor_runtime target_name)
add_library(${target_name} ${RUNTIME_SRCS})
add_library(${target_name} SHARED ${RUNTIME_SRCS})
set_property(TARGET ${target_name} PROPERTY CUDA_ARCHITECTURES 60)
target_compile_options(
${target_name} PRIVATE
$<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr -maxrregcount 32>
$<$<AND:$<COMPILE_LANGUAGE:CUDA>,$<CONFIG:DEBUG>>:-lineinfo -Xcompiler -ggdb>
$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${OpenMP_CXX_FLAGS}>
--expt-relaxed-constexpr -maxrregcount 32 -Xcompiler ${OpenMP_CXX_FLAGS}
$<$<CONFIG:DEBUG>:-lineinfo -Xcompiler -ggdb>
)
target_include_directories(${target_name} PUBLIC ${INCLUDES})
target_link_directories(${target_name} PUBLIC ${LINK_DIR})
target_link_libraries(${target_name} PUBLIC ${LINK_LIBS})
target_link_libraries(${target_name} PUBLIC ${LINK_LIBS} ${OpenMP_CXX_FLAGS})
target_compile_definitions(${target_name} PRIVATE ${DEFS} ${ARGN})
endfunction(add_tensor_runtime)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment