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
e3ac3847
Commit
e3ac3847
authored
Jun 03, 2022
by
charlie
Browse files
test multiple module dependency
parent
6e78a8cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
test/module_test.cpp
test/module_test.cpp
+13
-0
No files found.
test/module_test.cpp
View file @
e3ac3847
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include <sstream>
#include <sstream>
#include "test.hpp"
#include "test.hpp"
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/verify.hpp>
#include <basic_ops.hpp>
#include <basic_ops.hpp>
...
@@ -312,4 +313,16 @@ TEST_CASE(module_without_bypass)
...
@@ -312,4 +313,16 @@ TEST_CASE(module_without_bypass)
EXPECT
(
found
);
EXPECT
(
found
);
}
}
TEST_CASE
(
multiple_module_dependency
)
{
// Test when an instruction from a submodule depends on previous module
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
sub
=
p
.
create_module
(
"sub"
);
auto
l1
=
mm
->
add_literal
(
migraphx
::
literal
(
3
));
sub
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
{{
"out_lens"
,
{
2
,
2
,
3
}}}),
l1
);
p
.
compile
(
migraphx
::
ref
::
target
{});
p
.
eval
({});
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
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