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
20d11e64
Commit
20d11e64
authored
Mar 07, 2019
by
Paul
Browse files
Add test for no stream records
parent
da8221c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
test/schedule_test.cpp
test/schedule_test.cpp
+19
-0
No files found.
test/schedule_test.cpp
View file @
20d11e64
...
@@ -217,6 +217,25 @@ TEST_CASE(single_entry)
...
@@ -217,6 +217,25 @@ TEST_CASE(single_entry)
EXPECT
(
check_conflicts
(
p
,
onep1
,
onep2
));
EXPECT
(
check_conflicts
(
p
,
onep1
,
onep2
));
}
}
TEST_CASE
(
zero_record
)
{
schedule_target
t
{};
migraphx
::
program
p
;
auto
one
=
p
.
add_literal
(
1
);
auto
onep1
=
p
.
add_instruction
(
unary_op
{},
one
);
auto
onep2
=
p
.
add_instruction
(
unary_op
{},
one
);
auto
binary
=
p
.
add_instruction
(
nary_op
{},
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
onep1
),
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
onep2
));
p
.
compile
(
t
);
EXPECT
(
not
t
.
has_stream
(
one
));
EXPECT
(
t
.
get_stream
(
onep1
)
!=
t
.
get_stream
(
onep2
));
EXPECT
(
t
.
has_stream
(
binary
));
EXPECT
(
get_wait_for
(
binary
)
==
get_wait_for
(
t
.
get_stream
(
binary
),
{
t
.
get_stream
(
onep1
),
t
.
get_stream
(
onep2
)}));
EXPECT
(
check_conflicts
(
p
,
onep1
,
onep2
));
}
TEST_CASE
(
zero_merge1
)
TEST_CASE
(
zero_merge1
)
{
{
schedule_target
t
{};
schedule_target
t
{};
...
...
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