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
4d0c7238
Commit
4d0c7238
authored
Feb 03, 2019
by
Shucai Xiao
Browse files
Merge branch 'rnn_operator' into reshape_tests
parents
4fc35cf8
55f8e435
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+1
-4
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+3
-0
No files found.
src/onnx/onnx.cpp
View file @
4d0c7238
...
...
@@ -771,17 +771,14 @@ struct onnx_parser
args
.
insert
(
args
.
end
(),
(
6
-
args
.
size
()),
ins
);
}
std
::
vector
<
instruction_ref
>
result
;
// first output for the concatenation of hidden states
auto
hidden_states
=
prog
.
add_instruction
(
op
::
rnn
{
hidden_size
,
vec_actv_funcs
,
dirct
,
clip
},
std
::
move
(
args
));
result
.
push_back
(
hidden_states
);
// second output for the last hidden state
auto
last_output
=
prog
.
add_instruction
(
op
::
rnn_last_output
{},
hidden_states
);
result
.
push_back
(
last_output
);
return
result
;
return
{
hidden_states
,
last_output
}
;
}
void
parse_from
(
std
::
istream
&
is
)
...
...
test/gpu/miopen.cpp
View file @
4d0c7238
...
...
@@ -1452,6 +1452,8 @@ struct test_rnn_bi_3args
migraphx
::
shape
in_shape
{
migraphx
::
shape
::
float_type
,
{
seq_len
,
batch_size
,
input_size
}};
migraphx
::
shape
w_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
hidden_size
,
input_size
}};
migraphx
::
shape
r_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
hidden_size
,
hidden_size
}};
migraphx
::
shape
b_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
2
*
hidden_size
}};
migraphx
::
shape
ih_shape
{
migraphx
::
shape
::
float_type
,
{
num_dirct
,
batch_size
,
hidden_size
}};
auto
seq
=
p
.
add_parameter
(
"seq"
,
in_shape
);
auto
w
=
p
.
add_parameter
(
"w"
,
w_shape
);
...
...
@@ -1540,4 +1542,5 @@ int main()
verify_program
<
test_rnn_5args
>
();
verify_program
<
test_rnn_bidirectional
>
();
verify_program
<
test_rnn_bidirectional10
>
();
// verify_program<test_rnn_bi_3args>();
}
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