Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
4d82d761
Unverified
Commit
4d82d761
authored
Oct 19, 2021
by
Paul Fultz II
Committed by
GitHub
Oct 19, 2021
Browse files
Link with pthreads in core migraphx library since we use threads there (#975)
pthread linking errors on SLES.
parent
351007d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/CMakeLists.txt
src/CMakeLists.txt
+4
-0
src/targets/cpu/CMakeLists.txt
src/targets/cpu/CMakeLists.txt
+1
-3
No files found.
src/CMakeLists.txt
View file @
4d82d761
...
@@ -200,6 +200,9 @@ target_link_libraries(migraphx PRIVATE -ldl)
...
@@ -200,6 +200,9 @@ target_link_libraries(migraphx PRIVATE -ldl)
target_include_directories
(
migraphx SYSTEM PUBLIC $<BUILD_INTERFACE:
${
HALF_INCLUDE_DIR
}
>
)
target_include_directories
(
migraphx SYSTEM PUBLIC $<BUILD_INTERFACE:
${
HALF_INCLUDE_DIR
}
>
)
find_package
(
Threads
)
target_link_libraries
(
migraphx PUBLIC Threads::Threads
)
find_package
(
msgpack REQUIRED
)
find_package
(
msgpack REQUIRED
)
target_link_libraries
(
migraphx PRIVATE msgpackc-cxx
)
target_link_libraries
(
migraphx PRIVATE msgpackc-cxx
)
# Make this available to the tests
# Make this available to the tests
...
@@ -237,6 +240,7 @@ rocm_export_targets(
...
@@ -237,6 +240,7 @@ rocm_export_targets(
TARGETS migraphx::migraphx migraphx_all_targets
TARGETS migraphx::migraphx migraphx_all_targets
NAMESPACE migraphx::
NAMESPACE migraphx::
DEPENDS
DEPENDS
Threads
${
PACKAGE_DEPENDS
}
${
PACKAGE_DEPENDS
}
)
)
...
...
src/targets/cpu/CMakeLists.txt
View file @
4d82d761
...
@@ -33,8 +33,6 @@ rocm_set_soversion(migraphx_cpu ${MIGRAPHX_SO_VERSION})
...
@@ -33,8 +33,6 @@ rocm_set_soversion(migraphx_cpu ${MIGRAPHX_SO_VERSION})
set
(
MIGRAPHX_ENABLE_ZENDNN Off CACHE BOOL
""
)
set
(
MIGRAPHX_ENABLE_ZENDNN Off CACHE BOOL
""
)
find_package
(
Threads
)
if
(
MIGRAPHX_ENABLE_ZENDNN
)
if
(
MIGRAPHX_ENABLE_ZENDNN
)
find_path
(
ZENDNN_INC_PATH zendnn.hpp
)
find_path
(
ZENDNN_INC_PATH zendnn.hpp
)
find_library
(
ZENDNN_LIB amdZenDNN
)
find_library
(
ZENDNN_LIB amdZenDNN
)
...
@@ -53,7 +51,7 @@ if(MIGRAPHX_ENABLE_ZENDNN)
...
@@ -53,7 +51,7 @@ if(MIGRAPHX_ENABLE_ZENDNN)
else
()
else
()
target_link_libraries
(
migraphx_cpu PRIVATE DNNL::dnnl
)
target_link_libraries
(
migraphx_cpu PRIVATE DNNL::dnnl
)
endif
()
endif
()
target_link_libraries
(
migraphx_cpu PRIVATE migraphx
Threads::Threads
)
target_link_libraries
(
migraphx_cpu PRIVATE migraphx
)
find_package
(
OpenMP
)
find_package
(
OpenMP
)
target_link_libraries
(
migraphx_cpu PUBLIC OpenMP::OpenMP_CXX
)
target_link_libraries
(
migraphx_cpu PUBLIC OpenMP::OpenMP_CXX
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment