Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU] Optimize int8 dynamic model (#32236)

hyunback kim8b7b56fa059b
diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp
index f313131ff19..f927e7b9a8c 100644
--- a/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp
+++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_primitive_fusing.cpp
@@ -903,9 +903,9 @@ void prepare_primitive_fusing::fuse_simple_primitives(program &p) {
auto out_layout = quantize_node.get_output_layout();
auto in_layout = input_data.get_output_layout();
- // In dynamic shape, quantize-fusion is enabled in only onednn convolution.
+ // In dynamic shape, quantize-fusion is disable in only cldnn convolution
if ((in_layout.is_dynamic() || out_layout.is_dynamic()) &&
- (!input_data.is_type<convolution>() || (input_data.is_type<convolution>() && !lo.has_all_enabled_onednn_impls_optimization_attribute())))
+ (input_data.is_type<convolution>() && !lo.has_all_enabled_onednn_impls_optimization_attribute()))
return;
auto out_dt = out_layout.data_type;
diff --git a/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp b/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
index 955de234991..598d0c5033c 100644
--- a/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
+++ b/src/plugins/intel_gpu/src/graph/layout_optimizer.cpp
@@ -139,17 +139,9 @@ bool layout_optimizer::can_fuse_reorder(program_node& prev, program_node& next,
auto next_dt = next.get_output_layout().data_type;
auto use_onednn_impls = has_all_enabled_onednn_impls_optimization_attribute();
- if (prev.is_dynamic() || next.is_dynamic())
+ if ((prev.is_dynamic() || next.is_dynamic()) && !next.is_type<convolution>())
return false;
- auto is_input_idx = [&](size_t idx) -> bool {
- if (&next.get_dependency(idx) == &prev)
- return true;
- if (next.get_dependency(idx).is_type<reorder>() && &next.get_dependency(idx).get_dependency(0) == &prev)
- return true;
- return false;
- };
-
// Not to fuse reorder if this removal changes input format of its next node which has reuse in fused_op
if (next.get_preferred_impl_type() == impl_types::onednn) {
for (auto& fused_op : next.get_fused_primitives()) {
@@ -170,37 +162,6 @@ bool layout_optimizer::can_fuse_reorder(program_node& prev, program_node& next,
if (next.is_type<reorder>())
return true;
- // Check whether the reorder between prev and next is the first input of next.
- auto is_input_reorder = [](program_node& prev, program_node& next) {
- auto found_reorder = std::find_if(next.get_dependencies().begin(), next.get_dependencies().end(), [](const std::pair<program_node*, int32_t>& dep){
- return dep.first->is_type<reorder>();
- });
- // if there is no reorder between prev and next, it returns true.
- // This case is needed for can_fuse_reorder in reorder_inputs pass.
- if (found_reorder == std::end(next.get_dependencies()) && next.get_dependency_index(prev) == 0)
- return true;
- auto& next_dep = next.get_dependency(0);
- if (!next_dep.is_type<reorder>())
- return false;
- for (auto& prev_usr : prev.get_users()) {
- if (!prev_usr->is_type<reorder>())
- continue;
- if (&next_dep == prev_usr && next.get_dependency_index(next_dep) == 0) {
- return true;
- }
- }
- return false;
- };
-
- // Errata for onednn layout selection. First conv can receive both bfyx and byxf directly.
- if (next.is_type<convolution>() &&
- next.get_preferred_impl_type() == impl_types::onednn &&
- ((fmt_prev == format::byxf && fmt_next == format::byxf) ||
- (fmt_prev == format::bfyx && fmt_next == format::byxf &&
- (prev_dt == data_types::f16 && next.get_input_layout(0).feature() <= 8))) &&
- is_input_reorder(prev, next))
- return true;
-
// Do not remove reorder if it is necessary to fulfill required_input
auto& reorder_node = next.get_dependency(0);
auto reorder_layout = reorder_node.get_output_layout();
@@ -223,8 +184,35 @@ bool layout_optimizer::can_fuse_reorder(program_node& prev, program_node& next,
((fmt_prev == format::b_fs_yx_fsv4 && fmt_next == format::bfyx) && (prev_dt == data_types::u8 || prev_dt == data_types::i8))))
return true;
- if (next.is_type<eltwise>() && prev_simple && next_simple)
- return true;
+ if (next.is_type<eltwise>()) {
+ if (prev_simple && next_simple)
+ return true;
+ if (use_onednn_impls && (fmt_prev == format::bfyx) && (fmt_next == format::bs_fs_yx_bsv4_fsv2) &&
+ prev.is_input() && (prev_dt == data_types::u8 || prev_dt == data_types::i8))
+ return true;
+ }
+
+ // Check whether the reorder between prev and next is the first input of next.
+ auto is_input_reorder = [](program_node& prev, program_node& next) {
+ auto found_reorder = std::find_if(next.get_dependencies().begin(), next.get_dependencies().end(), [](const std::pair<program_node*, int32_t>& dep){
+ return dep.first->is_type<reorder>();
+ });
+ // if there is no reorder between prev and next, it returns true.
+ // This case is needed for can_fuse_reorder in reorder_inputs pass.
+ if (found_reorder == std::end(next.get_dependencies()) && next.get_dependency_index(prev) == 0)
+ return true;
+ auto& next_dep = next.get_dependency(0);
+ if (!next_dep.is_type<reorder>())
+ return false;
+ for (auto& prev_usr : prev.get_users()) {
+ if (!prev_usr->is_type<reorder>())
+ continue;
+ if (&next_dep == prev_usr && next.get_dependency_index(next_dep) == 0) {
+ return true;
+ }
+ }
+ return false;
+ };
if (next.is_type<fully_connected>() &&
(fmt_prev == format::bfyx || fmt_prev == format::yxfb ||
@@ -236,104 +224,133 @@ bool layout_optimizer::can_fuse_reorder(program_node& prev, program_node& next,
prev_output_layout.spatial(1) == 1)) && is_input_reorder(prev, next))
return true;
- if (next.is_type<convolution>() && fmt_prev == format::b_fs_yx_fsv16 && fmt_next == format::b_fs_yx_fsv4 && is_input_idx(0))
- return true;
-
- if (next.is_type<quantize>() && (fmt_prev == format::bfyx || fmt_prev == format::bfzyx) &&
- prev.is_input() && (prev_dt == data_types::u8 || prev_dt == data_types::i8))
- return true;
+ if (next.is_type<quantize>() && (fmt_prev == format::bfyx || fmt_prev == format::bfzyx)) {
+ if (prev.is_input() && (prev_dt == data_types::u8 || prev_dt == data_types::i8))
+ return true;
+ if (fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::b_fs_zyx_fsv16 ||
+ fmt_next == format::bs_fs_yx_bsv16_fsv16 || fmt_next == format::b_fs_yx_fsv4)
+ return true;
+ if (use_onednn_impls && prev.get_users().size() == 1)
+ return true;
+ }
- if (!use_onednn_impls || next.get_preferred_impl_type() == impl_types::ocl) {
- if (next.is_type<convolution>() &&
- (fmt_prev == format::bfyx || fmt_prev == format::bs_fs_yx_bsv4_fsv2) &&
- ((fmt_next == format::fs_b_yx_fsv32 && next.as<convolution>().get_primitive()->groups == 1) ||
- (fmt_next == format::b_fs_yx_fsv32 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::bs_fs_yx_bsv32_fsv32 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::bs_fs_yx_bsv32_fsv16 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::bs_fs_yx_bsv16_fsv16 && next_output_layout.feature() % 16 == 0 && prev_output_layout.feature() == 3) ||
- (fmt_next == format::bs_fs_yx_bsv16_fsv16 && next_output_layout.feature() >= 16 && prev_output_layout.feature() == 3 &&
- (next_output_layout.data_type != data_types::i8 && next_output_layout.data_type != data_types::u8))))
+ if (use_onednn_impls) {
+ auto& node = prev.get_users().front();
+ if (prev.get_output_layout().format == next.get_preferred_input_fmt() &&
+ node->get_output_layout().data_padding == prev.get_output_layout().data_padding)
return true;
+ }
+
+ if (next.is_type<convolution>()) {
+ auto is_input_idx = [&](size_t idx) -> bool {
+ if (&next.get_dependency(idx) == &prev)
+ return true;
+ if (next.get_dependency(idx).is_type<reorder>() && &next.get_dependency(idx).get_dependency(0) == &prev)
+ return true;
+ return false;
+ };
+
+ auto get_conv_channel_count = [](const convolution_node& conv_node, const layout& layout, bool is_input) -> int64_t {
+ auto channel_count = layout.get_partial_shape()[1].is_static() ? layout.get_partial_shape()[1].get_length() : -1;
+ if (channel_count == -1) {
+ auto weights_layout = conv_node.weights().get_output_layout();
+ if (weights_layout.is_static()) {
+ const auto& shape = weights_layout.get_partial_shape();
+ if (is_input)
+ channel_count = shape[conv_node.get_groups() > 1 ? 2 : 1].get_length();
+ else
+ channel_count = shape[conv_node.get_groups() > 1 ? 1 : 0].get_length();
+ }
+ }
+ return channel_count;
+ };
- if (next.is_type<convolution>() &&
- fmt_prev == format::bfyx &&
- (fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::bs_fs_yx_bsv32_fsv16) &&
- next_output_layout.feature() >= 16 && prev_output_layout.feature() <= 4 &&
- !next.as<convolution>().get_primitive()->activations_zero_points.is_valid() &&
- !next.as<convolution>().get_primitive()->weights_zero_points.is_valid())
+ auto& conv_node = next.as<convolution>();
+ auto in_channel_count = get_conv_channel_count(conv_node, prev_output_layout, true);
+ auto out_channel_count = get_conv_channel_count(conv_node, next_output_layout, false);
+
+ if ((prev.is_dynamic() || next.is_dynamic()) && (in_channel_count == -1 || out_channel_count == -1))
+ return false;
+
+ // Errata for onednn layout selection. First conv can receive both bfyx and byxf directly.
+ if (next.get_preferred_impl_type() == impl_types::onednn &&
+ ((fmt_prev == format::byxf && fmt_next == format::byxf) ||
+ (fmt_prev == format::bfyx && fmt_next == format::byxf &&
+ (prev_dt == data_types::f16 && get_conv_channel_count(conv_node, next.get_input_layout(0), false) <= 8))) &&
+ is_input_reorder(prev, next))
return true;
- if (next.is_type<convolution>() &&
- (fmt_prev == format::b_fs_yx_fsv4 || fmt_prev == format::bs_fs_yx_bsv4_fsv4 || fmt_prev == format::bs_fs_yx_bsv8_fsv4) &&
- ((fmt_next == format::b_fs_yx_fsv32 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::bs_fs_yx_bsv32_fsv32 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::bs_fs_yx_bsv4_fsv4 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::bs_fs_yx_bsv8_fsv4 && (prev_output_layout.feature() == 3 || prev_output_layout.feature() == 4)) ||
- (fmt_next == format::b_fs_yx_fsv16 && next_output_layout.feature() >= 16 &&
- (prev_output_layout.feature() == 3 || (prev_output_layout.feature() == 4 && (prev_dt == data_types::u8 || prev_dt == data_types::i8))))))
+ if (fmt_prev == format::b_fs_yx_fsv16 && fmt_next == format::b_fs_yx_fsv4 && is_input_idx(0))
return true;
- }
- if (next.is_type<quantize>() && (fmt_prev == format::bfyx || fmt_prev == format::bfzyx) &&
- (fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::b_fs_zyx_fsv16 ||
- fmt_next == format::bs_fs_yx_bsv16_fsv16 || fmt_next == format::b_fs_yx_fsv4))
- return true;
+ if (!use_onednn_impls || next.get_preferred_impl_type() == impl_types::ocl) {
+ if ((fmt_prev == format::bfyx || fmt_prev == format::bs_fs_yx_bsv4_fsv2) &&
+ ((fmt_next == format::fs_b_yx_fsv32 && conv_node.get_primitive()->groups == 1) ||
+ (fmt_next == format::b_fs_yx_fsv32 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::bs_fs_yx_bsv32_fsv32 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::bs_fs_yx_bsv32_fsv16 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::bs_fs_yx_bsv16_fsv16 && out_channel_count % 16 == 0 && in_channel_count == 3) ||
+ (fmt_next == format::bs_fs_yx_bsv16_fsv16 && out_channel_count >= 16 && in_channel_count == 3 &&
+ (next_output_layout.data_type != data_types::i8 && next_output_layout.data_type != data_types::u8))))
+ return true;
- if (next.is_type<convolution>() &&
- !(prev.is_type<quantize>() && (prev_dt == data_types::i8 || prev_dt == data_types::u8)) &&
- (fmt_prev == format::b_fs_yx_fsv4 || fmt_prev == format::bfyx) && prev_output_layout.feature() == 3 &&
- (fmt_next == format::b_fs_yx_fsv4 ||
- fmt_next == format::bs_fs_yx_bsv16_fsv16))
- return true;
+ if (fmt_prev == format::bfyx &&
+ (fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::bs_fs_yx_bsv32_fsv16) &&
+ out_channel_count >= 16 && in_channel_count <= 4 &&
+ !conv_node.get_primitive()->activations_zero_points.is_valid() &&
+ !conv_node.get_primitive()->weights_zero_points.is_valid())
+ return true;
- if (next.is_type<convolution>() &&
- fmt_prev == format::bfyx &&
- ((fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::bs_fs_yx_bsv16_fsv16) &&
- next_output_layout.feature() >= 16 && prev_output_layout.feature() == 3))
- return true;
+ if ((fmt_prev == format::b_fs_yx_fsv4 || fmt_prev == format::bs_fs_yx_bsv4_fsv4 || fmt_prev == format::bs_fs_yx_bsv8_fsv4) &&
+ ((fmt_next == format::b_fs_yx_fsv32 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::bs_fs_yx_bsv32_fsv32 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::bs_fs_yx_bsv4_fsv4 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::bs_fs_yx_bsv8_fsv4 && (in_channel_count == 3 || in_channel_count == 4)) ||
+ (fmt_next == format::b_fs_yx_fsv16 && out_channel_count >= 16 &&
+ (in_channel_count == 3 || (in_channel_count == 4 &&
+ (prev_dt == data_types::u8 || prev_dt == data_types::i8))))))
+ return true;
+ }
- if (next.is_type<convolution>() &&
- fmt_prev == format::bfzyx &&
- ((fmt_next == format::b_fs_zyx_fsv16 || fmt_next == format::bs_fs_zyx_bsv16_fsv16) &&
- next_output_layout.feature() >= 16 && prev_output_layout.feature() == 3))
- return true;
+ if (!(prev.is_type<quantize>() && (prev_dt == data_types::i8 || prev_dt == data_types::u8)) &&
+ (fmt_prev == format::b_fs_yx_fsv4 || fmt_prev == format::bfyx) && in_channel_count == 3 &&
+ (fmt_next == format::b_fs_yx_fsv4 ||
+ fmt_next == format::bs_fs_yx_bsv16_fsv16))
+ return true;
- if (use_onednn_impls) {
- if (next.is_type<eltwise>() && (fmt_prev == format::bfyx) && (fmt_next == format::bs_fs_yx_bsv4_fsv2) &&
- prev.is_input() && (prev_dt == data_types::u8 || prev_dt == data_types::i8))
+ if (fmt_prev == format::bfyx &&
+ ((fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::bs_fs_yx_bsv16_fsv16) &&
+ out_channel_count >= 16 && in_channel_count == 3))
return true;
- // Remove Reorder for Convolution if mixed layout.
- auto& node = prev.get_users().front();
- if (prev.get_output_layout().format == next.get_preferred_input_fmt() &&
- node->get_output_layout().data_padding == prev.get_output_layout().data_padding)
+ if (fmt_prev == format::bfzyx &&
+ ((fmt_next == format::b_fs_zyx_fsv16 || fmt_next == format::bs_fs_zyx_bsv16_fsv16) &&
+ out_channel_count >= 16 && in_channel_count == 3))
return true;
- if (next.is_type<convolution>() &&
- (fmt_prev == format::bfyx && fmt_next == format::bs_fs_yx_bsv32_fsv32) &&
- // Condition to avoid execution in reorder_inputs.
- prev.get_users().size() == 1 && prev.get_users().front()->is_type<reorder>()) {
- const auto& cur = prev.get_users().front();
- std::set<size_t> dep_idx_set;
- for (auto& p : next.get_fused_primitives()) {
- // find eltwise sum primitive which has dependency nodes, and gather dependency indices of it.
- if (p.is_type<eltwise>() && p.typed_desc<eltwise>()->mode == eltwise_mode::sum) {
- for (size_t i = p.outer_dep_start_idx; i < p.outer_dep_start_idx + p.total_num_deps; i++) {
- dep_idx_set.insert(i);
+ if (use_onednn_impls) {
+ if ((fmt_prev == format::bfyx && fmt_next == format::bs_fs_yx_bsv32_fsv32) &&
+ // Condition to avoid execution in reorder_inputs.
+ prev.get_users().size() == 1 && prev.get_users().front()->is_type<reorder>()) {
+ const auto& cur = prev.get_users().front();
+ std::set<size_t> dep_idx_set;
+ for (auto& p : next.get_fused_primitives()) {
+ // find eltwise sum primitive which has dependency nodes, and gather dependency indices of it.
+ if (p.is_type<eltwise>() && p.typed_desc<eltwise>()->mode == eltwise_mode::sum) {
+ for (size_t i = p.outer_dep_start_idx; i < p.outer_dep_start_idx + p.total_num_deps; i++) {
+ dep_idx_set.insert(i);
+ }
}
}
- }
- // The current reorder can be fused if it is a dependency of eltwise sum primitive fused.
- for (size_t i = 0; i < next.get_dependencies().size(); i++) {
- auto& d_node = next.get_dependency(i);
- if (cur->id() == d_node.id() && dep_idx_set.find(i) != dep_idx_set.end()) {
- return true;
+ // The current reorder can be fused if it is a dependency of eltwise sum primitive fused.
+ for (size_t i = 0; i < next.get_dependencies().size(); i++) {
+ auto& d_node = next.get_dependency(i);
+ if (cur->id() == d_node.id() && dep_idx_set.find(i) != dep_idx_set.end()) {
+ return true;
+ }
}
}
}
-
- if (next.is_type<quantize>() && prev.get_users().size() == 1)
- return true;
}
return false;
diff --git a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp
index 8ce35d4597c..d121150587e 100644
--- a/src/plugins/intel_gpu/src/graph/primitive_inst.cpp
+++ b/src/plugins/intel_gpu/src/graph/primitive_inst.cpp
@@ -1147,6 +1147,14 @@ bool primitive_inst::use_async_compilation() {
// Disable async compilation for all int4 FC, except in the case of batch_size == 1
if (one_of(weights_dt, {data_types::i4, data_types::u4}) && batch_size != 1)
compile_fc_impls = false;
+ } else {
+ auto input_dt = fc_node.input().get_output_layout().data_type;
+ auto weights_dt = fc_node.weights().get_output_layout().data_type;
+ auto output_dt = fc_node.input().get_output_layout().data_type;
+ // Disable async compilation for int8 quantize FC
+ if (one_of(weights_dt, {data_types::i8, data_types::u8})
+ && (one_of(input_dt, {data_types::i8, data_types::u8}) || one_of(output_dt, {data_types::i8, data_types::u8})))
+ compile_fc_impls = false;
}
}
diff --git a/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp b/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp
index 163c884e903..0891a83e0c6 100644
--- a/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp
+++ b/src/plugins/intel_gpu/tests/unit/fusions/fully_connected_fusion_test.cpp
@@ -452,9 +452,6 @@ INSTANTIATE_TEST_SUITE_P(fusings_gpu, fc_int8_quantize_u8_input_range, ::testing
class fc_int8_quantize_u8 : public FullyConnectedFusingTest {};
TEST_P(fc_int8_quantize_u8, basic) {
- // TODO: Fix me, refer PR(#15873)
- if (engine.get_device_info().supports_immad)
- return;
auto p = GetParam();
create_topologies(
input_layout("input", get_input_layout(p)),
@@ -485,9 +482,6 @@ INSTANTIATE_TEST_SUITE_P(fusings_gpu, fc_int8_quantize_u8, ::testing::ValuesIn(s
class fc_int8_eltwise_quantize_i8 : public FullyConnectedFusingTest {};
TEST_P(fc_int8_eltwise_quantize_i8, basic) {
- // TODO: Fix me, refer PR(#15873)
- if (engine.get_device_info().supports_immad)
- return;
auto p = GetParam();
create_topologies(
input_layout("input", get_input_layout(p)),
@@ -518,6 +512,44 @@ INSTANTIATE_TEST_SUITE_P(fusings_gpu, fc_int8_eltwise_quantize_i8, ::testing::Va
fully_connected_test_params{ CASE_FC_U8S8_3D_3, 2, 4 },
}));
+class fc_int8_eltwise_quantize_i8_dynamic : public FullyConnectedFusingTest {};
+
+TEST_P(fc_int8_eltwise_quantize_i8_dynamic, basic) {
+ auto p = GetParam();
+
+ auto test_input_layout = get_input_layout(p);
+ auto input_layout_dyn = layout{ov::PartialShape::dynamic(test_input_layout.get_partial_shape().size()), test_input_layout.data_type, test_input_layout.format};
+
+ create_topologies(
+ input_layout("input", input_layout_dyn),
+ data("weights", get_mem(get_weights_layout(p))),
+ data("bias", get_mem(get_bias_layout(p))),
+ data("in_lo", get_mem(get_per_channel_layout(p), min_random, 0)),
+ data("in_hi", get_mem(get_per_channel_layout(p), 1, max_random)),
+ data("out_lo", get_mem(get_single_element_layout(p), -127)),
+ data("out_hi", get_mem(get_single_element_layout(p), 127)),
+ data("eltwise_data", get_mem(get_per_channel_layout(p), 1.0f / get_weights_layout(p).count() / 255)),
+ fully_connected("fc_prim", input_info("input"), "weights", "bias", data_types::f32, get_output_dim_size(p), get_input_weights_rank(p)),
+ eltwise("eltwise", { input_info("fc_prim"), input_info("eltwise_data") }, eltwise_mode::prod),
+ quantize("quantize", input_info("eltwise"), input_info("in_lo"), input_info("in_hi"),
+ input_info("out_lo"), input_info("out_hi"), 255, data_types::i8),
+ reorder("reorder_bfyx", input_info("quantize"), p.default_format, data_types::f32)
+ );
+
+ bool is_dynamic = true;
+ cfg_not_fused.set_property(ov::intel_gpu::allow_new_shape_infer(true));
+ cfg_fused.set_property(ov::intel_gpu::allow_new_shape_infer(true));
+ tolerance = 1e-5f;
+ execute(p, is_dynamic);
+}
+
+
+INSTANTIATE_TEST_SUITE_P(fusings_gpu, fc_int8_eltwise_quantize_i8_dynamic, ::testing::ValuesIn(std::vector<fully_connected_test_params>{
+ fully_connected_test_params{ CASE_FC_U8S8_1, 2, 4 },
+ fully_connected_test_params{ CASE_FC_U8S8_3D_2, 2, 4 },
+}));
+
+
class fc_int8_eltwise_activation_quantize_i8 : public FullyConnectedFusingTest {};
TEST_P(fc_int8_eltwise_activation_quantize_i8, basic) {
// TODO: Fix me, refer PR(#15873)