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
90f10299
Commit
90f10299
authored
Jan 24, 2022
by
Shucai Xiao
Browse files
clang format
parent
86331dbd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
31 deletions
+35
-31
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+4
-3
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+27
-27
test/simplify_reshapes_test.cpp
test/simplify_reshapes_test.cpp
+4
-1
No files found.
src/eliminate_contiguous.cpp
View file @
90f10299
...
@@ -78,12 +78,13 @@ void eliminate_contiguous::apply(module& p) const
...
@@ -78,12 +78,13 @@ void eliminate_contiguous::apply(module& p) const
{
{
auto
args
=
ins
->
inputs
();
auto
args
=
ins
->
inputs
();
std
::
transform
(
args
.
begin
(),
args
.
end
(),
args
.
begin
(),
[
&
](
auto
in
)
{
std
::
transform
(
args
.
begin
(),
args
.
end
(),
args
.
begin
(),
[
&
](
auto
in
)
{
if
(
in
->
name
()
!=
op_name
)
return
in
;
if
(
in
->
name
()
!=
op_name
)
return
in
;
auto
prev
=
in
->
inputs
().
front
();
auto
prev
=
in
->
inputs
().
front
();
return
prev
->
get_shape
().
standard
()
?
prev
:
in
;
return
prev
->
get_shape
().
standard
()
?
prev
:
in
;
});
});
if
(
args
!=
ins
->
inputs
())
if
(
args
!=
ins
->
inputs
())
{
{
p
.
replace_instruction
(
ins
,
ins
->
get_operator
(),
args
);
p
.
replace_instruction
(
ins
,
ins
->
get_operator
(),
args
);
}
}
...
...
test/onnx/onnx_test.cpp
View file @
90f10299
test/simplify_reshapes_test.cpp
View file @
90f10299
...
@@ -14,7 +14,10 @@
...
@@ -14,7 +14,10 @@
void
run_pass
(
migraphx
::
module
&
m
)
void
run_pass
(
migraphx
::
module
&
m
)
{
{
migraphx
::
run_passes
(
m
,
{
migraphx
::
simplify_reshapes
{},
migraphx
::
eliminate_contiguous
{
"contiguous"
},
migraphx
::
dead_code_elimination
{}});
migraphx
::
run_passes
(
m
,
{
migraphx
::
simplify_reshapes
{},
migraphx
::
eliminate_contiguous
{
"contiguous"
},
migraphx
::
dead_code_elimination
{}});
}
}
TEST_CASE
(
double_contig
)
TEST_CASE
(
double_contig
)
...
...
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