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
aa8bcdf1
Commit
aa8bcdf1
authored
Apr 17, 2023
by
Paul
Browse files
Format
parent
674d0092
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/onnx/onnx_parser.cpp
src/onnx/onnx_parser.cpp
+1
-2
src/propagate_constant.cpp
src/propagate_constant.cpp
+2
-2
No files found.
src/onnx/onnx_parser.cpp
View file @
aa8bcdf1
...
@@ -357,7 +357,7 @@ onnx_parser::parse_graph(module* mod, const onnx::GraphProto& graph, bool inlini
...
@@ -357,7 +357,7 @@ onnx_parser::parse_graph(module* mod, const onnx::GraphProto& graph, bool inlini
[](
auto
&&
x
,
auto
&&
y
)
{
return
std
::
make_pair
(
x
,
y
);
});
[](
auto
&&
x
,
auto
&&
y
)
{
return
std
::
make_pair
(
x
,
y
);
});
std
::
vector
<
instruction_ref
>
added_instructions
;
std
::
vector
<
instruction_ref
>
added_instructions
;
fix
([
&
](
auto
self
,
auto
r
)
{
fix
([
&
](
auto
self
,
auto
r
)
{
for
(
auto
ins
:
r
)
for
(
auto
ins
:
r
)
{
{
if
(
contains
(
args
,
ins
))
if
(
contains
(
args
,
ins
))
continue
;
continue
;
...
@@ -366,7 +366,6 @@ onnx_parser::parse_graph(module* mod, const onnx::GraphProto& graph, bool inlini
...
@@ -366,7 +366,6 @@ onnx_parser::parse_graph(module* mod, const onnx::GraphProto& graph, bool inlini
}
}
})(
result
);
})(
result
);
mod
->
debug_print
(
added_instructions
);
mod
->
debug_print
(
added_instructions
);
}
}
// Find instructions corresponding to the output
// Find instructions corresponding to the output
...
...
src/propagate_constant.cpp
View file @
aa8bcdf1
...
@@ -88,9 +88,9 @@ void propagate_constant::apply(module& m) const
...
@@ -88,9 +88,9 @@ void propagate_constant::apply(module& m) const
std
::
cout
<<
"Const replace: "
<<
std
::
endl
;
std
::
cout
<<
"Const replace: "
<<
std
::
endl
;
std
::
vector
<
instruction_ref
>
inss
;
std
::
vector
<
instruction_ref
>
inss
;
fix
([
&
](
auto
self
,
auto
ins
)
{
fix
([
&
](
auto
self
,
auto
ins
)
{
if
(
contains
(
inss
,
ins
))
if
(
contains
(
inss
,
ins
))
return
;
return
;
for
(
auto
input
:
ins
->
inputs
())
for
(
auto
input
:
ins
->
inputs
())
self
(
input
);
self
(
input
);
inss
.
push_back
(
ins
);
inss
.
push_back
(
ins
);
})(
const_instrs_vec
[
i
]);
})(
const_instrs_vec
[
i
]);
...
...
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