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
381b2d9e
"vscode:/vscode.git/clone" did not exist on "01c2f5fda9f18887865661e78ded1e61ecdb7e04"
Commit
381b2d9e
authored
Dec 02, 2023
by
Umang Yadav
Browse files
add half tests
parent
379692fc
Changes
39
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
18 additions
and
96 deletions
+18
-96
test/verify/gemm_2args_bmv.cpp
test/verify/gemm_2args_bmv.cpp
+1
-0
test/verify/gemm_2args_mm_1.cpp
test/verify/gemm_2args_mm_1.cpp
+1
-0
test/verify/gemm_2args_mm_2.cpp
test/verify/gemm_2args_mm_2.cpp
+1
-0
test/verify/gemm_2args_mm_3.cpp
test/verify/gemm_2args_mm_3.cpp
+1
-0
test/verify/gemm_2args_mm_4.cpp
test/verify/gemm_2args_mm_4.cpp
+1
-0
test/verify/gemm_2args_mm_5.cpp
test/verify/gemm_2args_mm_5.cpp
+1
-0
test/verify/gemm_2args_mm_6.cpp
test/verify/gemm_2args_mm_6.cpp
+1
-0
test/verify/gemm_2args_mm_7.cpp
test/verify/gemm_2args_mm_7.cpp
+1
-0
test/verify/gemm_2args_mm_8.cpp
test/verify/gemm_2args_mm_8.cpp
+1
-0
test/verify/gemm_2args_mv.cpp
test/verify/gemm_2args_mv.cpp
+1
-0
test/verify/gemm_2args_vbm.cpp
test/verify/gemm_2args_vbm.cpp
+1
-0
test/verify/gemm_2args_vm.cpp
test/verify/gemm_2args_vm.cpp
+1
-0
test/verify/gemm_2args_vv.cpp
test/verify/gemm_2args_vv.cpp
+1
-0
test/verify/gemm_add.cpp
test/verify/gemm_add.cpp
+1
-0
test/verify/gemm_add_broadcast1.cpp
test/verify/gemm_add_broadcast1.cpp
+1
-0
test/verify/gemm_add_broadcast2.cpp
test/verify/gemm_add_broadcast2.cpp
+1
-0
test/verify/gemm_add_broadcast_half.cpp
test/verify/gemm_add_broadcast_half.cpp
+0
-49
test/verify/gemm_add_half.cpp
test/verify/gemm_add_half.cpp
+0
-47
test/verify/gemm_literal.cpp
test/verify/gemm_literal.cpp
+1
-0
test/verify/gemm_multi_3args.cpp
test/verify/gemm_multi_3args.cpp
+1
-0
No files found.
test/verify/gemm_2args_bmv.cpp
View file @
381b2d9e
...
...
@@ -49,4 +49,5 @@ struct gemm_2args_bmv : verify_program<gemm_2args_bmv<DType>>
};
template
struct
gemm_2args_bmv
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_bmv
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_bmv
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_1.cpp
View file @
381b2d9e
...
...
@@ -48,4 +48,5 @@ struct gemm_2args_mm_1 : verify_program<gemm_2args_mm_1<DType>>
};
template
struct
gemm_2args_mm_1
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_1
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_1
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_2.cpp
View file @
381b2d9e
...
...
@@ -49,4 +49,5 @@ struct gemm_2args_mm_2 : verify_program<gemm_2args_mm_2<DType>>
};
template
struct
gemm_2args_mm_2
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_2
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_2
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_3.cpp
View file @
381b2d9e
...
...
@@ -49,4 +49,5 @@ struct gemm_2args_mm_3 : verify_program<gemm_2args_mm_3<DType>>
};
template
struct
gemm_2args_mm_3
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_3
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_3
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_4.cpp
View file @
381b2d9e
...
...
@@ -49,4 +49,5 @@ struct gemm_2args_mm_4 : verify_program<gemm_2args_mm_4<DType>>
};
template
struct
gemm_2args_mm_4
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_4
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_4
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_5.cpp
View file @
381b2d9e
...
...
@@ -48,4 +48,5 @@ struct gemm_2args_mm_5 : verify_program<gemm_2args_mm_5<DType>>
};
template
struct
gemm_2args_mm_5
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_5
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_5
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_6.cpp
View file @
381b2d9e
...
...
@@ -51,4 +51,5 @@ struct gemm_2args_mm_6 : verify_program<gemm_2args_mm_6<DType>>
};
template
struct
gemm_2args_mm_6
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_6
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_6
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_7.cpp
View file @
381b2d9e
...
...
@@ -48,4 +48,5 @@ struct gemm_2args_mm_7 : verify_program<gemm_2args_mm_7<DType>>
};
template
struct
gemm_2args_mm_7
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_7
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_7
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mm_8.cpp
View file @
381b2d9e
...
...
@@ -48,4 +48,5 @@ struct gemm_2args_mm_8 : verify_program<gemm_2args_mm_8<DType>>
};
template
struct
gemm_2args_mm_8
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mm_8
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mm_8
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_mv.cpp
View file @
381b2d9e
...
...
@@ -47,4 +47,5 @@ struct gemm_2args_mv : verify_program<gemm_2args_mv<DType>>
};
template
struct
gemm_2args_mv
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_mv
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_mv
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_vbm.cpp
View file @
381b2d9e
...
...
@@ -51,4 +51,5 @@ struct gemm_2args_vbm : verify_program<gemm_2args_vbm<DType>>
};
template
struct
gemm_2args_vbm
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_vbm
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_vbm
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_vm.cpp
View file @
381b2d9e
...
...
@@ -48,4 +48,5 @@ struct gemm_2args_vm : verify_program<gemm_2args_vm<DType>>
};
template
struct
gemm_2args_vm
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_vm
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_vm
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_2args_vv.cpp
View file @
381b2d9e
...
...
@@ -51,4 +51,5 @@ struct gemm_2args_vv : verify_program<gemm_2args_vv<DType>>
};
template
struct
gemm_2args_vv
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_2args_vv
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_2args_vv
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_add.cpp
View file @
381b2d9e
...
...
@@ -49,4 +49,5 @@ struct gemm_add : verify_program<gemm_add<DType>>
};
template
struct
gemm_add
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_add
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_add
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_add_broadcast1.cpp
View file @
381b2d9e
...
...
@@ -51,4 +51,5 @@ struct gemm_add_broadcast1 : verify_program<gemm_add_broadcast1<DType>>
};
template
struct
gemm_add_broadcast1
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_add_broadcast1
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_add_broadcast1
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_add_broadcast2.cpp
View file @
381b2d9e
...
...
@@ -51,4 +51,5 @@ struct gemm_add_broadcast2 : verify_program<gemm_add_broadcast2<DType>>
};
template
struct
gemm_add_broadcast2
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_add_broadcast2
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_add_broadcast2
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_add_broadcast_half.cpp
deleted
100644 → 0
View file @
379692fc
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "verify_program.hpp"
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/apply_alpha_beta.hpp>
struct
gemm_add_broadcast_half
:
verify_program
<
gemm_add_broadcast_half
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
m1_shape
{
migraphx
::
shape
::
half_type
,
{
1
,
2
,
3
}};
migraphx
::
shape
m2_shape
{
migraphx
::
shape
::
half_type
,
{
1
,
3
,
4
}};
migraphx
::
shape
m3_shape
{
migraphx
::
shape
::
half_type
,
{
1
,
1
,
4
}};
auto
l1
=
mm
->
add_parameter
(
"1"
,
m1_shape
);
auto
l2
=
mm
->
add_parameter
(
"2"
,
m2_shape
);
auto
l3
=
mm
->
add_parameter
(
"3"
,
m3_shape
);
auto
l3_b
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
{{
"out_lens"
,
{
1
,
2
,
4
}}}),
l3
);
auto
dot
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
l1
,
l2
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
dot
,
l3_b
);
return
p
;
}
};
test/verify/gemm_add_half.cpp
deleted
100644 → 0
View file @
379692fc
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "verify_program.hpp"
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/apply_alpha_beta.hpp>
struct
gemm_add_half
:
verify_program
<
gemm_add_half
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
m1_shape
{
migraphx
::
shape
::
half_type
,
{
1
,
2
,
3
}};
migraphx
::
shape
m2_shape
{
migraphx
::
shape
::
half_type
,
{
1
,
3
,
4
}};
migraphx
::
shape
m3_shape
{
migraphx
::
shape
::
half_type
,
{
1
,
2
,
4
}};
auto
l1
=
mm
->
add_parameter
(
"1"
,
m1_shape
);
auto
l2
=
mm
->
add_parameter
(
"2"
,
m2_shape
);
auto
l3
=
mm
->
add_parameter
(
"3"
,
m3_shape
);
auto
dot
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
l1
,
l2
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
dot
,
l3
);
return
p
;
}
};
test/verify/gemm_literal.cpp
View file @
381b2d9e
...
...
@@ -46,4 +46,5 @@ struct gemm_literal : verify_program<gemm_literal<DType>>
};
template
struct
gemm_literal
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_literal
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_literal
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_multi_3args.cpp
View file @
381b2d9e
...
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args : verify_program<gemm_multi_3args<DType>>
};
template
struct
gemm_multi_3args
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_3args
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
Prev
1
2
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