[TRANSFORMATIONS] Remove postponed_constant w/a in FuseMOEExperts#36538
Open
mryzhov wants to merge 11 commits into
Open
[TRANSFORMATIONS] Remove postponed_constant w/a in FuseMOEExperts#36538mryzhov wants to merge 11 commits into
mryzhov wants to merge 11 commits into
Conversation
Contributor
There was a problem hiding this comment.
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_foldingworkaround fromFuseMOEExpertsfused-weight construction. - Updated the
fuse_moe_test.cppreference model to build fused expert weights via per-expertUnsqueeze+Concat, without settingpostponed_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. |
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 thev0::Concatnode in the test model construction, aligning the test with the updated transformation logic.Tickets:
AI Assistance: