Skip to content

[TRANSFORMATIONS] Remove postponed_constant w/a in FuseMOEExperts#36538

Open
mryzhov wants to merge 11 commits into
openvinotoolkit:masterfrom
mryzhov:moe_postponed_const
Open

[TRANSFORMATIONS] Remove postponed_constant w/a in FuseMOEExperts#36538
mryzhov wants to merge 11 commits into
openvinotoolkit:masterfrom
mryzhov:moe_postponed_const

Conversation

@mryzhov

@mryzhov mryzhov commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Details:

Fixes https://jira.devtools.intel.com/browse/CVS-182143 and https://jira.devtools.intel.com/browse/CVS-181151 should allow converting models with MoE experts without OOM errors. Therefore, we can remove setting the "postponed_constant" attribute on the v0::Concat node in the test model construction, aligning the test with the updated transformation logic.

Tickets:

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

@mryzhov mryzhov requested a review from a team as a code owner June 23, 2026 14:54
@github-actions github-actions Bot added the category: transformations OpenVINO Runtime library - Transformations label Jun 23, 2026
@mryzhov mryzhov requested a review from Copilot June 24, 2026 09:22
@mryzhov mryzhov self-assigned this Jun 24, 2026
@mryzhov mryzhov requested a review from mmikolajcz June 24, 2026 09:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the FuseMOEExperts transformation and its unit test to remove the previous postponed_constant workaround, aligning the expected graph construction with the updated transformation behavior and aiming to prevent OOM during MoE expert weight fusion.

Changes:

  • Removed the postponed_constant + disable_constant_folding workaround from FuseMOEExperts fused-weight construction.
  • Updated the fuse_moe_test.cpp reference model to build fused expert weights via per-expert Unsqueeze + Concat, without setting postponed_constant.
  • Minor formatting-only adjustments in extract_subgraph.cpp.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/common/transformations/tests/common_optimizations/fuse_moe_test.cpp Updates reference model construction to match new MoE fused-weight graph (no postponed_constant, uses Unsqueeze + Concat).
src/common/transformations/src/transformations/utils/extract_subgraph.cpp Formatting-only line wrapping changes.
src/common/transformations/src/transformations/common_optimizations/fuse_moe_experts.cpp Removes postponed-constant workaround logic from MoE expert weight fusion.

@mryzhov mryzhov requested a review from Copilot June 29, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment on lines +399 to 403
auto fused = op_util::make_try_fold<v0::Concat>(inputs, 0);

if (needs_decompress) {
auto convert = std::make_shared<v0::Convert>(fused, target_type);
ov::mark_as_decompression(convert);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: transformations OpenVINO Runtime library - Transformations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants