Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
2152df82
Commit
2152df82
authored
Aug 20, 2019
by
Khalique
Browse files
add assert test
parent
d00704ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
test/tf/assert_less_equal_test.pb
test/tf/assert_less_equal_test.pb
+0
-0
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+16
-0
No files found.
test/tf/assert_less_equal_test.pb
0 → 100644
View file @
2152df82
File added
test/tf/tf_test.cpp
View file @
2152df82
...
...
@@ -48,6 +48,22 @@ TEST_CASE(add_bcast_test)
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
assert_less_equal_test
)
{
migraphx
::
program
p
;
migraphx
::
shape
s0
{
migraphx
::
shape
::
float_type
,
{
2
,
3
}};
auto
l0
=
p
.
add_parameter
(
"0"
,
s0
);
auto
l1
=
p
.
add_parameter
(
"1"
,
s0
);
migraphx
::
literal
l
{
migraphx
::
shape
{
migraphx
::
shape
::
int32_type
,
{
2
}},
{
0
,
1
}};
auto
l2
=
p
.
add_literal
(
l
);
p
.
add_instruction
(
migraphx
::
op
::
add
{},
l0
,
l1
);
auto
l3
=
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
l0
,
l1
);
p
.
add_instruction
(
migraphx
::
op
::
identity
{},
l3
,
l2
);
auto
prog
=
optimize_tf
(
"assert_less_equal_test.pb"
,
false
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
batchmatmul_test
)
{
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