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
3b46ba9d
Commit
3b46ba9d
authored
Feb 08, 2022
by
Shucai Xiao
Browse files
add a unit test for more code coverage
parent
2c9e7905
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
test/eliminate_contiguous_test.cpp
test/eliminate_contiguous_test.cpp
+13
-0
No files found.
test/eliminate_contiguous_test.cpp
View file @
3b46ba9d
...
@@ -161,6 +161,19 @@ TEST_CASE(standard_flatten_op)
...
@@ -161,6 +161,19 @@ TEST_CASE(standard_flatten_op)
EXPECT
(
std
::
distance
(
m
.
begin
(),
m
.
end
())
==
(
count
-
1
));
EXPECT
(
std
::
distance
(
m
.
begin
(),
m
.
end
())
==
(
count
-
1
));
}
}
TEST_CASE
(
standard_return_input
)
{
migraphx
::
module
m
;
auto
l
=
m
.
add_literal
(
get_2x2
());
auto
tl
=
m
.
add_instruction
(
migraphx
::
make_op
(
"add"
),
l
,
l
);
auto
c
=
m
.
add_instruction
(
migraphx
::
make_op
(
"contiguous"
),
tl
);
m
.
add_return
({
c
});
auto
count
=
std
::
distance
(
m
.
begin
(),
m
.
end
());
run_pass
(
m
);
EXPECT
(
std
::
distance
(
m
.
begin
(),
m
.
end
())
==
count
-
1
);
}
TEST_CASE
(
contiguous_pointwise
)
TEST_CASE
(
contiguous_pointwise
)
{
{
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
8
,
8
}};
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
8
,
8
}};
...
...
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