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
"vscode:/vscode.git/clone" did not exist on "dfd853d3e55d26a90eb490a43c6cc6341fc3b5e1"
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 @@
...
@@ -39,6 +39,8 @@
namespace
migraphx
{
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_REMOVE_LAST_OUTPUT
);
namespace
onnx
{
namespace
onnx
{
static
onnx_parser
::
attribute_map
get_attributes
(
const
onnx
::
NodeProto
&
node
)
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)
...
@@ -362,6 +364,8 @@ void onnx_parser::parse_graph(module* mod, const onnx::GraphProto& graph)
std
::
back_inserter
(
output_ins
),
std
::
back_inserter
(
output_ins
),
[
&
](
const
auto
&
name
)
{
return
instructions
[
name
];
});
[
&
](
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
// add the return instuction
mod
->
add_return
(
output_ins
);
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