"sgl-router/src/protocols/vscode:/vscode.git/clone" did not exist on "ce67b2d586868e0aec28c718bd733fa8678b2779"
Commit c6f80ac7 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 18fc2362
...@@ -521,7 +521,8 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward, ...@@ -521,7 +521,8 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
auto rb_zr = prog.insert_instruction(ins, op::slice{{0}, {3 * hs}, {5 * hs}}, sbias); auto rb_zr = prog.insert_instruction(ins, op::slice{{0}, {3 * hs}, {5 * hs}}, sbias);
auto rb_h = prog.insert_instruction(ins, op::slice{{0}, {5 * hs}, {6 * hs}}, sbias); auto rb_h = prog.insert_instruction(ins, op::slice{{0}, {5 * hs}, {6 * hs}}, sbias);
brb_zr = prog.insert_instruction(ins, op::broadcast{1, {bs, static_cast<size_t>(2 * hs)}}, rb_zr); brb_zr = prog.insert_instruction(
ins, op::broadcast{1, {bs, static_cast<size_t>(2 * hs)}}, rb_zr);
brb_h = prog.insert_instruction(ins, op::broadcast{1, {bs, static_cast<size_t>(hs)}}, rb_h); brb_h = prog.insert_instruction(ins, op::broadcast{1, {bs, static_cast<size_t>(hs)}}, rb_h);
} }
...@@ -562,7 +563,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward, ...@@ -562,7 +563,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
{ {
// equation g(Xt*(Wh^T) + (rt (.) Ht-1)*(Rh^T) + Rbh + Wbh) // equation g(Xt*(Wh^T) + (rt (.) Ht-1)*(Rh^T) + Rbh + Wbh)
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())
{ {
hr_h = prog.insert_instruction(ins, op::dot{}, rt_ht1, trh, brb_h); hr_h = prog.insert_instruction(ins, op::dot{}, rt_ht1, trh, brb_h);
} }
...@@ -575,7 +576,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward, ...@@ -575,7 +576,7 @@ std::vector<instruction_ref> rewrite_rnn::gru_cell(bool is_forward,
{ {
// equation ht = g(Xt*(Wh^T) + (rt (.) (Ht-1*(Rh^T) + Rbh)) + Wbh) // equation ht = g(Xt*(Wh^T) + (rt (.) (Ht-1*(Rh^T) + Rbh)) + Wbh)
instruction_ref ht1_rh{}; instruction_ref ht1_rh{};
if (bias != prog.end()) if(bias != prog.end())
{ {
ht1_rh = prog.insert_instruction(ins, op::dot{}, sih, trh, brb_h); ht1_rh = prog.insert_instruction(ins, op::dot{}, sih, trh, brb_h);
} }
......
...@@ -2650,7 +2650,8 @@ struct test_lstm_forward_last : verify_program<test_lstm_forward_last> ...@@ -2650,7 +2650,8 @@ struct test_lstm_forward_last : verify_program<test_lstm_forward_last>
auto und = p.add_instruction(migraphx::op::undefined{}); auto und = p.add_instruction(migraphx::op::undefined{});
auto output = p.add_instruction( auto output = p.add_instruction(
migraphx::op::lstm{hidden_size, migraphx::op::lstm{
hidden_size,
{migraphx::op::sigmoid{}, migraphx::op::tanh{}, migraphx::op::tanh{}}, {migraphx::op::sigmoid{}, migraphx::op::tanh{}, migraphx::op::tanh{}},
migraphx::op::rnn_direction::forward, migraphx::op::rnn_direction::forward,
clip}, clip},
......
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