Commit 381b2d9e authored by Umang Yadav's avatar Umang Yadav
Browse files

add half tests

parent 379692fc
......@@ -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::half_type>;
template struct gemm_multi_3args_alpha0<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct gemm_multi_3args_beta0<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct gemm_multi_3args_c25<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct gemm_multi_dim_2<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct gemm_multi_dim_2_3<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct gemm_multi_transpose<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm_copy<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm_ex<migraphx::shape::fp8e4m3fnuz_type>;
/*
* 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;
}
};
......@@ -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::half_type>;
template struct test_gemm_transposea<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm_transposea_ex<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm_transposeab<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm_transposeb<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_gemm_transposeb_ex<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_mul_dot_a<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -29,6 +29,7 @@
template <migraphx::shape::type_t DType>
struct test_mul_dot_b : verify_program<test_mul_dot_b<DType>>
{
migraphx::program create_program() const
{
......@@ -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::half_type>;
template struct test_mul_dot_b<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_unbatched_gemm_1<migraphx::shape::fp8e4m3fnuz_type>;
......@@ -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::half_type>;
template struct test_unbatched_gemm_2<migraphx::shape::fp8e4m3fnuz_type>;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment