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
467649aa
"test/vscode:/vscode.git/clone" did not exist on "508bc1dc8d7cff5c1383068d6601ff669f69111d"
Commit
467649aa
authored
Jan 24, 2019
by
Shucai Xiao
Browse files
fix a bug in gru pass.
parent
4c59b8fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/rewrite_gru.cpp
src/rewrite_gru.cpp
+4
-4
No files found.
src/rewrite_gru.cpp
View file @
467649aa
...
@@ -276,18 +276,18 @@ std::vector<instruction_ref> rewrite_gru::gru_oper(bool is_forward,
...
@@ -276,18 +276,18 @@ std::vector<instruction_ref> rewrite_gru::gru_oper(bool is_forward,
auto
z1tht
=
prog
.
insert_instruction
(
ins
,
op
::
mul
{},
z1t
,
ht
);
auto
z1tht
=
prog
.
insert_instruction
(
ins
,
op
::
mul
{},
z1t
,
ht
);
auto
ztht1
=
prog
.
insert_instruction
(
ins
,
op
::
mul
{},
zt
,
ih
);
auto
ztht1
=
prog
.
insert_instruction
(
ins
,
op
::
mul
{},
zt
,
ih
);
ih
=
prog
.
insert_instruction
(
ins
,
op
::
add
{},
z1tht
,
ztht1
);
ih
=
prog
.
insert_instruction
(
ins
,
op
::
add
{},
z1tht
,
ztht1
);
final_out
=
ih
;
final_out
=
prog
.
insert_instruction
(
ins
,
op
::
unsqueeze
{{
0
}},
ih
)
;
if
(
is_forward
)
if
(
is_forward
)
{
{
hidden_out
=
hidden_out
=
(
seq_index
==
0
)
?
ih
:
prog
.
insert_instruction
(
ins
,
op
::
concat
{
0
},
hidden_out
,
ih
);
(
seq_index
==
0
)
?
final_out
:
prog
.
insert_instruction
(
ins
,
op
::
concat
{
0
},
hidden_out
,
final_out
);
}
}
else
else
{
{
hidden_out
=
(
seq_index
==
seq_len
-
1
)
hidden_out
=
(
seq_index
==
seq_len
-
1
)
?
ih
?
final_out
:
prog
.
insert_instruction
(
ins
,
op
::
concat
{
0
},
ih
,
hidden_out
);
:
prog
.
insert_instruction
(
ins
,
op
::
concat
{
0
},
final_out
,
hidden_out
);
}
}
seq_index
=
is_forward
?
(
seq_index
+
1
)
:
(
seq_index
-
1
);
seq_index
=
is_forward
?
(
seq_index
+
1
)
:
(
seq_index
-
1
);
}
}
...
...
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