From 96e12b0cd888dc2d1da024fb6d96aa3cd58482f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Musi=C4=87?= Date: Thu, 17 Oct 2024 13:41:35 +0000 Subject: [PATCH] Address review comments, fix formatting issue --- test/ref/unpack_int4.cpp | 2 +- test/verify/main.cpp | 102 ++++++++++++++++++++------------------- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/test/ref/unpack_int4.cpp b/test/ref/unpack_int4.cpp index 12d19ef7c3..5f583bdcde 100644 --- a/test/ref/unpack_int4.cpp +++ b/test/ref/unpack_int4.cpp @@ -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")); diff --git a/test/verify/main.cpp b/test/verify/main.cpp index eeaac5ef59..3af43cc3d1 100644 --- a/test/verify/main.cpp +++ b/test/verify/main.cpp @@ -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", - "test_instancenorm_large_3d", - // 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", + "test_instancenorm_large_3d", + // these tests are disabled due issue of lossy downcast, see issue#2517 #if defined(__GNUC__) and !defined(__clang__) - "test_batch_quant_dot_1, " - "float>", - "test_quant_dot_3args_4, " - "float>", - "test_quant_dot_3args_5, " - "float>", - "test_batch_quant_dot_1, " - "float>", - "test_quant_dot_3args_4, " - "float>", - "test_quant_dot_3args_5, " - "float>", - "test_batch_quant_dot_1, " - "float>", - "test_quant_dot_3args_4, " - "float>", - "test_quant_dot_3args_5, " - "float>", + "test_batch_quant_dot_1, " + "float>", + "test_quant_dot_3args_4, " + "float>", + "test_quant_dot_3args_5, " + "float>", + "test_batch_quant_dot_1, " + "float>", + "test_quant_dot_3args_4, " + "float>", + "test_quant_dot_3args_5, " + "float>", + "test_batch_quant_dot_1, " + "float>", + "test_quant_dot_3args_4, " + "float>", + "test_quant_dot_3args_5, " + "float>", #else - "test_batch_quant_dot_1", - "test_quant_dot_3args_4", - "test_quant_dot_3args_5", - "test_batch_quant_dot_1", - "test_quant_dot_3args_4", - "test_quant_dot_3args_5", - "test_batch_quant_dot_1", - "test_quant_dot_3args_4", - "test_quant_dot_3args_5", + "test_batch_quant_dot_1", + "test_quant_dot_3args_4", + "test_quant_dot_3args_5", + "test_batch_quant_dot_1", + "test_quant_dot_3args_4", + "test_quant_dot_3args_5", + "test_batch_quant_dot_1", + "test_quant_dot_3args_4", + "test_quant_dot_3args_5", #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", - "test_bitwise_and", - "test_unpack_int4", - "test_unpack_int4", - "test_unpack_int4", - "test_unpack_int4" + "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", + "test_bitwise_and", + + "test_unpack_int4", + "test_unpack_int4", + "test_unpack_int4", + "test_unpack_int4" }); rv.disable_test_for("gpu", {