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
4837bf72
Commit
4837bf72
authored
Jan 17, 2023
by
Alan Turner
Browse files
Add flag to remove last output (for BERT perfruns)
parent
b37d1a81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/onnx/onnx_parser.cpp
src/onnx/onnx_parser.cpp
+4
-0
No files found.
src/onnx/onnx_parser.cpp
View file @
4837bf72
...
...
@@ -39,6 +39,8 @@
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_REMOVE_LAST_OUTPUT
);
namespace
onnx
{
static
onnx_parser
::
attribute_map
get_attributes
(
const
onnx
::
NodeProto
&
node
)
...
...
@@ -362,6 +364,8 @@ void onnx_parser::parse_graph(module* mod, const onnx::GraphProto& graph)
std
::
back_inserter
(
output_ins
),
[
&
](
const
auto
&
name
)
{
return
instructions
[
name
];
});
if
(
enabled
(
MIGRAPHX_REMOVE_LAST_OUTPUT
{})
and
output_ins
.
size
()
>
1
)
output_ins
.
pop_back
();
// add the return instuction
mod
->
add_return
(
output_ins
);
...
...
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