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
f8a75f8a
Commit
f8a75f8a
authored
Dec 07, 2023
by
Paul
Browse files
Merge
parents
74448ed6
d00fdf6e
Changes
242
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
104 additions
and
37 deletions
+104
-37
test/verify/test_add.cpp
test/verify/test_add.cpp
+7
-2
test/verify/test_asin.cpp
test/verify/test_asin.cpp
+7
-2
test/verify/test_asinh.cpp
test/verify/test_asinh.cpp
+7
-2
test/verify/test_atan.cpp
test/verify/test_atan.cpp
+7
-2
test/verify/test_atanh.cpp
test/verify/test_atanh.cpp
+13
-5
test/verify/test_avg_pooling_1d.cpp
test/verify/test_avg_pooling_1d.cpp
+1
-1
test/verify/test_avg_pooling_3d.cpp
test/verify/test_avg_pooling_3d.cpp
+1
-1
test/verify/test_avg_pooling_3d_opt.cpp
test/verify/test_avg_pooling_3d_opt.cpp
+1
-1
test/verify/test_avg_pooling_ceil_3d.cpp
test/verify/test_avg_pooling_ceil_3d.cpp
+1
-1
test/verify/test_avg_pooling_pad.cpp
test/verify/test_avg_pooling_pad.cpp
+1
-1
test/verify/test_ceil.cpp
test/verify/test_ceil.cpp
+7
-2
test/verify/test_concat_axis_0.cpp
test/verify/test_concat_axis_0.cpp
+10
-4
test/verify/test_concat_pooling.cpp
test/verify/test_concat_pooling.cpp
+2
-1
test/verify/test_conv_bn_relu_pooling.cpp
test/verify/test_conv_bn_relu_pooling.cpp
+2
-1
test/verify/test_conv_bn_relu_pooling2.cpp
test/verify/test_conv_bn_relu_pooling2.cpp
+2
-1
test/verify/test_cos.cpp
test/verify/test_cos.cpp
+7
-2
test/verify/test_cosh.cpp
test/verify/test_cosh.cpp
+7
-2
test/verify/test_erf.cpp
test/verify/test_erf.cpp
+7
-2
test/verify/test_exp.cpp
test/verify/test_exp.cpp
+7
-2
test/verify/test_floor.cpp
test/verify/test_floor.cpp
+7
-2
No files found.
test/verify/test_add.cpp
View file @
f8a75f8a
...
@@ -27,16 +27,21 @@
...
@@ -27,16 +27,21 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_add
:
verify_program
<
test_add
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_add
:
verify_program
<
test_add
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
3
}};
migraphx
::
shape
s
{
DT
ype
,
{
8
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
y
=
mm
->
add_parameter
(
"y"
,
s
);
auto
y
=
mm
->
add_parameter
(
"y"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x
,
y
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x
,
y
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_add
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_add
<
migraphx
::
shape
::
half_type
>;
template
struct
test_add
<
migraphx
::
shape
::
float_type
>;
test/verify/test_asin.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_asin
:
verify_program
<
test_asin
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_asin
:
verify_program
<
test_asin
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
16
}};
migraphx
::
shape
s
{
DT
ype
,
{
16
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"asin"
),
x
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"asin"
),
x
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_asin
<
migraphx
::
shape
::
float_type
>;
template
struct
test_asin
<
migraphx
::
shape
::
half_type
>;
template
struct
test_asin
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_asinh.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_asinh
:
verify_program
<
test_asinh
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_asinh
:
verify_program
<
test_asinh
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
16
}};
migraphx
::
shape
s
{
DT
ype
,
{
16
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"asinh"
),
x
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"asinh"
),
x
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_asinh
<
migraphx
::
shape
::
float_type
>;
template
struct
test_asinh
<
migraphx
::
shape
::
half_type
>;
template
struct
test_asinh
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_atan.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_atan
:
verify_program
<
test_atan
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_atan
:
verify_program
<
test_atan
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
16
}};
migraphx
::
shape
s
{
DT
ype
,
{
16
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"atan"
),
x
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"atan"
),
x
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_atan
<
migraphx
::
shape
::
float_type
>;
template
struct
test_atan
<
migraphx
::
shape
::
half_type
>;
template
struct
test_atan
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_atanh.cpp
View file @
f8a75f8a
...
@@ -23,20 +23,24 @@
...
@@ -23,20 +23,24 @@
*/
*/
#include "verify_program.hpp"
#include "verify_program.hpp"
#include <migraphx/float8.hpp>
#include <migraphx/half.hpp>
#include <migraphx/program.hpp>
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_atanh
:
verify_program
<
test_atanh
>
template
<
typename
CType
>
struct
test_atanh
:
verify_program
<
test_atanh
<
CType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
16
}};
migraphx
::
shape
::
type_t
dtype
=
migraphx
::
shape
::
get_type
<
CType
>
();
migraphx
::
shape
s
{
dtype
,
{
16
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
min_val
=
mm
->
add_literal
(
-
0.95
f
);
auto
min_val
=
mm
->
add_literal
(
migraphx
::
literal
{
migraphx
::
shape
{
dtype
},
{
-
0.95
f
}}
);
auto
max_val
=
mm
->
add_literal
(
0.95
f
);
auto
max_val
=
mm
->
add_literal
(
migraphx
::
literal
{
migraphx
::
shape
{
dtype
},
{
0.95
f
}}
);
min_val
=
min_val
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
{{
"out_lens"
,
{
16
}}}),
min_val
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
{{
"out_lens"
,
{
16
}}}),
min_val
);
max_val
=
max_val
=
...
@@ -46,3 +50,7 @@ struct test_atanh : verify_program<test_atanh>
...
@@ -46,3 +50,7 @@ struct test_atanh : verify_program<test_atanh>
return
p
;
return
p
;
}
}
};
};
template
struct
test_atanh
<
float
>;
template
struct
test_atanh
<
migraphx
::
half
>;
template
struct
test_atanh
<
migraphx
::
fp8
::
fp8e4m3fnuz
>;
test/verify/test_avg_pooling_1d.cpp
View file @
f8a75f8a
...
@@ -35,7 +35,7 @@ struct test_avg_pooling_1d : verify_program<test_avg_pooling_1d>
...
@@ -35,7 +35,7 @@ struct test_avg_pooling_1d : verify_program<test_avg_pooling_1d>
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
auto
input
=
auto
input
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
5
}});
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
5
}});
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
0
},
{
1
},
{
3
}};
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
0
},
{
1
},
{
3
}
,
{
1
}
};
mm
->
add_instruction
(
op
,
input
);
mm
->
add_instruction
(
op
,
input
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_avg_pooling_3d.cpp
View file @
f8a75f8a
...
@@ -36,7 +36,7 @@ struct test_avg_pooling_3d : verify_program<test_avg_pooling_3d>
...
@@ -36,7 +36,7 @@ struct test_avg_pooling_3d : verify_program<test_avg_pooling_3d>
auto
input
=
auto
input
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
5
,
5
,
5
}});
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
5
,
5
,
5
}});
auto
op
=
migraphx
::
op
::
pooling
{
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
1
,
1
,
1
},
{
3
,
3
,
3
},
{
3
,
3
,
3
}};
migraphx
::
op
::
pooling_mode
::
average
,
{
1
,
1
,
1
},
{
3
,
3
,
3
},
{
3
,
3
,
3
}
,
{
1
,
1
,
1
}
};
mm
->
add_instruction
(
op
,
input
);
mm
->
add_instruction
(
op
,
input
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_avg_pooling_3d_opt.cpp
View file @
f8a75f8a
...
@@ -36,7 +36,7 @@ struct test_avg_pooling_3d_opt : verify_program<test_avg_pooling_3d_opt>
...
@@ -36,7 +36,7 @@ struct test_avg_pooling_3d_opt : verify_program<test_avg_pooling_3d_opt>
auto
input
=
auto
input
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4
,
2
,
3
,
3
,
3
}});
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4
,
2
,
3
,
3
,
3
}});
auto
op
=
migraphx
::
op
::
pooling
{
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
0
,
0
,
0
},
{
1
,
1
,
1
},
{
3
,
3
,
3
}};
migraphx
::
op
::
pooling_mode
::
average
,
{
0
,
0
,
0
},
{
1
,
1
,
1
},
{
3
,
3
,
3
}
,
{
1
,
1
,
1
}
};
mm
->
add_instruction
(
op
,
input
);
mm
->
add_instruction
(
op
,
input
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_avg_pooling_ceil_3d.cpp
View file @
f8a75f8a
...
@@ -37,7 +37,7 @@ struct test_avg_pooling_ceil_3d : verify_program<test_avg_pooling_ceil_3d>
...
@@ -37,7 +37,7 @@ struct test_avg_pooling_ceil_3d : verify_program<test_avg_pooling_ceil_3d>
auto
input
=
auto
input
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
5
,
5
,
5
}});
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
5
,
5
,
5
}});
auto
op
=
migraphx
::
op
::
pooling
{
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
1
,
1
,
1
},
{
3
,
3
,
3
},
{
3
,
3
,
3
},
true
};
migraphx
::
op
::
pooling_mode
::
average
,
{
1
,
1
,
1
},
{
3
,
3
,
3
},
{
3
,
3
,
3
},
{
1
,
1
,
1
},
true
};
mm
->
add_instruction
(
op
,
input
);
mm
->
add_instruction
(
op
,
input
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_avg_pooling_pad.cpp
View file @
f8a75f8a
...
@@ -36,7 +36,7 @@ struct test_avg_pooling_pad : verify_program<test_avg_pooling_pad>
...
@@ -36,7 +36,7 @@ struct test_avg_pooling_pad : verify_program<test_avg_pooling_pad>
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
auto
input
=
auto
input
=
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
7
}});
mm
->
add_parameter
(
"x"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
,
3
,
7
}});
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
2
},
{
1
},
{
3
}};
auto
op
=
migraphx
::
op
::
pooling
{
migraphx
::
op
::
pooling_mode
::
average
,
{
2
},
{
1
},
{
3
}
,
{
1
}
};
mm
->
add_instruction
(
op
,
input
);
mm
->
add_instruction
(
op
,
input
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_ceil.cpp
View file @
f8a75f8a
...
@@ -27,16 +27,21 @@
...
@@ -27,16 +27,21 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_ceil
:
verify_program
<
test_ceil
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_ceil
:
verify_program
<
test_ceil
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
double_t
ype
,
{
2
,
3
,
4
,
6
}};
migraphx
::
shape
s
{
DT
ype
,
{
2
,
3
,
4
,
6
}};
auto
param
=
mm
->
add_parameter
(
"x"
,
s
);
auto
param
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"ceil"
),
param
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"ceil"
),
param
);
return
p
;
return
p
;
};
};
};
};
template
struct
test_ceil
<
migraphx
::
shape
::
float_type
>;
template
struct
test_ceil
<
migraphx
::
shape
::
half_type
>;
template
struct
test_ceil
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_concat_axis_0.cpp
View file @
f8a75f8a
...
@@ -27,16 +27,17 @@
...
@@ -27,16 +27,17 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_concat_axis_0
:
verify_program
<
test_concat_axis_0
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_concat_axis_0
:
verify_program
<
test_concat_axis_0
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
int
axis
=
0
;
int
axis
=
0
;
migraphx
::
shape
s0
{
migraphx
::
shape
::
int32_t
ype
,
{
2
,
2
}};
migraphx
::
shape
s0
{
DT
ype
,
{
2
,
2
}};
migraphx
::
shape
s1
{
migraphx
::
shape
::
int32_t
ype
,
{
3
,
2
}};
migraphx
::
shape
s1
{
DT
ype
,
{
3
,
2
}};
migraphx
::
shape
s2
{
migraphx
::
shape
::
int32_t
ype
,
{
1
,
2
}};
migraphx
::
shape
s2
{
DT
ype
,
{
1
,
2
}};
auto
l0
=
mm
->
add_parameter
(
"x"
,
s0
);
auto
l0
=
mm
->
add_parameter
(
"x"
,
s0
);
auto
l1
=
mm
->
add_parameter
(
"y"
,
s1
);
auto
l1
=
mm
->
add_parameter
(
"y"
,
s1
);
auto
l2
=
mm
->
add_parameter
(
"z"
,
s2
);
auto
l2
=
mm
->
add_parameter
(
"z"
,
s2
);
...
@@ -44,3 +45,8 @@ struct test_concat_axis_0 : verify_program<test_concat_axis_0>
...
@@ -44,3 +45,8 @@ struct test_concat_axis_0 : verify_program<test_concat_axis_0>
return
p
;
return
p
;
}
}
};
};
template
struct
test_concat_axis_0
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_concat_axis_0
<
migraphx
::
shape
::
half_type
>;
template
struct
test_concat_axis_0
<
migraphx
::
shape
::
float_type
>;
template
struct
test_concat_axis_0
<
migraphx
::
shape
::
int32_type
>;
test/verify/test_concat_pooling.cpp
View file @
f8a75f8a
...
@@ -47,7 +47,8 @@ struct test_concat_pooling : verify_program<test_concat_pooling>
...
@@ -47,7 +47,8 @@ struct test_concat_pooling : verify_program<test_concat_pooling>
{{
"mode"
,
migraphx
::
op
::
pooling_mode
::
average
},
{{
"mode"
,
migraphx
::
op
::
pooling_mode
::
average
},
{
"padding"
,
{
0
,
0
}},
{
"padding"
,
{
0
,
0
}},
{
"stride"
,
{
1
,
1
}},
{
"stride"
,
{
1
,
1
}},
{
"lengths"
,
{
8
,
8
}}}),
{
"lengths"
,
{
8
,
8
}},
{
"dilations"
,
{
1
,
1
}}}),
concat_t
);
concat_t
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
pooling
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
pooling
);
return
p
;
return
p
;
...
...
test/verify/test_conv_bn_relu_pooling.cpp
View file @
f8a75f8a
...
@@ -76,7 +76,8 @@ struct test_conv_bn_relu_pooling : verify_program<test_conv_bn_relu_pooling>
...
@@ -76,7 +76,8 @@ struct test_conv_bn_relu_pooling : verify_program<test_conv_bn_relu_pooling>
{{
"mode"
,
migraphx
::
op
::
pooling_mode
::
average
},
{{
"mode"
,
migraphx
::
op
::
pooling_mode
::
average
},
{
"padding"
,
{
1
,
1
}},
{
"padding"
,
{
1
,
1
}},
{
"stride"
,
{
2
,
2
}},
{
"stride"
,
{
2
,
2
}},
{
"lengths"
,
{
3
,
3
}}}),
{
"lengths"
,
{
3
,
3
}},
{
"dilations"
,
{
1
,
1
}}}),
relu
);
relu
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_conv_bn_relu_pooling2.cpp
View file @
f8a75f8a
...
@@ -92,7 +92,8 @@ struct test_conv_bn_relu_pooling2 : verify_program<test_conv_bn_relu_pooling2>
...
@@ -92,7 +92,8 @@ struct test_conv_bn_relu_pooling2 : verify_program<test_conv_bn_relu_pooling2>
{{
"mode"
,
migraphx
::
op
::
pooling_mode
::
average
},
{{
"mode"
,
migraphx
::
op
::
pooling_mode
::
average
},
{
"padding"
,
{
1
,
1
}},
{
"padding"
,
{
1
,
1
}},
{
"stride"
,
{
2
,
2
}},
{
"stride"
,
{
2
,
2
}},
{
"lengths"
,
{
3
,
3
}}}),
{
"lengths"
,
{
3
,
3
}},
{
"dilations"
,
{
1
,
1
}}}),
relu
);
relu
);
return
p
;
return
p
;
}
}
...
...
test/verify/test_cos.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_cos
:
verify_program
<
test_cos
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_cos
:
verify_program
<
test_cos
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
8
}};
migraphx
::
shape
s
{
DT
ype
,
{
8
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"cos"
),
x
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"cos"
),
x
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_cos
<
migraphx
::
shape
::
float_type
>;
template
struct
test_cos
<
migraphx
::
shape
::
half_type
>;
template
struct
test_cos
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_cosh.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_cosh
:
verify_program
<
test_cosh
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_cosh
:
verify_program
<
test_cosh
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
16
}};
migraphx
::
shape
s
{
DT
ype
,
{
16
}};
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
auto
x
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"cosh"
),
x
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"cosh"
),
x
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_cosh
<
migraphx
::
shape
::
float_type
>;
template
struct
test_cosh
<
migraphx
::
shape
::
half_type
>;
template
struct
test_cosh
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_erf.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_erf
:
verify_program
<
test_erf
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_erf
:
verify_program
<
test_erf
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
2
,
3
,
4
,
6
}};
migraphx
::
shape
s
{
DT
ype
,
{
2
,
3
,
4
,
6
}};
auto
param
=
mm
->
add_parameter
(
"x"
,
s
);
auto
param
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"erf"
),
param
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"erf"
),
param
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_erf
<
migraphx
::
shape
::
float_type
>;
template
struct
test_erf
<
migraphx
::
shape
::
half_type
>;
template
struct
test_erf
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_exp.cpp
View file @
f8a75f8a
...
@@ -27,15 +27,20 @@
...
@@ -27,15 +27,20 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_exp
:
verify_program
<
test_exp
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_exp
:
verify_program
<
test_exp
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
6
}};
migraphx
::
shape
s
{
DT
ype
,
{
6
}};
auto
x
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"abs"
),
mm
->
add_parameter
(
"x"
,
s
));
auto
x
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"abs"
),
mm
->
add_parameter
(
"x"
,
s
));
mm
->
add_instruction
(
migraphx
::
make_op
(
"exp"
),
x
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"exp"
),
x
);
return
p
;
return
p
;
}
}
};
};
template
struct
test_exp
<
migraphx
::
shape
::
float_type
>;
template
struct
test_exp
<
migraphx
::
shape
::
half_type
>;
template
struct
test_exp
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_floor.cpp
View file @
f8a75f8a
...
@@ -27,16 +27,21 @@
...
@@ -27,16 +27,21 @@
#include <migraphx/generate.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/make_op.hpp>
struct
test_floor
:
verify_program
<
test_floor
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_floor
:
verify_program
<
test_floor
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
s
{
migraphx
::
shape
::
float_t
ype
,
{
2
,
3
,
4
,
6
}};
migraphx
::
shape
s
{
DT
ype
,
{
2
,
3
,
4
,
6
}};
auto
param
=
mm
->
add_parameter
(
"x"
,
s
);
auto
param
=
mm
->
add_parameter
(
"x"
,
s
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"floor"
),
param
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"floor"
),
param
);
return
p
;
return
p
;
};
};
};
};
template
struct
test_floor
<
migraphx
::
shape
::
float_type
>;
template
struct
test_floor
<
migraphx
::
shape
::
half_type
>;
template
struct
test_floor
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
Prev
1
…
6
7
8
9
10
11
12
13
Next
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