Skip to content

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

Modify condition to select use_b_fs_yx_fsv16_conv (#32953)

Min, Byungil552f2b40d097
diff --git a/src/plugins/intel_gpu/src/graph/program.cpp b/src/plugins/intel_gpu/src/graph/program.cpp
index 1be32f35d47..f9bf639a645 100644
--- a/src/plugins/intel_gpu/src/graph/program.cpp
+++ b/src/plugins/intel_gpu/src/graph/program.cpp
@@ -1464,6 +1464,8 @@ void program::set_layout_optimizer_attributes(layout_optimizer& lo) {
size_t opt_deconv_layers_b_fs_zyx_fsv16 = 0;
size_t opt_deconv_layers_b_fs_yx_fsv16 = 0;
size_t total_crop_layers = 0;
+ size_t total_deconv_layers = 0;
+
#ifdef ENABLE_ONEDNN_FOR_GPU
bool is_dynamic_batch_onednn_conv = false;
size_t total_non_byxf_onednn_conv_whitelist_layers = 0;
@@ -1521,6 +1523,8 @@ void program::set_layout_optimizer_attributes(layout_optimizer& lo) {
opt_deconv_layers_b_fs_zyx_fsv16 += 1;
else if (lo.is_format_supported(prim.as<deconvolution>(), format::b_fs_yx_fsv16))
opt_deconv_layers_b_fs_yx_fsv16 += 1;
+
+ total_deconv_layers++;
}
// list of layers that do not support yxfb or perform worse than bfyx
@@ -1672,9 +1676,9 @@ void program::set_layout_optimizer_attributes(layout_optimizer& lo) {
bool should_use_b_fs_yx_fsv16_conv = is_quantized_int8_model ||
(can_use_fsv16 &&
- total_conv_layers > 11 &&
+ total_conv_layers + total_deconv_layers > 9 &&
(num_of_conv_b_fs_yx_fsv16 * cond_denom > 0.5f || opt_deconv_layers_b_fs_yx_fsv16 >= 1) &&
- num_of_conv_b_fs_yx_fsv16 * 2 > total_crop_layers);
+ (num_of_conv_b_fs_yx_fsv16 + opt_deconv_layers_b_fs_yx_fsv16) * 2 > total_crop_layers);
bool should_use_fs_b_yx_fsv32_conv = total_conv_layers > 11 &&
total_grouped_conv_layers == 0 &&