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
0ff07152
Commit
0ff07152
authored
Oct 05, 2023
by
Artur Wojcik
Browse files
cmake_cpu
parent
2bf6ed88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
src/targets/cpu/CMakeLists.txt
src/targets/cpu/CMakeLists.txt
+16
-9
No files found.
src/targets/cpu/CMakeLists.txt
View file @
0ff07152
...
@@ -67,6 +67,7 @@ elseif(NOT WIN32)
...
@@ -67,6 +67,7 @@ elseif(NOT WIN32)
endif
()
endif
()
rocm_clang_tidy_check
(
migraphx_cpu
)
rocm_clang_tidy_check
(
migraphx_cpu
)
if
(
MIGRAPHX_ENABLE_ZENDNN
)
if
(
MIGRAPHX_ENABLE_ZENDNN
)
target_compile_definitions
(
migraphx_cpu PRIVATE -DMIGRAPHX_ENABLE_ZENDNN
)
target_compile_definitions
(
migraphx_cpu PRIVATE -DMIGRAPHX_ENABLE_ZENDNN
)
target_include_directories
(
migraphx_cpu PRIVATE
${
ZENDNN_INC_PATH
}
)
target_include_directories
(
migraphx_cpu PRIVATE
${
ZENDNN_INC_PATH
}
)
...
@@ -74,21 +75,27 @@ if(MIGRAPHX_ENABLE_ZENDNN)
...
@@ -74,21 +75,27 @@ if(MIGRAPHX_ENABLE_ZENDNN)
target_link_libraries
(
migraphx_cpu PRIVATE
${
BLIS_LIB
}
)
target_link_libraries
(
migraphx_cpu PRIVATE
${
BLIS_LIB
}
)
target_link_libraries
(
migraphx_cpu PRIVATE
${
ZENDNN_LIB
}
)
target_link_libraries
(
migraphx_cpu PRIVATE
${
ZENDNN_LIB
}
)
else
()
else
()
target_link_libraries
(
migraphx_cpu P
RIVATE
DNNL::dnnl
)
target_link_libraries
(
migraphx_cpu P
UBLIC
DNNL::dnnl
)
endif
()
endif
()
target_link_libraries
(
migraphx_cpu PRIVATE migraphx
)
target_link_libraries
(
migraphx_cpu PRIVATE migraphx
)
migraphx_generate_export_header
(
migraphx_cpu
)
migraphx_generate_export_header
(
migraphx_cpu
)
find_package
(
OpenMP
)
find_package
(
OpenMP
)
target_link_libraries
(
migraphx_cpu PUBLIC OpenMP::OpenMP_CXX
)
if
(
WIN32
)
# Add library path to rpath to workaround issues with our broken packages
target_link_libraries
(
migraphx_cpu PUBLIC libomp
)
foreach
(
LIBRARY
${
OpenMP_CXX_LIBRARIES
}
)
target_include_directories
(
migraphx_cpu PUBLIC
${
OpenMP_CXX_INCLUDE_DIRS
}
)
target_compile_options
(
migraphx_cpu PUBLIC
${
OpenMP_CXX_FLAGS
}
)
else
()
target_link_libraries
(
migraphx_cpu PUBLIC OpenMP::OpenMP_CXX
)
# Add library path to rpath to workaround issues with our broken packages
foreach
(
LIBRARY
${
OpenMP_CXX_LIBRARIES
}
)
if
(
LIBRARY MATCHES
"libomp"
)
if
(
LIBRARY MATCHES
"libomp"
)
get_filename_component
(
LIBRARY_PATH
"
${
LIBRARY
}
"
PATH
)
get_filename_component
(
LIBRARY_PATH
"
${
LIBRARY
}
"
PATH
)
target_link_libraries
(
migraphx_cpu PUBLIC -Wl,-rpath=
${
LIBRARY_PATH
}
-Wl,-rpath-link=
${
LIBRARY_PATH
}
)
target_link_libraries
(
migraphx_cpu PUBLIC -Wl,-rpath=
${
LIBRARY_PATH
}
-Wl,-rpath-link=
${
LIBRARY_PATH
}
)
endif
()
endif
()
endforeach
()
endforeach
()
endif
()
rocm_install_targets
(
rocm_install_targets
(
TARGETS migraphx_cpu
TARGETS migraphx_cpu
...
...
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