Commit 7a80a7b5 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

fix code format

parent 977f032b
...@@ -789,11 +789,11 @@ struct onnx_parser ...@@ -789,11 +789,11 @@ struct onnx_parser
if(contains(attributes, "hidden_size")) if(contains(attributes, "hidden_size"))
{ {
hidden_size = parse_value(attributes.at("hidden_size")).at<int>(); std::size_t hidden_size_att = parse_value(attributes.at("hidden_size")).at<int>();
} if (hidden_size != hidden_size_att)
else {
{ MIGRAPHX_THROW("GRU: hidden size mismatch in input and attribute");
MIGRAPHX_THROW("GRU: hidden size attribute missing"); }
} }
// Handling of direction to be added later // Handling of direction to be added later
...@@ -861,7 +861,7 @@ struct onnx_parser ...@@ -861,7 +861,7 @@ struct onnx_parser
for_each(vec_names.begin(), vec_names.end(), [&](auto& name) { for_each(vec_names.begin(), vec_names.end(), [&](auto& name) {
if(map_actv_funcs.count(name) == 0) 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");
} }
}); });
......
...@@ -22,8 +22,6 @@ void rewrite_rnn::apply(program& prog) const ...@@ -22,8 +22,6 @@ void rewrite_rnn::apply(program& prog) const
apply_gru(prog, ins); apply_gru(prog, ins);
} }
} }
return;
} }
void rewrite_rnn::apply_vallina_rnn(program& prog, instruction_ref ins) const 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 ...@@ -183,8 +181,6 @@ void rewrite_rnn::apply_vallina_rnn(program& prog, instruction_ref ins) const
last_output_it++; last_output_it++;
} }
} }
return;
} }
std::vector<instruction_ref> rewrite_rnn::rnn_cell(bool is_forward, 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 ...@@ -465,8 +461,6 @@ void rewrite_rnn::apply_gru(program& prog, instruction_ref ins) const
last_output_it++; last_output_it++;
} }
} }
return;
} }
std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward, std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment