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
0fcf61e0
Commit
0fcf61e0
authored
Jun 28, 2019
by
Paul
Browse files
Merge branch 'develop' into tf-transpose
parents
caf02990
ebb7ef8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
0 deletions
+44
-0
src/tf/tf.cpp
src/tf/tf.cpp
+2
-0
test/tf/sub_test.pb
test/tf/sub_test.pb
+12
-0
test/tf/tanh_test.pb
test/tf/tanh_test.pb
+8
-0
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+22
-0
No files found.
src/tf/tf.cpp
View file @
0fcf61e0
...
@@ -153,9 +153,11 @@ struct tf_parser
...
@@ -153,9 +153,11 @@ struct tf_parser
add_generic_op
(
"Identity"
,
op
::
identity
{});
add_generic_op
(
"Identity"
,
op
::
identity
{});
add_generic_op
(
"Relu"
,
op
::
relu
{});
add_generic_op
(
"Relu"
,
op
::
relu
{});
add_generic_op
(
"Relu6"
,
op
::
clip
{
6.0
,
0.0
});
add_generic_op
(
"Relu6"
,
op
::
clip
{
6.0
,
0.0
});
add_generic_op
(
"Tanh"
,
op
::
tanh
{});
add_binary_op
(
"Add"
,
op
::
add
{});
add_binary_op
(
"Add"
,
op
::
add
{});
add_binary_op
(
"Mul"
,
op
::
mul
{});
add_binary_op
(
"Mul"
,
op
::
mul
{});
add_binary_op
(
"Sub"
,
op
::
sub
{});
add_mem_op
(
"AvgPool"
,
&
tf_parser
::
parse_pooling
);
add_mem_op
(
"AvgPool"
,
&
tf_parser
::
parse_pooling
);
add_mem_op
(
"BiasAdd"
,
&
tf_parser
::
parse_biasadd
);
add_mem_op
(
"BiasAdd"
,
&
tf_parser
::
parse_biasadd
);
...
...
test/tf/sub_test.pb
0 → 100644
View file @
0fcf61e0
:
0Placeholder*
shape:*
dtype0
:
1Placeholder*
shape:*
dtype0
sub1Sub01*
T0"
\ No newline at end of file
test/tf/tanh_test.pb
0 → 100644
View file @
0fcf61e0
:
0Placeholder*
dtype0*
shape:
tanhTanh0*
T0"
\ No newline at end of file
test/tf/tf_test.cpp
View file @
0fcf61e0
...
@@ -367,4 +367,26 @@ TEST_CASE(stridedslice_test)
...
@@ -367,4 +367,26 @@ TEST_CASE(stridedslice_test)
EXPECT
(
p
==
prog
);
EXPECT
(
p
==
prog
);
}
}
TEST_CASE
(
sub_test
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
2
,
3
}});
auto
l1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
2
,
3
}});
p
.
add_instruction
(
migraphx
::
op
::
sub
{},
l0
,
l1
);
auto
prog
=
migraphx
::
parse_tf
(
"sub_test.pb"
,
false
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
tanh_test
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
2
,
3
}});
auto
l1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
2
,
2
,
3
}});
p
.
add_instruction
(
migraphx
::
op
::
sub
{},
l0
,
l1
);
auto
prog
=
migraphx
::
parse_tf
(
"sub_test.pb"
,
false
);
EXPECT
(
p
==
prog
);
}
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