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
Commit
381b2d9e
authored
Dec 02, 2023
by
Umang Yadav
Browse files
add half tests
parent
379692fc
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
19 additions
and
41 deletions
+19
-41
test/verify/gemm_multi_3args_alpha0.cpp
test/verify/gemm_multi_3args_alpha0.cpp
+1
-0
test/verify/gemm_multi_3args_beta0.cpp
test/verify/gemm_multi_3args_beta0.cpp
+1
-0
test/verify/gemm_multi_3args_c25.cpp
test/verify/gemm_multi_3args_c25.cpp
+1
-0
test/verify/gemm_multi_dim_2.cpp
test/verify/gemm_multi_dim_2.cpp
+1
-0
test/verify/gemm_multi_dim_2_3.cpp
test/verify/gemm_multi_dim_2_3.cpp
+1
-0
test/verify/gemm_multi_transpose.cpp
test/verify/gemm_multi_transpose.cpp
+1
-0
test/verify/test_gemm.cpp
test/verify/test_gemm.cpp
+1
-0
test/verify/test_gemm_copy.cpp
test/verify/test_gemm_copy.cpp
+1
-0
test/verify/test_gemm_ex.cpp
test/verify/test_gemm_ex.cpp
+1
-0
test/verify/test_gemm_half.cpp
test/verify/test_gemm_half.cpp
+0
-41
test/verify/test_gemm_transposea.cpp
test/verify/test_gemm_transposea.cpp
+1
-0
test/verify/test_gemm_transposea_ex.cpp
test/verify/test_gemm_transposea_ex.cpp
+1
-0
test/verify/test_gemm_transposeab.cpp
test/verify/test_gemm_transposeab.cpp
+1
-0
test/verify/test_gemm_transposeb.cpp
test/verify/test_gemm_transposeb.cpp
+1
-0
test/verify/test_gemm_transposeb_ex.cpp
test/verify/test_gemm_transposeb_ex.cpp
+1
-0
test/verify/test_mul_dot_a.cpp
test/verify/test_mul_dot_a.cpp
+1
-0
test/verify/test_mul_dot_b.cpp
test/verify/test_mul_dot_b.cpp
+2
-0
test/verify/test_unbatched_gemm_1.cpp
test/verify/test_unbatched_gemm_1.cpp
+1
-0
test/verify/test_unbatched_gemm_2.cpp
test/verify/test_unbatched_gemm_2.cpp
+1
-0
No files found.
test/verify/gemm_multi_3args_alpha0.cpp
View file @
381b2d9e
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args_alpha0 : verify_program<gemm_multi_3args_alpha0<DType>>
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args_alpha0 : verify_program<gemm_multi_3args_alpha0<DType>>
};
};
template
struct
gemm_multi_3args_alpha0
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args_alpha0
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args_alpha0
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_3args_alpha0
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
gemm_multi_3args_alpha0
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_multi_3args_beta0.cpp
View file @
381b2d9e
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args_beta0 : verify_program<gemm_multi_3args_beta0<DType>>
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args_beta0 : verify_program<gemm_multi_3args_beta0<DType>>
};
};
template
struct
gemm_multi_3args_beta0
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args_beta0
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args_beta0
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_3args_beta0
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
gemm_multi_3args_beta0
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_multi_3args_c25.cpp
View file @
381b2d9e
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args_c25 : verify_program<gemm_multi_3args_c25<DType>>
...
@@ -50,4 +50,5 @@ struct gemm_multi_3args_c25 : verify_program<gemm_multi_3args_c25<DType>>
};
};
template
struct
gemm_multi_3args_c25
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args_c25
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_3args_c25
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_3args_c25
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
gemm_multi_3args_c25
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_multi_dim_2.cpp
View file @
381b2d9e
...
@@ -46,4 +46,5 @@ struct gemm_multi_dim_2 : verify_program<gemm_multi_dim_2<DType>>
...
@@ -46,4 +46,5 @@ struct gemm_multi_dim_2 : verify_program<gemm_multi_dim_2<DType>>
};
};
template
struct
gemm_multi_dim_2
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_dim_2
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_dim_2
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_dim_2
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
gemm_multi_dim_2
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_multi_dim_2_3.cpp
View file @
381b2d9e
...
@@ -46,4 +46,5 @@ struct gemm_multi_dim_2_3 : verify_program<gemm_multi_dim_2_3<DType>>
...
@@ -46,4 +46,5 @@ struct gemm_multi_dim_2_3 : verify_program<gemm_multi_dim_2_3<DType>>
};
};
template
struct
gemm_multi_dim_2_3
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_dim_2_3
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_dim_2_3
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_dim_2_3
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
gemm_multi_dim_2_3
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/gemm_multi_transpose.cpp
View file @
381b2d9e
...
@@ -50,4 +50,5 @@ struct gemm_multi_transpose : verify_program<gemm_multi_transpose<DType>>
...
@@ -50,4 +50,5 @@ struct gemm_multi_transpose : verify_program<gemm_multi_transpose<DType>>
};
};
template
struct
gemm_multi_transpose
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_transpose
<
migraphx
::
shape
::
float_type
>;
template
struct
gemm_multi_transpose
<
migraphx
::
shape
::
half_type
>;
template
struct
gemm_multi_transpose
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
gemm_multi_transpose
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm.cpp
View file @
381b2d9e
...
@@ -41,4 +41,5 @@ struct test_gemm : verify_program<test_gemm<DType>>
...
@@ -41,4 +41,5 @@ struct test_gemm : verify_program<test_gemm<DType>>
};
};
template
struct
test_gemm
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_copy.cpp
View file @
381b2d9e
...
@@ -49,4 +49,5 @@ struct test_gemm_copy : verify_program<test_gemm_copy<DType>>
...
@@ -49,4 +49,5 @@ struct test_gemm_copy : verify_program<test_gemm_copy<DType>>
};
};
template
struct
test_gemm_copy
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_copy
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_copy
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_copy
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_copy
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_ex.cpp
View file @
381b2d9e
...
@@ -41,4 +41,5 @@ struct test_gemm_ex : verify_program<test_gemm_ex<DType>>
...
@@ -41,4 +41,5 @@ struct test_gemm_ex : verify_program<test_gemm_ex<DType>>
}
}
};
};
template
struct
test_gemm_ex
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_ex
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_ex
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_ex
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_ex
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_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>
struct
test_gemm_half
:
verify_program
<
test_gemm_half
>
{
migraphx
::
program
create_program
()
const
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
a
=
mm
->
add_parameter
(
"a"
,
migraphx
::
shape
{
migraphx
::
shape
::
half_type
,
{
4
,
5
}});
auto
b
=
mm
->
add_parameter
(
"b"
,
migraphx
::
shape
{
migraphx
::
shape
::
half_type
,
{
5
,
3
}});
mm
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
a
,
b
);
return
p
;
}
};
test/verify/test_gemm_transposea.cpp
View file @
381b2d9e
...
@@ -43,4 +43,5 @@ struct test_gemm_transposea : verify_program<test_gemm_transposea<DType>>
...
@@ -43,4 +43,5 @@ struct test_gemm_transposea : verify_program<test_gemm_transposea<DType>>
};
};
template
struct
test_gemm_transposea
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposea
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposea
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_transposea
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_transposea
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_transposea_ex.cpp
View file @
381b2d9e
...
@@ -44,4 +44,5 @@ struct test_gemm_transposea_ex : verify_program<test_gemm_transposea_ex<DType>>
...
@@ -44,4 +44,5 @@ struct test_gemm_transposea_ex : verify_program<test_gemm_transposea_ex<DType>>
};
};
template
struct
test_gemm_transposea_ex
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposea_ex
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposea_ex
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_transposea_ex
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_transposea_ex
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_transposeab.cpp
View file @
381b2d9e
...
@@ -44,4 +44,5 @@ struct test_gemm_transposeab : verify_program<test_gemm_transposeab<DType>>
...
@@ -44,4 +44,5 @@ struct test_gemm_transposeab : verify_program<test_gemm_transposeab<DType>>
};
};
template
struct
test_gemm_transposeab
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposeab
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposeab
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_transposeab
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_transposeab
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_transposeb.cpp
View file @
381b2d9e
...
@@ -43,4 +43,5 @@ struct test_gemm_transposeb : verify_program<test_gemm_transposeb<DType>>
...
@@ -43,4 +43,5 @@ struct test_gemm_transposeb : verify_program<test_gemm_transposeb<DType>>
};
};
template
struct
test_gemm_transposeb
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposeb
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposeb
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_transposeb
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_transposeb
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_gemm_transposeb_ex.cpp
View file @
381b2d9e
...
@@ -44,4 +44,5 @@ struct test_gemm_transposeb_ex : verify_program<test_gemm_transposeb_ex<DType>>
...
@@ -44,4 +44,5 @@ struct test_gemm_transposeb_ex : verify_program<test_gemm_transposeb_ex<DType>>
};
};
template
struct
test_gemm_transposeb_ex
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposeb_ex
<
migraphx
::
shape
::
float_type
>;
template
struct
test_gemm_transposeb_ex
<
migraphx
::
shape
::
half_type
>;
template
struct
test_gemm_transposeb_ex
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_gemm_transposeb_ex
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_mul_dot_a.cpp
View file @
381b2d9e
...
@@ -49,4 +49,5 @@ struct test_mul_dot_a : verify_program<test_mul_dot_a<DType>>
...
@@ -49,4 +49,5 @@ struct test_mul_dot_a : verify_program<test_mul_dot_a<DType>>
};
};
template
struct
test_mul_dot_a
<
migraphx
::
shape
::
float_type
>;
template
struct
test_mul_dot_a
<
migraphx
::
shape
::
float_type
>;
template
struct
test_mul_dot_a
<
migraphx
::
shape
::
half_type
>;
template
struct
test_mul_dot_a
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_mul_dot_a
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_mul_dot_b.cpp
View file @
381b2d9e
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
template
<
migraphx
::
shape
::
type_t
DType
>
template
<
migraphx
::
shape
::
type_t
DType
>
struct
test_mul_dot_b
:
verify_program
<
test_mul_dot_b
<
DType
>>
struct
test_mul_dot_b
:
verify_program
<
test_mul_dot_b
<
DType
>>
{
{
migraphx
::
program
create_program
()
const
migraphx
::
program
create_program
()
const
{
{
...
@@ -49,4 +50,5 @@ struct test_mul_dot_b : verify_program<test_mul_dot_b<DType>>
...
@@ -49,4 +50,5 @@ struct test_mul_dot_b : verify_program<test_mul_dot_b<DType>>
};
};
template
struct
test_mul_dot_b
<
migraphx
::
shape
::
float_type
>;
template
struct
test_mul_dot_b
<
migraphx
::
shape
::
float_type
>;
template
struct
test_mul_dot_b
<
migraphx
::
shape
::
half_type
>;
template
struct
test_mul_dot_b
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_mul_dot_b
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_unbatched_gemm_1.cpp
View file @
381b2d9e
...
@@ -60,4 +60,5 @@ struct test_unbatched_gemm_1 : verify_program<test_unbatched_gemm_1<DType>>
...
@@ -60,4 +60,5 @@ struct test_unbatched_gemm_1 : verify_program<test_unbatched_gemm_1<DType>>
};
};
template
struct
test_unbatched_gemm_1
<
migraphx
::
shape
::
float_type
>;
template
struct
test_unbatched_gemm_1
<
migraphx
::
shape
::
float_type
>;
template
struct
test_unbatched_gemm_1
<
migraphx
::
shape
::
half_type
>;
template
struct
test_unbatched_gemm_1
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_unbatched_gemm_1
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
test/verify/test_unbatched_gemm_2.cpp
View file @
381b2d9e
...
@@ -48,4 +48,5 @@ struct test_unbatched_gemm_2 : verify_program<test_unbatched_gemm_2<DType>>
...
@@ -48,4 +48,5 @@ struct test_unbatched_gemm_2 : verify_program<test_unbatched_gemm_2<DType>>
};
};
template
struct
test_unbatched_gemm_2
<
migraphx
::
shape
::
float_type
>;
template
struct
test_unbatched_gemm_2
<
migraphx
::
shape
::
float_type
>;
template
struct
test_unbatched_gemm_2
<
migraphx
::
shape
::
half_type
>;
template
struct
test_unbatched_gemm_2
<
migraphx
::
shape
::
fp8e4m3fnuz_type
>;
template
struct
test_unbatched_gemm_2
<
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