Skip to content

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

[GPU] Fix build failure when MOE fusion is disabled with fp32 (#36894)

Paul Youngsoo Ahn86b38a693f7d
diff --git a/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp b/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
index e6794ea5439..9695bbdb1ce 100644
--- a/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
+++ b/src/plugins/intel_gpu/src/plugin/transformations_pipeline.cpp
@@ -645,7 +645,7 @@ void TransformationsPipeline::apply(std::shared_ptr<ov::Model> func) {
// MOE: TiledMoeBlock -> GatherMatmuls(compressed) -> MoeOp(compressed) -> MoeOpWithRouting(compressed).
// Gated on supports_immad (systolic-only) and oneDNN (required for expert GEMM dispatch).
// Note: even though we are already inside `if (supports_immad)`, oneDNN can still be explicitly disabled by the user.
- if (device_info.supports_immad && config.get_use_onednn()) {
+ if (device_info.supports_immad && config.get_use_onednn() && !config.get_moe_disable_fusion()) {
const std::vector<ov::element::Type> supported_compressed_weights_types{ov::element::u4,
ov::element::i4,
ov::element::i8,
@@ -661,7 +661,7 @@ void TransformationsPipeline::apply(std::shared_ptr<ov::Model> func) {
supported_compressed_weights_types);
manager.register_pass<ov::intel_gpu::FuseMoERouter>();
- if (!config.get_moe_disable_fusion()) {
+ {
// PA models flatten batch into seq.
const bool has_batch_dim = !is_pa;
// MOE3GemmCompressed kernel dispatches expert GEMMs through