[GPU] Fixed unit tests for dGPU (#17541)

This commit is contained in:
Vladimir Paramuzov
2023-05-16 09:36:09 +04:00
committed by GitHub
parent 04f216ce3e
commit 4cda67da15
4 changed files with 13 additions and 9 deletions

View File

@@ -492,7 +492,7 @@ public:
#define CASE_CONV_U8S8_12 { 32, 15, 5, 5 }, { 32, 30, 3, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::u8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx
#define CASE_CONV_U8S8_13 { 32, 16, 4, 5 }, { 32, 32, 4, 5 }, { 32, 16, 1, 1 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::u8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx
#define CASE_CONV_U8S8_14 { 32, 17, 4, 5 }, { 32, 17, 4, 5 }, { 17, 1, 1, 3, 3 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, 17, data_types::u8, format::bfyx, data_types::i8, format::goiyx, data_types::f32, format::bfyx
#define CASE_CONV_U8S8_15 { 1, 15, 2, 2 }, { 1, 30, 1, 1 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::u8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx
#define CASE_CONV_U8S8_15 { 1, 15, 3, 3 }, { 1, 30, 1, 1 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::u8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx
#define CASE_CONV_S8S8_1 { 1, 15, 4, 5 }, { 1, 30, 2, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::i8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx
#define CASE_CONV_S8S8_2 { 1, 15, 5, 5 }, { 1, 30, 3, 3 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::i8, format::bfyx, data_types::i8, format::bfyx, data_types::f32, format::bfyx
@@ -4405,8 +4405,8 @@ public:
};
#define CASE_CONV_FP16_PERMUTE_1 { 1, 4, 3, 5 }, { 1, 30, 2, 3 }, { 30, 5, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::bfyx
#define CASE_CONV_FP16_PERMUTE_2 { 1, 15, 4, 5 }, { 1, 30, 2, 3 }, { 30, 5, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::bfyx
#define CASE_CONV_FP16_PERMUTE_1 { 1, 4, 5, 3 }, { 1, 30, 3, 2 }, { 30, 3, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::bfyx
#define CASE_CONV_FP16_PERMUTE_2 { 1, 15, 5, 4 }, { 1, 30, 3, 2 }, { 30, 15, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::bfyx
class conv_after_permute_optimizing : public PermuteOptimizingTestOnednn {};
TEST_P(conv_after_permute_optimizing, basic) {
@@ -4548,7 +4548,7 @@ TEST_P(onednn_replace_full_tensor_sum_to_binary_add, basic) {
}
// in_shape; out_shape; kernel; stride; pad; dilation; groups; data_type; input_format; weights_type; weights_format; eltw_type; eltw_format; out_type; out_format; default_type; default_format;
#define CASE_CONV_ELTW_SUM_TO_BINARY_ADD { 1, 32, 4, 4 }, { 1, 32, 2, 2 }, { 1, 1, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::b_fs_yx_fsv16, data_types::f16, format::b_fs_yx_fsv16, data_types::f32, format::bfyx
#define CASE_CONV_ELTW_SUM_TO_BINARY_ADD { 1, 32, 4, 4 }, { 1, 32, 2, 2 }, { 32, 32, 3, 3 }, { 1, 1 }, { 0, 0 }, { 1, 1 }, 1, data_types::f16, format::bfyx, data_types::f16, format::bfyx, data_types::f16, format::b_fs_yx_fsv16, data_types::f16, format::b_fs_yx_fsv16, data_types::f32, format::bfyx
INSTANTIATE_TEST_SUITE_P(eltwise_sum_fusings_gpu, onednn_replace_full_tensor_sum_to_binary_add, ::testing::ValuesIn(std::vector<convolution_eltw_sum_test_params>{
convolution_eltw_sum_test_params{ CASE_CONV_ELTW_SUM_TO_BINARY_ADD, 2, 3, 4 },

View File

@@ -479,13 +479,13 @@ INSTANTIATE_TEST_SUITE_P(testing_can_fuse_reorder_errata_case_for_conv, test_can
onednn_layout_errata_test_param{
layout(data_types::f16, format::byxf, {1, 16, 8, 8}),
layout(data_types::f16, format::b_fs_yx_fsv16, {1, 16, 8, 8}),
layout(data_types::f16, format::bfyx, {1, 8, 1, 1}),
layout(data_types::f16, format::bfyx, {8, 16, 1, 1}),
layout(data_types::f16, format::byxf, {1, 8, 8, 8}),
true },
onednn_layout_errata_test_param{
layout(data_types::f16, format::bfyx, {1, 8, 8, 8}),
layout(data_types::f16, format::byxf, {1, 8, 8, 8}),
layout(data_types::f16, format::bfyx, {1, 3, 1, 1}),
layout(data_types::f16, format::bfyx, {3, 8, 1, 1}),
layout(data_types::f16, format::byxf, {1, 3, 8, 8}),
true },
}));

View File

@@ -5566,7 +5566,9 @@ TEST_P(convolution_gpu_block_layout3D, bfzyx_bsv16_fsv16_fp32)
ExecutionConfig config = get_test_default_config(engine);
config.set_property(ov::intel_gpu::optimize_data(true));
config.set_property(ov::intel_gpu::custom_outputs(std::vector<std::string>{ "conv_bsv16_fsv16", "reorder_bfzyx" }));
config.set_property(ov::intel_gpu::custom_outputs(std::vector<std::string>{ "conv_bsv16_fsv16", "reorder_bfzyx", }));
ov::intel_gpu::ImplementationDesc conv_impl = { input_format, "", impl_types::ocl };
config.set_property(ov::intel_gpu::force_implementations(ov::intel_gpu::ImplForcingMap{{ "conv_bsv16_fsv16", conv_impl }}));
network network(engine, topology, config);
network.set_input_data("input", input_mem);
@@ -5704,6 +5706,8 @@ TEST_P(convolution_gpu_block_layout3D, bfzyx_bsv16_fsv16_fp16)
ExecutionConfig config = get_test_default_config(engine);
config.set_property(ov::intel_gpu::optimize_data(true));
config.set_property(ov::intel_gpu::custom_outputs(std::vector<std::string>{ "conv_bsv16_fsv16", "reorder_bfzyx" }));
ov::intel_gpu::ImplementationDesc conv_impl = { input_format, "" };
config.set_property(ov::intel_gpu::force_implementations(ov::intel_gpu::ImplForcingMap{{ "conv_bsv16_fsv16", conv_impl }}));
network network(engine, topology, config);
network.set_input_data("input", input_mem);
@@ -8947,7 +8951,7 @@ TEST(convolution_gpu_onednn, padding_for_cldnn_kernel_after_onednn) {
auto weights = data("weights", weights_mem);
auto input_reorder = reorder("input_fsv", input_info("input"), { data_types::f16, format::b_fs_yx_fsv16, input_size });
auto conv1 = convolution("conv1", input_info("input_fsv"), "weights", no_bias, 1, {1, 1}, {1, 1}, {0, 0}, {0, 0}, false);
auto conv2 = convolution("conv2", input_info("conv1"), "weights", no_bias, 1, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, false);
auto conv2 = convolution("conv2", input_info("conv1"), "weights", no_bias, 1, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 2, 2 }, false);
auto output_reorder = reorder("reorder", input_info("conv2"), { data_types::f32, format::bfyx, { output_b, output_f, output_x, output_x } });
topology topology_test(input, weights, input_reorder, conv1, conv2, output_reorder);

View File

@@ -2931,7 +2931,7 @@ TEST_P(testing_onednn_reorder, basic_selection) {
INSTANTIATE_TEST_SUITE_P(basic_onednn_reorder, testing_onednn_reorder,
::testing::ValuesIn(std::vector<reorder_test_param>{
reorder_test_param{{1, 32, 16, 16}, {1, 32, 16, 16}, {1, 1, 1, 1}, {1, 1}, {0, 0},
data_types::f16, format::b_fs_yx_fsv16, data_types::f16, format::goiyx, data_types::f16, format::b_fs_yx_fsv16},
data_types::f16, format::b_fs_yx_fsv16, data_types::f16, format::oiyx, data_types::f16, format::b_fs_yx_fsv16},
}));
#endif // ENABLE_ONEDNN_FOR_GPU