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
4d08193a
Commit
4d08193a
authored
Feb 04, 2019
by
Paul
Browse files
Use default python if available
parent
cdb0d24f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
src/py/CMakeLists.txt
src/py/CMakeLists.txt
+8
-0
test/py/CMakeLists.txt
test/py/CMakeLists.txt
+2
-0
No files found.
src/py/CMakeLists.txt
View file @
4d08193a
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 migraphx migraphx_onnx migraphx_cpu
)
set_target_properties
(
migraphx_py PROPERTIES
OUTPUT_NAME migraphx
)
if
(
MIGRAPHX_ENABLE_GPU
)
target_link_libraries
(
migraphx_py migraphx_gpu
)
target_compile_definitions
(
migraphx_py PRIVATE -DHAVE_GPU
)
endif
()
test/py/CMakeLists.txt
View file @
4d08193a
...
...
@@ -12,5 +12,7 @@ function(add_py_test NAME SCRIPT)
COMMAND
${
ENV_COMMAND
}
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
SCRIPT
}
${
ARGN
}
COMMENT
"
${
PYTHON_EXECUTABLE
}
${
SCRIPT
}
"
)
endfunction
()
add_dependencies
(
tests migraphx_py
)
add_dependencies
(
check migraphx_py
)
add_py_test
(
test test.py WORKING_DIRECTORY
${
TEST_ONNX_DIR
}
)
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