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
2f3645db
Commit
2f3645db
authored
Mar 05, 2019
by
Khalique
Browse files
adjust add_literal() in tests
parent
a7408288
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+3
-2
No files found.
test/tf/tf_test.cpp
View file @
2f3645db
...
@@ -79,7 +79,8 @@ TEST_CASE(concat_test)
...
@@ -79,7 +79,8 @@ TEST_CASE(concat_test)
int
axis
=
1
;
int
axis
=
1
;
// tf uses axis as the third input, and it is in int32 format
// tf uses axis as the third input, and it is in int32 format
p
.
add_literal
(
axis
);
// add the literal using a vector in order to set stride to 1 (like in tf parser)
p
.
add_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
int32_type
,
{
1
}},
std
::
vector
<
int
>
{
axis
});
p
.
add_instruction
(
migraphx
::
op
::
concat
{
static_cast
<
std
::
size_t
>
(
axis
)},
l0
,
l1
);
p
.
add_instruction
(
migraphx
::
op
::
concat
{
static_cast
<
std
::
size_t
>
(
axis
)},
l0
,
l1
);
auto
prog
=
migraphx
::
parse_tf
(
"concat_test.pb"
,
false
);
auto
prog
=
migraphx
::
parse_tf
(
"concat_test.pb"
,
false
);
...
@@ -90,7 +91,7 @@ TEST_CASE(concat_test)
...
@@ -90,7 +91,7 @@ TEST_CASE(concat_test)
TEST_CASE
(
const_test
)
TEST_CASE
(
const_test
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
p
.
add_literal
(
1.0
f
);
p
.
add_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}},
std
::
vector
<
float
>
{
1.0
f
}
);
auto
prog
=
migraphx
::
parse_tf
(
"constant_test.pb"
,
false
);
auto
prog
=
migraphx
::
parse_tf
(
"constant_test.pb"
,
false
);
EXPECT
(
p
==
prog
);
EXPECT
(
p
==
prog
);
...
...
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