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
ff877d8f
Unverified
Commit
ff877d8f
authored
Aug 09, 2023
by
Paul Fultz II
Committed by
GitHub
Aug 09, 2023
Browse files
Add a job to check for export macros (#2016)
parent
dd219d6e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
3 deletions
+12
-3
Jenkinsfile
Jenkinsfile
+4
-0
cmake/ExportHeader.cmake
cmake/ExportHeader.cmake
+4
-1
src/py/CMakeLists.txt
src/py/CMakeLists.txt
+1
-0
src/py/include/migraphx/py.hpp
src/py/include/migraphx/py.hpp
+2
-1
src/py/py_loader.cpp
src/py/py_loader.cpp
+1
-1
No files found.
Jenkinsfile
View file @
ff877d8f
...
...
@@ -114,6 +114,10 @@ rocmtest clang_debug: rocmnode('cdna') { cmake_build ->
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=release"
)
stash
includes:
'build/*.deb'
,
name:
'migraphx-package'
}
},
hidden_symbols:
rocmnode
(
'cdna'
)
{
cmake_build
->
stage
(
'Hidden symbols'
)
{
cmake_build
(
flags:
"-DMIGRAPHX_ENABLE_PYTHON=Off -DMIGRAPHX_ENABLE_GPU=On -DMIGRAPHX_ENABLE_CPU=On -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_C_VISIBILITY_PRESET=hidden"
)
}
},
all_targets_debug
:
rocmnode
(
'cdna'
)
{
cmake_build
->
stage
(
'All targets Release'
)
{
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=release -DMIGRAPHX_ENABLE_GPU=On -DMIGRAPHX_ENABLE_CPU=On -DMIGRAPHX_ENABLE_FPGA=On"
)
...
...
cmake/ExportHeader.cmake
View file @
ff877d8f
...
...
@@ -29,7 +29,10 @@ endif()
include
(
GenerateExportHeader
)
function
(
migraphx_generate_export_header TARGET
)
cmake_parse_arguments
(
PARSE
""
"DIRECTORY"
""
${
ARGN
}
)
set
(
options
)
set
(
oneValueArgs DIRECTORY
)
set
(
multiValueArgs
)
cmake_parse_arguments
(
PARSE
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
if
(
PARSE_DIRECTORY
)
set
(
__directory
${
PARSE_DIRECTORY
}
)
else
()
...
...
src/py/CMakeLists.txt
View file @
ff877d8f
...
...
@@ -24,6 +24,7 @@
option
(
MIGRAPHX_ENABLE_PYTHON
"Enable python bindings"
ON
)
add_library
(
migraphx_py py_loader.cpp
)
migraphx_generate_export_header
(
migraphx_py
)
target_include_directories
(
migraphx_py PRIVATE include
)
target_link_libraries
(
migraphx_py PUBLIC migraphx
)
rocm_install_targets
(
TARGETS migraphx_py INCLUDE include
)
...
...
src/py/include/migraphx/py.hpp
View file @
ff877d8f
...
...
@@ -26,11 +26,12 @@
#include <migraphx/config.hpp>
#include <migraphx/program.hpp>
#include <migraphx/py/export.h>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
program
load_py
(
const
std
::
string
&
filename
);
MIGRAPHX_PY_EXPORT
program
load_py
(
const
std
::
string
&
filename
);
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
...
...
src/py/py_loader.cpp
View file @
ff877d8f
...
...
@@ -64,7 +64,7 @@ static dynamic_loader py_lib()
return
lib
;
}
program
load_py
(
const
std
::
string
&
filename
)
MIGRAPHX_PY_EXPORT
program
load_py
(
const
std
::
string
&
filename
)
{
static
auto
f
=
py_lib
().
get_function
<
program
(
const
std
::
string
&
)
>
(
"migraphx_load_py"
);
return
f
(
filename
);
...
...
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