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
86d48b8e
Commit
86d48b8e
authored
Mar 25, 2019
by
Shucai Xiao
Browse files
clang format
parent
87697905
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
src/rewrite_rnn.cpp
src/rewrite_rnn.cpp
+18
-18
No files found.
src/rewrite_rnn.cpp
View file @
86d48b8e
...
@@ -537,7 +537,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
...
@@ -537,7 +537,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
// equation f(xt*(Wz^T) + Ht-1 * (Rz^T) + Wbz + Rbz)
// equation f(xt*(Wz^T) + Ht-1 * (Rz^T) + Wbz + Rbz)
instruction_ref
xt_wz
{};
instruction_ref
xt_wz
{};
instruction_ref
ht_rz
{};
instruction_ref
ht_rz
{};
if
(
bias
!=
prog
.
end
())
if
(
bias
!=
prog
.
end
())
{
{
xt_wz
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_wz
,
wbz
);
xt_wz
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_wz
,
wbz
);
ht_rz
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
sih
,
tran_rz
,
rbz
);
ht_rz
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
sih
,
tran_rz
,
rbz
);
...
@@ -553,7 +553,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
...
@@ -553,7 +553,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
// equation f(Xt*(Wr^T) + Ht-1*(Rr^T) + Wbr + Rbr)
// equation f(Xt*(Wr^T) + Ht-1*(Rr^T) + Wbr + Rbr)
instruction_ref
xt_wr
{};
instruction_ref
xt_wr
{};
instruction_ref
ht_rr
{};
instruction_ref
ht_rr
{};
if
(
bias
!=
prog
.
end
())
if
(
bias
!=
prog
.
end
())
{
{
xt_wr
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_wr
,
wbr
);
xt_wr
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_wr
,
wbr
);
ht_rr
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
sih
,
tran_rr
,
rbr
);
ht_rr
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
sih
,
tran_rr
,
rbr
);
...
@@ -573,7 +573,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
...
@@ -573,7 +573,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
instruction_ref
xt_wh
{};
instruction_ref
xt_wh
{};
instruction_ref
rt_rh
{};
instruction_ref
rt_rh
{};
auto
rt_ht1
=
prog
.
insert_instruction
(
ins
,
op
::
mul
{},
rt
,
sih
);
auto
rt_ht1
=
prog
.
insert_instruction
(
ins
,
op
::
mul
{},
rt
,
sih
);
if
(
bias
!=
prog
.
end
())
if
(
bias
!=
prog
.
end
())
{
{
xt_wh
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_wh
,
wbh
);
xt_wh
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
xt
,
tran_wh
,
wbh
);
rt_rh
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
rt_ht1
,
tran_rh
,
rbh
);
rt_rh
=
prog
.
insert_instruction
(
ins
,
op
::
dot
{},
rt_ht1
,
tran_rh
,
rbh
);
...
...
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