Commit 23ef67a7 authored by Scott Thornton's avatar Scott Thornton
Browse files

Merge branch 'master' into onnx_fixes

parents 7e23d5c4 68d69739
...@@ -12,7 +12,30 @@ ...@@ -12,7 +12,30 @@
namespace migraph { namespace migraph {
struct program; #ifdef DOXYGEN
/// An interface for a compilation target
struct target
{
/// A unique name used to identify the target
std::string name() const;
/// The transformation passes to be run
/**
* @brief The transformation pass to be run during compilation.
* @details [long description]
*
* @param ctx This is the target-dependent context that is created by `get_context`
* @return The passes to be ran
*/
std::vector<pass> get_passes(context& ctx) const;
/**
* @brief Construct a context for the target.
* @return The context to be used during compilation and execution.
*/
context get_context() const;
};
#else
<% <%
interface('target', interface('target',
...@@ -22,6 +45,8 @@ interface('target', ...@@ -22,6 +45,8 @@ interface('target',
) )
%> %>
#endif
} // namespace migraph } // namespace migraph
#endif #endif
...@@ -239,7 +239,8 @@ def convert_member(d, struct_name): ...@@ -239,7 +239,8 @@ def convert_member(d, struct_name):
'member_const': '', 'member_const': '',
'friend': '', 'friend': '',
'this': '(*this)', 'this': '(*this)',
'using': '' 'using': '',
'brief': ''
} }
args = [] args = []
params = [] params = []
...@@ -266,6 +267,8 @@ def convert_member(d, struct_name): ...@@ -266,6 +267,8 @@ def convert_member(d, struct_name):
member['default'] = t member['default'] = t
elif x == 'using': elif x == 'using':
member['using'] = 'using {};'.format(d[name]['using']) member['using'] = 'using {};'.format(d[name]['using'])
elif x == '__brief__':
member['doc'] = '/// ' + t
elif x.startswith('__') and x.endswith('__'): elif x.startswith('__') and x.endswith('__'):
continue continue
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment