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
fc8c2664
Commit
fc8c2664
authored
Feb 08, 2019
by
Paul
Browse files
Disable python bindings when using the sanitizers
parent
33ac7c85
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
Jenkinsfile
Jenkinsfile
+3
-2
src/py/CMakeLists.txt
src/py/CMakeLists.txt
+6
-1
test/CMakeLists.txt
test/CMakeLists.txt
+2
-0
No files found.
Jenkinsfile
View file @
fc8c2664
...
...
@@ -101,7 +101,8 @@ rocmtest tidy: rocmnode('rocmtest') { cmake_build ->
stage
(
'Clang Debug'
)
{
// TODO: Enanle integer
def
sanitizers
=
"undefined"
cmake_build
(
"hcc"
,
"-DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_FLAGS_DEBUG='-g -fno-omit-frame-pointer -fsanitize-minimal-runtime -fsanitize=${sanitizers} -fno-sanitize-recover=${sanitizers}'"
)
def
debug_flags
=
"-g -fno-omit-frame-pointer -fsanitize=${sanitizers} -fno-sanitize-recover=${sanitizers}"
cmake_build
(
"hcc"
,
"-DCMAKE_BUILD_TYPE=debug -DMIGRAPHX_ENABLE_PYTHON=Off -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}'"
)
}
stage
(
'Clang Release'
)
{
cmake_build
(
"hcc"
,
"-DCMAKE_BUILD_TYPE=release"
)
...
...
@@ -120,7 +121,7 @@ rocmtest tidy: rocmnode('rocmtest') { cmake_build ->
// TODO: Add bounds-strict
def
sanitizers
=
"undefined,address"
def
debug_flags
=
"-g -fprofile-arcs -ftest-coverage -fno-omit-frame-pointer -fsanitize-address-use-after-scope -fsanitize=${sanitizers} -fno-sanitize-recover=${sanitizers}"
cmake_build
(
"g++-7"
,
"-DCMAKE_BUILD_TYPE=debug ${cmake_linker_flags} -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}'"
)
cmake_build
(
"g++-7"
,
"-DCMAKE_BUILD_TYPE=debug
-DMIGRAPHX_ENABLE_PYTHON=Off
${cmake_linker_flags} -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}'"
)
}
stage
(
'Codecov'
)
{
...
...
src/py/CMakeLists.txt
View file @
fc8c2664
option
(
MIGRAPHX_ENABLE_PYTHON
"Enable python bindings"
ON
)
if
(
MIGRAPHX_ENABLE_PYTHON
)
find_program
(
DEFAULT_PYTHON_EXE python
)
if
(
DEFAULT_PYTHON_EXE
)
set
(
PYTHON_EXECUTABLE
${
DEFAULT_PYTHON_EXE
}
CACHE PATH
"Path to python executable"
)
endif
()
find_package
(
pybind11 REQUIRED
)
pybind11_add_module
(
migraphx_py migraphx_py.cpp
)
target_link_libraries
(
migraphx_py PRIVATE migraphx migraphx_onnx migraphx_cpu
)
set_target_properties
(
migraphx_py PROPERTIES
OUTPUT_NAME migraphx
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
)
target_link_libraries
(
migraphx_py PRIVATE migraphx migraphx_onnx migraphx_cpu
)
if
(
MIGRAPHX_ENABLE_GPU
)
target_link_libraries
(
migraphx_py PRIVATE migraphx_gpu
)
target_compile_definitions
(
migraphx_py PRIVATE -DHAVE_GPU
)
endif
()
endif
()
test/CMakeLists.txt
View file @
fc8c2664
...
...
@@ -121,7 +121,9 @@ add_test(NAME test_onnx COMMAND $<TARGET_FILE:test_onnx> WORKING_DIRECTORY ${CMA
add_dependencies
(
tests test_onnx
)
add_dependencies
(
check test_onnx
)
if
(
MIGRAPHX_ENABLE_PYTHON
)
add_subdirectory
(
py
)
endif
()
function
(
test_header NAME HEADER
)
...
...
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