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
d4c89abc
Commit
d4c89abc
authored
Apr 29, 2019
by
Shucai Xiao
Browse files
clang format
parent
d7ba7f44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/eliminate_contiguous.cpp
src/eliminate_contiguous.cpp
+1
-1
test/eliminate_contiguous_test.cpp
test/eliminate_contiguous_test.cpp
+3
-3
No files found.
src/eliminate_contiguous.cpp
View file @
d4c89abc
...
@@ -21,7 +21,7 @@ static bool try_compute_shape(instruction_ref ins, const std::vector<shape>& inp
...
@@ -21,7 +21,7 @@ static bool try_compute_shape(instruction_ref ins, const std::vector<shape>& inp
}
}
// if no changes for the shape, the contiguous can also be removed
// if no changes for the shape, the contiguous can also be removed
if
(
new_shape
==
ins
->
get_shape
())
if
(
new_shape
==
ins
->
get_shape
())
{
{
return
true
;
return
true
;
}
}
...
...
test/eliminate_contiguous_test.cpp
View file @
d4c89abc
...
@@ -58,9 +58,9 @@ TEST_CASE(transpose_gemm)
...
@@ -58,9 +58,9 @@ TEST_CASE(transpose_gemm)
TEST_CASE
(
transpose_standard_op
)
TEST_CASE
(
transpose_standard_op
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
l
=
p
.
add_literal
(
get_2x2
());
auto
l
=
p
.
add_literal
(
get_2x2
());
auto
t
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
l
);
auto
t
=
p
.
add_instruction
(
migraphx
::
op
::
transpose
{{
1
,
0
}},
l
);
auto
c
=
p
.
add_instruction
(
migraphx
::
op
::
contiguous
{},
t
);
auto
c
=
p
.
add_instruction
(
migraphx
::
op
::
contiguous
{},
t
);
auto
sum
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
c
,
c
);
auto
sum
=
p
.
add_instruction
(
migraphx
::
op
::
add
{},
c
,
c
);
p
.
add_instruction
(
pass_standard_op
{},
sum
);
p
.
add_instruction
(
pass_standard_op
{},
sum
);
auto
count
=
std
::
distance
(
p
.
begin
(),
p
.
end
());
auto
count
=
std
::
distance
(
p
.
begin
(),
p
.
end
());
...
...
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