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
7a80a7b5
Commit
7a80a7b5
authored
Feb 07, 2019
by
Shucai Xiao
Browse files
fix code format
parent
977f032b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+6
-6
src/rewrite_rnn.cpp
src/rewrite_rnn.cpp
+0
-6
No files found.
src/onnx/onnx.cpp
View file @
7a80a7b5
...
...
@@ -789,11 +789,11 @@ struct onnx_parser
if
(
contains
(
attributes
,
"hidden_size"
))
{
hidden_size
=
parse_value
(
attributes
.
at
(
"hidden_size"
)).
at
<
int
>
();
}
else
{
MIGRAPHX_THROW
(
"GRU: hidden size attribute missing"
);
std
::
size_t
hidden_size
_att
=
parse_value
(
attributes
.
at
(
"hidden_size"
)).
at
<
int
>
();
if
(
hidden_size
!=
hidden_size_att
)
{
MIGRAPHX_THROW
(
"GRU: hidden size mismatch in input and attribute"
);
}
}
// Handling of direction to be added later
...
...
@@ -861,7 +861,7 @@ struct onnx_parser
for_each
(
vec_names
.
begin
(),
vec_names
.
end
(),
[
&
](
auto
&
name
)
{
if
(
map_actv_funcs
.
count
(
name
)
==
0
)
{
MIGRAPHX_THROW
(
"GRU: activation function "
+
name
+
" not supported"
);
MIGRAPHX_THROW
(
"GRU: activation function "
+
std
::
string
(
name
)
+
" not supported"
);
}
});
...
...
src/rewrite_rnn.cpp
View file @
7a80a7b5
...
...
@@ -22,8 +22,6 @@ void rewrite_rnn::apply(program& prog) const
apply_gru
(
prog
,
ins
);
}
}
return
;
}
void
rewrite_rnn
::
apply_vallina_rnn
(
program
&
prog
,
instruction_ref
ins
)
const
...
...
@@ -183,8 +181,6 @@ void rewrite_rnn::apply_vallina_rnn(program& prog, instruction_ref ins) const
last_output_it
++
;
}
}
return
;
}
std
::
vector
<
instruction_ref
>
rewrite_rnn
::
rnn_cell
(
bool
is_forward
,
...
...
@@ -465,8 +461,6 @@ void rewrite_rnn::apply_gru(program& prog, instruction_ref ins) const
last_output_it
++
;
}
}
return
;
}
std
::
vector
<
instruction_ref
>
rewrite_rnn
::
gru_cell
(
bool
is_forward
,
...
...
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