OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[GPU] Fix crash on swiglu fused case (due to outer_ofm == 1) (#27972)
Taylor Yeonbok Leea3f4edb3d8f1
diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp b/src/plugins/intel_gpu/src/kernel_selector/kernels/fully_connected/fully_connected_kernel_bf_tiled.cppindex 68da7aea7b1..d0f881adcd8 100644--- a/src/plugins/intel_gpu/src/kernel_selector/kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp+++ b/src/plugins/intel_gpu/src/kernel_selector/kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp@@ -435,10 +435,14 @@ FullyConnected_bf_tiled::GetAutoTuneParams(const fully_connected_params& params,return selector.Default(tune_params(1, 1, 4, 4, 1, 1, 1, EXE_MODE_DEFAULT));}} else if (is_weight_small_kn(params, output_f)) {- if (params.weights.GetLayout() == WeightsLayout::os_is_yx_osv32_isv2)- return selector.Default(tune_params(1, 1, 4, 2, 1, 1, 1, EXE_MODE_DEFAULT));- else+ if (params.weights.GetLayout() == WeightsLayout::os_is_yx_osv32_isv2) {+ if (swiglu_fused)+ return selector.Default(tune_params(1, 1, 4, 2, 2, 1, 1, EXE_MODE_DEFAULT));+ else+ return selector.Default(tune_params(1, 1, 4, 2, 1, 1, 1, EXE_MODE_DEFAULT));+ } else {return selector.Default(tune_params(1, 2, 4, 2, 1, 1, 1, EXE_MODE_DEFAULT));+ }} else {if (params.weights.GetLayout() == WeightsLayout::os_iyx_osv16) {return selector.Default(tune_params(1, 1, 4, 4, 1, 1, 1, EXE_MODE_DEFAULT));@@ -865,7 +869,9 @@ KernelsData FullyConnected_bf_tiled::GetTunedKernelsDataByIndex(const Params &paauto output_f = get_output_aligned_bf_size(fc_params, false).second;WeightsLayout weights_layout = WeightsLayout::os_iyx_osv16;- if (!is_swiglu_fused(fc_params) && fc_params.compressed && fc_params.inputs[0].GetDType() == Datatype::F16+ if (is_swiglu_fused(fc_params)) {+ weights_layout = WeightsLayout::os_is_yx_osv32_isv2;+ } else if (fc_params.compressed && fc_params.inputs[0].GetDType() == Datatype::F16&& (fc_params.weights.GetLayout() == WeightsLayout::oiyx || fc_params.weights.GetLayout() == WeightsLayout::os_is_yx_osv64_isv2)&& (fc_params.weights.GetDType() == WeightsType::INT4 || fc_params.weights.GetDType() == WeightsType::UINT4)&& is_weight_horizontal(fc_params, output_f)) {