Skip to content

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

[GPU] Modify exception for gs16 onednn gpu matmul (#32104)

Min, Byungilb3a4f2274c68
diff --git a/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp b/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp
index b07950b38ca..a205aa0acec 100644
--- a/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp
+++ b/src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp
@@ -410,8 +410,8 @@ public:
auto ifm = arg.get_dependency(1).get_output_layout().get_dim(weight_rank - 1);
auto ngroups = scale_layout.get_dim(weight_rank - 1);
group_size = ifm / ngroups;
- OPENVINO_ASSERT((group_size == 1 || ngroups == 1 || group_size % 32 == 0),
- "[GPU] group_size should be aligned to 32 if it is not a single scale group or the group_size is not one.");
+ OPENVINO_ASSERT((group_size == 1 || ngroups == 1 || group_size % 16 == 0),
+ "[GPU] group_size should be aligned to 16 if it is not a single scale group or the group_size is not one.");
if (scale_layout.count() == 1) {
attr->set_scales(DNNL_ARG_WEIGHTS, COMMON, dnnl::memory::dims{}, ds_data_type);
} else if (ngroups == 1 && weight_rank <= 2) {
diff --git a/src/plugins/intel_gpu/tests/unit/test_cases/fully_connected_gpu_test.cpp b/src/plugins/intel_gpu/tests/unit/test_cases/fully_connected_gpu_test.cpp
index 4c3cbcd486f..ac5a64ddc86 100644
--- a/src/plugins/intel_gpu/tests/unit/test_cases/fully_connected_gpu_test.cpp
+++ b/src/plugins/intel_gpu/tests/unit/test_cases/fully_connected_gpu_test.cpp
@@ -5241,6 +5241,9 @@ TEST_F(fully_connected_gpu_tests, onednn_acc_test_compressed_weight_int4_group_s
this->test_comp_weight_scale_zp(false, 64, 256, 2048, 0, 32, 32, WzpMode::Symmetric, WeightMode::Bit4);
}
+TEST_F(fully_connected_gpu_tests, onednn_acc_test_compressed_weight_int8_group_scale_scalar_zp_gs16) {
+ this->test_comp_weight_scale_zp(false, 64, 256, 2048, 0, 16, 16, WzpMode::Symmetric, WeightMode::Bit8);
+}
using fully_connected_dynamic_test_params = std::tuple<
std::vector<ov::Dimension::value_type>, // batch_sizes