Skip to content

Commit

Permalink
Address review comments, fix formatting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
music-dino committed Oct 17, 2024
1 parent 4350be7 commit 96e12b0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 51 deletions.
2 changes: 1 addition & 1 deletion test/ref/unpack_int4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ TEST_CASE(unpack_int4_signed)
migraphx::shape s{migraphx::shape::int8_type, {2, 2}};
auto l0 = mm->add_literal(migraphx::literal{
s,
{0b1000'0111 /*-8'7*/, 0b0001'1111 /*-1'1*/, 0b1110'1001 /*-2'-7*/, 0b0101'0111 /*5'7*/}});
{0b1000'0111 /*-8'7*/, 0b0001'1111 /*1'-1*/, 0b1110'1001 /*-2'-7*/, 0b0101'0111 /*5'7*/}});
mm->add_instruction(migraphx::make_op("unpack_int4"), l0);

p.compile(migraphx::make_target("ref"));
Expand Down
102 changes: 52 additions & 50 deletions test/verify/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,59 +67,61 @@ int main(int argc, const char* argv[])
{
run_verify rv;
rv.add_validation_for("gpu", &validate_gpu);
rv.disable_test_for("cpu", {
"test_if_lp", "test_if_param", "test_if_literal", "test_select_module_add",
"test_select_module_reduce", "test_select_module_conv", "test_split_single_dyn_dim",
"test_resize_dyn", "test_instancenorm_large_3d<migraphx::shape::float_type>",
"test_instancenorm_large_3d<migraphx::shape::half_type>",
// these tests are disabled due issue of lossy downcast, see issue#2517
rv.disable_test_for(
"cpu",
{"test_if_lp", "test_if_param", "test_if_literal", "test_select_module_add",
"test_select_module_reduce", "test_select_module_conv", "test_split_single_dyn_dim",
"test_resize_dyn", "test_instancenorm_large_3d<migraphx::shape::float_type>",
"test_instancenorm_large_3d<migraphx::shape::half_type>",
// these tests are disabled due issue of lossy downcast, see issue#2517
#if defined(__GNUC__) and !defined(__clang__)
"test_batch_quant_dot_1<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, true>, "
"float>",
"test_quant_dot_3args_4<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, true>, "
"float>",
"test_quant_dot_3args_5<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, true>, "
"float>",
"test_batch_quant_dot_1<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, false>, "
"float>",
"test_quant_dot_3args_4<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, false>, "
"float>",
"test_quant_dot_3args_5<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, false>, "
"float>",
"test_batch_quant_dot_1<migraphx::fp8::float8<migraphx::fp8::f8_type::bf8, false>, "
"float>",
"test_quant_dot_3args_4<migraphx::fp8::float8<migraphx::fp8::f8_type::bf8, false>, "
"float>",
"test_quant_dot_3args_5<migraphx::fp8::float8<migraphx::fp8::f8_type::bf8, false>, "
"float>",
"test_batch_quant_dot_1<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, true>, "
"float>",
"test_quant_dot_3args_4<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, true>, "
"float>",
"test_quant_dot_3args_5<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, true>, "
"float>",
"test_batch_quant_dot_1<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, false>, "
"float>",
"test_quant_dot_3args_4<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, false>, "
"float>",
"test_quant_dot_3args_5<migraphx::fp8::float8<migraphx::fp8::f8_type::fp8, false>, "
"float>",
"test_batch_quant_dot_1<migraphx::fp8::float8<migraphx::fp8::f8_type::bf8, false>, "
"float>",
"test_quant_dot_3args_4<migraphx::fp8::float8<migraphx::fp8::f8_type::bf8, false>, "
"float>",
"test_quant_dot_3args_5<migraphx::fp8::float8<migraphx::fp8::f8_type::bf8, false>, "
"float>",
#else
"test_batch_quant_dot_1<migraphx::fp8::fp8e4m3fnuz, float>",
"test_quant_dot_3args_4<migraphx::fp8::fp8e4m3fnuz, float>",
"test_quant_dot_3args_5<migraphx::fp8::fp8e4m3fnuz, float>",
"test_batch_quant_dot_1<migraphx::fp8::fp8e4m3fn, float>",
"test_quant_dot_3args_4<migraphx::fp8::fp8e4m3fn, float>",
"test_quant_dot_3args_5<migraphx::fp8::fp8e4m3fn, float>",
"test_batch_quant_dot_1<migraphx::fp8::fp8e5m2, float>",
"test_quant_dot_3args_4<migraphx::fp8::fp8e5m2, float>",
"test_quant_dot_3args_5<migraphx::fp8::fp8e5m2, float>",
"test_batch_quant_dot_1<migraphx::fp8::fp8e4m3fnuz, float>",
"test_quant_dot_3args_4<migraphx::fp8::fp8e4m3fnuz, float>",
"test_quant_dot_3args_5<migraphx::fp8::fp8e4m3fnuz, float>",
"test_batch_quant_dot_1<migraphx::fp8::fp8e4m3fn, float>",
"test_quant_dot_3args_4<migraphx::fp8::fp8e4m3fn, float>",
"test_quant_dot_3args_5<migraphx::fp8::fp8e4m3fn, float>",
"test_batch_quant_dot_1<migraphx::fp8::fp8e5m2, float>",
"test_quant_dot_3args_4<migraphx::fp8::fp8e5m2, float>",
"test_quant_dot_3args_5<migraphx::fp8::fp8e5m2, float>",
#endif
"test_block_reduce_small<3, migraphx::shape::int8_type>",
"test_block_reduce_small<4, migraphx::shape::int8_type>",
"test_block_reduce_small<8, migraphx::shape::int8_type>",
"test_block_reduce_small<16, migraphx::shape::int8_type>",
"test_block_reduce_small<25, migraphx::shape::int8_type>",
"test_block_reduce_small<32, migraphx::shape::int8_type>",
"test_block_reduce_small<64, migraphx::shape::int8_type>",
"test_block_reduce_small<67, migraphx::shape::int8_type>",
"test_block_reduce_small<128, migraphx::shape::int8_type>",
"test_block_reduce_small<129, migraphx::shape::int8_type>",
// disabled because CPU does eliminate_data_type to float for everything
"test_bitwise_and<migraphx::shape::int32_type>",
"test_bitwise_and<migraphx::shape::uint8_type>",
"test_unpack_int4<migraphx::shape::uint8_type>",
"test_unpack_int4<migraphx::shape::int8_type>",
"test_unpack_int4<migraphx::shape::uint8_type, 0>",
"test_unpack_int4<migraphx::shape::int8_type, 0>"
"test_block_reduce_small<3, migraphx::shape::int8_type>",
"test_block_reduce_small<4, migraphx::shape::int8_type>",
"test_block_reduce_small<8, migraphx::shape::int8_type>",
"test_block_reduce_small<16, migraphx::shape::int8_type>",
"test_block_reduce_small<25, migraphx::shape::int8_type>",
"test_block_reduce_small<32, migraphx::shape::int8_type>",
"test_block_reduce_small<64, migraphx::shape::int8_type>",
"test_block_reduce_small<67, migraphx::shape::int8_type>",
"test_block_reduce_small<128, migraphx::shape::int8_type>",
"test_block_reduce_small<129, migraphx::shape::int8_type>",
// disabled because CPU does eliminate_data_type to float for everything
"test_bitwise_and<migraphx::shape::int32_type>",
"test_bitwise_and<migraphx::shape::uint8_type>",

"test_unpack_int4<migraphx::shape::uint8_type>",
"test_unpack_int4<migraphx::shape::int8_type>",
"test_unpack_int4<migraphx::shape::uint8_type, 0>",
"test_unpack_int4<migraphx::shape::int8_type, 0>"
});
rv.disable_test_for("gpu",
{
Expand Down

0 comments on commit 96e12b0

Please sign in to comment.