[GPU] Add ReduceFCDimensions transformation#36212
Open
mdvoretc-intel wants to merge 5 commits into
Open
Conversation
Lyamin-Roman
reviewed
Jun 4, 2026
|
|
||
| auto act_pshape = activations->get_output_partial_shape(0); | ||
| auto squeeze_const = | ||
| std::make_shared<ov::op::v0::Constant>(ov::element::i64, ov::Shape{3}, std::vector<int64_t>{1, -1, act_pshape[-1].get_length()}); |
Contributor
There was a problem hiding this comment.
Just in case, it's better to check that act_pshape[-1] is not dynamic and skip transformation instead of throwing an error (the same applies to shape_out[-1])
| } | ||
|
|
||
| // If the activation has a static leading dimension of 1, squeeze it. | ||
| // This is done to allow pre-selection of OCL implementations for non-IMMAD devices, reducing memory pressure. |
Contributor
There was a problem hiding this comment.
Judging by the comment, this change is only useful for non-IMMAD devices, does it make sense in the supports_immad case?
If not, then transformations_pipeline.cpp contains information about device, and transformation may be disabled in this case
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:
ReduceFCDimensionstransformation that converts 4D FullyConnected inputs to 3D when the leading dimension is a static 1ConvertWeightCompressedConv1x1ToMatmulis removed, with the new transformation pass being more generalTickets:
AI Assistance: