Commit 4089bcb6 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent dc57c9c1
......@@ -602,12 +602,12 @@ TEST_CASE(lstm_forward)
float clip = 0.0f;
int input_forget = 1;
migraphx::shape seq_shape{migraphx::shape::float_type, {sl, bs, is}};
migraphx::shape w_shape{migraphx::shape::float_type, {nd, 4*hs, is}};
migraphx::shape r_shape{migraphx::shape::float_type, {nd, 4*hs, hs}};
migraphx::shape w_shape{migraphx::shape::float_type, {nd, 4 * hs, is}};
migraphx::shape r_shape{migraphx::shape::float_type, {nd, 4 * hs, hs}};
migraphx::shape bias_shape{migraphx::shape::float_type, {nd, 8 * hs}};
migraphx::shape sl_shape{migraphx::shape::int32_type, {bs}};
migraphx::shape ih_shape{migraphx::shape::float_type, {nd, bs, hs}};
migraphx::shape pph_shape{migraphx::shape::float_type, {nd, 3*hs}};
migraphx::shape pph_shape{migraphx::shape::float_type, {nd, 3 * hs}};
{
migraphx::program p;
auto seq = p.add_parameter("seq", seq_shape);
......@@ -619,11 +619,13 @@ TEST_CASE(lstm_forward)
auto ic = p.add_parameter("c0", ih_shape);
auto pph = p.add_parameter("pph", pph_shape);
auto out_hs =
p.add_instruction(migraphx::op::lstm{hs,
auto out_hs = p.add_instruction(
migraphx::op::lstm{
hs,
{migraphx::op::sigmoid{}, migraphx::op::tanh{}, migraphx::op::tanh{}},
migraphx::op::rnn_direction::forward,
clip, input_forget},
clip,
input_forget},
seq,
w,
r,
......@@ -650,12 +652,12 @@ TEST_CASE(lstm_reverse)
float clip = 0.0f;
int input_forget = 1;
migraphx::shape seq_shape{migraphx::shape::float_type, {sl, bs, is}};
migraphx::shape w_shape{migraphx::shape::float_type, {nd, 4*hs, is}};
migraphx::shape r_shape{migraphx::shape::float_type, {nd, 4*hs, hs}};
migraphx::shape w_shape{migraphx::shape::float_type, {nd, 4 * hs, is}};
migraphx::shape r_shape{migraphx::shape::float_type, {nd, 4 * hs, hs}};
migraphx::shape bias_shape{migraphx::shape::float_type, {nd, 8 * hs}};
migraphx::shape sl_shape{migraphx::shape::int32_type, {bs}};
migraphx::shape ih_shape{migraphx::shape::float_type, {nd, bs, hs}};
migraphx::shape pph_shape{migraphx::shape::float_type, {nd, 3*hs}};
migraphx::shape pph_shape{migraphx::shape::float_type, {nd, 3 * hs}};
{
migraphx::program p;
auto seq = p.add_parameter("seq", seq_shape);
......@@ -667,11 +669,13 @@ TEST_CASE(lstm_reverse)
auto ic = p.add_parameter("c0", ih_shape);
auto pph = p.add_parameter("pph", pph_shape);
auto out_hs =
p.add_instruction(migraphx::op::lstm{hs,
auto out_hs = p.add_instruction(
migraphx::op::lstm{
hs,
{migraphx::op::sigmoid{}, migraphx::op::tanh{}, migraphx::op::tanh{}},
migraphx::op::rnn_direction::reverse,
clip, input_forget},
clip,
input_forget},
seq,
w,
r,
......@@ -698,12 +702,12 @@ TEST_CASE(lstm_bidirectional)
float clip = 0.0f;
int input_forget = 1;
migraphx::shape seq_shape{migraphx::shape::float_type, {sl, bs, is}};
migraphx::shape w_shape{migraphx::shape::float_type, {nd, 4*hs, is}};
migraphx::shape r_shape{migraphx::shape::float_type, {nd, 4*hs, hs}};
migraphx::shape w_shape{migraphx::shape::float_type, {nd, 4 * hs, is}};
migraphx::shape r_shape{migraphx::shape::float_type, {nd, 4 * hs, hs}};
migraphx::shape bias_shape{migraphx::shape::float_type, {nd, 8 * hs}};
migraphx::shape sl_shape{migraphx::shape::int32_type, {bs}};
migraphx::shape ih_shape{migraphx::shape::float_type, {nd, bs, hs}};
migraphx::shape pph_shape{migraphx::shape::float_type, {nd, 3*hs}};
migraphx::shape pph_shape{migraphx::shape::float_type, {nd, 3 * hs}};
{
migraphx::program p;
auto seq = p.add_parameter("seq", seq_shape);
......@@ -715,11 +719,13 @@ TEST_CASE(lstm_bidirectional)
auto ic = p.add_parameter("c0", ih_shape);
auto pph = p.add_parameter("pph", pph_shape);
auto out_hs =
p.add_instruction(migraphx::op::lstm{hs,
auto out_hs = p.add_instruction(
migraphx::op::lstm{
hs,
{migraphx::op::sigmoid{}, migraphx::op::tanh{}, migraphx::op::tanh{}},
migraphx::op::rnn_direction::bidirectional,
clip, input_forget},
clip,
input_forget},
seq,
w,
r,
......
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