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
82349b7d
Commit
82349b7d
authored
Feb 07, 2019
by
Shucai Xiao
Browse files
changed some comments.
parent
d4aa7d46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/rewrite_rnn.cpp
src/rewrite_rnn.cpp
+5
-4
No files found.
src/rewrite_rnn.cpp
View file @
82349b7d
...
@@ -29,7 +29,7 @@ void rewrite_rnn::apply_vanilla_rnn(program& prog, instruction_ref ins) const
...
@@ -29,7 +29,7 @@ void rewrite_rnn::apply_vanilla_rnn(program& prog, instruction_ref ins) const
assert
(
ins
->
name
()
==
"rnn"
);
assert
(
ins
->
name
()
==
"rnn"
);
// could be 3 to 6 inputs, but the parse_rnn function will
// could be 3 to 6 inputs, but the parse_rnn function will
// append undefined operators to make 6 arguments when parsing
// append undefined operators to make 6 arguments when parsing
// an onnx file. Another case is user can have
only 3
arguments
// an onnx file. Another case is user can have
num of
arguments
// when writing their program.
// when writing their program.
auto
args
=
ins
->
inputs
();
auto
args
=
ins
->
inputs
();
...
@@ -275,9 +275,10 @@ std::vector<instruction_ref> rewrite_rnn::vanilla_rnn_cell(bool is_forward,
...
@@ -275,9 +275,10 @@ std::vector<instruction_ref> rewrite_rnn::vanilla_rnn_cell(bool is_forward,
std
::
vector
<
operation
>
rewrite_rnn
::
vanilla_rnn_actv_funcs
(
instruction_ref
ins
)
const
std
::
vector
<
operation
>
rewrite_rnn
::
vanilla_rnn_actv_funcs
(
instruction_ref
ins
)
const
{
{
auto
rnn_op
=
any_cast
<
op
::
rnn
>
(
ins
->
get_operator
());
auto
rnn_op
=
any_cast
<
op
::
rnn
>
(
ins
->
get_operator
());
// before rewrite the rnn operator, need to ensure
// could be 3 to 6 inputs, but the parse_gru function will
// we have 2 actv funcs. If less than 2, use the
// append undefined operators to make 6 arguments when parsing
// algorithm in parse_rnn to make 2 actv functions
// an onnx file. Another case is user can have any num of arguments
// when writing their program.
if
(
rnn_op
.
direction
==
op
::
rnn
::
bidirectional
)
if
(
rnn_op
.
direction
==
op
::
rnn
::
bidirectional
)
{
{
if
(
rnn_op
.
actv_funcs
.
empty
())
if
(
rnn_op
.
actv_funcs
.
empty
())
...
...
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