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
de1d1056
Commit
de1d1056
authored
Mar 03, 2019
by
Paul
Browse files
Add single entry test
parent
1f819bf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
test/schedule_test.cpp
test/schedule_test.cpp
+16
-1
No files found.
test/schedule_test.cpp
View file @
de1d1056
...
@@ -136,7 +136,22 @@ std::vector<std::size_t> get_wait_for(migraphx::instruction_ref ins)
...
@@ -136,7 +136,22 @@ std::vector<std::size_t> get_wait_for(migraphx::instruction_ref ins)
return
wf
;
return
wf
;
}
}
TEST_CASE
(
test1
)
TEST_CASE
(
single_entry
)
{
instruction_map
stream
;
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
(
binary_op
{},
onep1
,
onep2
);
p
.
compile
(
schedule_target
{
&
stream
});
EXPECT
(
stream
.
at
(
onep1
)
!=
stream
.
at
(
onep2
));
EXPECT
(
stream
.
at
(
binary
)
==
0
);
EXPECT
(
get_wait_for
(
binary
)
==
get_wait_for
(
stream
[
binary
],
{
stream
[
onep1
],
stream
[
onep2
]}));
EXPECT
(
check_conflicts
(
p
,
onep1
,
onep2
));
}
TEST_CASE
(
double_entry
)
{
{
instruction_map
stream
;
instruction_map
stream
;
migraphx
::
program
p
;
migraphx
::
program
p
;
...
...
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