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
4089bcb6
"vscode:/vscode.git/clone" did not exist on "74bd6d61662fc3b43706c6f7d45899cd85697f0a"
Commit
4089bcb6
authored
Feb 16, 2019
by
Shucai Xiao
Browse files
clang format
parent
dc57c9c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
115 additions
and
109 deletions
+115
-109
test/onnx/onnx_rnn_test.cpp
test/onnx/onnx_rnn_test.cpp
+115
-109
No files found.
test/onnx/onnx_rnn_test.cpp
View file @
4089bcb6
...
...
@@ -602,12 +602,12 @@ TEST_CASE(lstm_forward)
float
clip
=
0.0
f
;
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.0
f
;
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.0
f
;
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
,
...
...
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