Skip to content

[CPU] MOE_via_BatchGatherMatmul_extended_for_gpt_oss_awq#33335

Closed
chenhu-wang wants to merge 3 commits intoopenvinotoolkit:masterfrom
chenhu-wang:chenhu/MOE_via_BatchGatherMatmul_for_gpt_oss_AWQ
Closed

[CPU] MOE_via_BatchGatherMatmul_extended_for_gpt_oss_awq#33335
chenhu-wang wants to merge 3 commits intoopenvinotoolkit:masterfrom
chenhu-wang:chenhu/MOE_via_BatchGatherMatmul_for_gpt_oss_AWQ

Conversation

@chenhu-wang
Copy link
Contributor

@chenhu-wang chenhu-wang commented Dec 22, 2025

Details:

  • MOE via BatchGatherMatmul extended for gpt oss awq

Tickets:

@chenhu-wang chenhu-wang requested review from a team as code owners December 22, 2025 09:07
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Dec 22, 2025
@v-Golubev v-Golubev self-assigned this Dec 22, 2025
@chenhu-wang chenhu-wang force-pushed the chenhu/MOE_via_BatchGatherMatmul_for_gpt_oss_AWQ branch from 1cd3ef2 to 7a01e2e Compare December 23, 2025 03:45
@chenhu-wang chenhu-wang requested review from a team as code owners December 23, 2025 08:34
@github-actions github-actions bot added the category: IE Tests OpenVINO Test: plugins and common label Dec 23, 2025
@chenhu-wang chenhu-wang force-pushed the chenhu/MOE_via_BatchGatherMatmul_for_gpt_oss_AWQ branch 2 times, most recently from aa49aa4 to 75ebe2d Compare December 23, 2025 12:15
@maxnick maxnick added this to the 2026.0 milestone Dec 29, 2025
Copy link
Contributor

@v-Golubev v-Golubev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also update src/plugins/intel_cpu/tests/unit/transformations/moe_matmuls_fusion_test.cpp?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is applicable only for MoE2GeMM, let's throw an exception in case when with_gate_mul==true and moe type is MoE3GeMM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check is added, thanks!

Comment on lines 292 to 320
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First 2 and last 2 params are identical except for with_gate_mul value, right? Maybe we can move with_gate_mul to MoeTestParams then? In this case, we will not need 2 different moe_params_* vectors

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use pattern::shape_matches instead of a custom predicate:

Suggested change
auto mul1_const = pattern::wrap_type<ov::op::v0::Constant>(mul1_const_predicate);
auto mul1_const = pattern::wrap_type<ov::op::v0::Constant>(pattern::shape_matches("[?, 1, ?]");

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks!

@chenhu-wang chenhu-wang force-pushed the chenhu/MOE_via_BatchGatherMatmul_for_gpt_oss_AWQ branch 2 times, most recently from ce59ca1 to 247ed46 Compare January 4, 2026 09:33
@chenhu-wang
Copy link
Contributor Author

Could you please also update src/plugins/intel_cpu/tests/unit/transformations/moe_matmuls_fusion_test.cpp?

extended, thanks!

@chenhu-wang chenhu-wang closed this Feb 9, 2026
@chenhu-wang
Copy link
Contributor Author

NNCF should avoid inserting "Mutliply" for MoE patterns, this is feedback for nncf team.

@chenhu-wang chenhu-wang deleted the chenhu/MOE_via_BatchGatherMatmul_for_gpt_oss_AWQ branch February 9, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CPU OpenVINO CPU plugin category: IE Tests OpenVINO Test: plugins and common

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments