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
04efdb44
Commit
04efdb44
authored
Nov 28, 2023
by
Umang Yadav
Browse files
add test for conv_bn with 1e-1f
parent
67a5ba86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
test/verify/test_conv_bn.cpp
test/verify/test_conv_bn.cpp
+10
-6
No files found.
test/verify/test_conv_bn.cpp
View file @
04efdb44
...
@@ -43,12 +43,11 @@ struct test_conv_bn : verify_program<test_conv_bn<DType>>
...
@@ -43,12 +43,11 @@ struct test_conv_bn : verify_program<test_conv_bn<DType>>
auto
x
=
mm
->
add_parameter
(
"x"
,
xs
);
auto
x
=
mm
->
add_parameter
(
"x"
,
xs
);
auto
w
=
mm
->
add_parameter
(
"w"
,
ws
);
auto
w
=
mm
->
add_parameter
(
"w"
,
ws
);
// non-symmetrical tiling
// non-symmetrical tiling
// auto conv = mm->add_instruction(
auto
conv
=
mm
->
add_instruction
(
// migraphx::make_op("convolution",
migraphx
::
make_op
(
"convolution"
,
// {{"padding", {3, 3}}, {"stride", {2, 2}}, {"dilation", {1, 1}}}),
{{
"padding"
,
{
3
,
3
}},
{
"stride"
,
{
2
,
2
}},
{
"dilation"
,
{
1
,
1
}}}),
// x,
x
,
// w);
w
);
auto
conv
=
mm
->
add_parameter
(
"conv"
,
migraphx
::
shape
{
DType
,
{
1
,
64
,
112
,
112
}});
auto
scale
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
1
)));
auto
scale
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
1
)));
auto
bias
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
2
)));
auto
bias
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
2
)));
...
@@ -56,7 +55,12 @@ struct test_conv_bn : verify_program<test_conv_bn<DType>>
...
@@ -56,7 +55,12 @@ struct test_conv_bn : verify_program<test_conv_bn<DType>>
auto
variance
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
4
)));
auto
variance
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
vars
,
4
)));
auto
rt
=
mm
->
add_literal
(
migraphx
::
literal
{
DType
,
{
0.5
}});
auto
rt
=
mm
->
add_literal
(
migraphx
::
literal
{
DType
,
{
0.5
}});
auto
eps
=
mm
->
add_literal
(
migraphx
::
literal
{
DType
,
{
1e-5
f
}});
auto
eps
=
mm
->
add_literal
(
migraphx
::
literal
{
DType
,
{
1e-5
f
}});
if
constexpr
((
DType
)
==
migraphx
::
shape
::
fp8e4m3fnuz_type
)
{
eps
=
mm
->
add_literal
(
migraphx
::
literal
{
DType
,
{
1e-1
f
}});
}
auto
usq_scale
=
auto
usq_scale
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"unsqueeze"
,
{{
"axes"
,
{
1
,
2
}}}),
scale
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"unsqueeze"
,
{{
"axes"
,
{
1
,
2
}}}),
scale
);
...
...
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