CPU: fallback to FP32 when FP16 Softmax is unsupported#33441
Open
VaishnaviOnPC wants to merge 4 commits intoopenvinotoolkit:masterfrom
Open
CPU: fallback to FP32 when FP16 Softmax is unsupported#33441VaishnaviOnPC wants to merge 4 commits intoopenvinotoolkit:masterfrom
VaishnaviOnPC wants to merge 4 commits intoopenvinotoolkit:masterfrom
Conversation
Contributor
|
@nshchego , could you please review? |
Contributor
|
Please add appropriate test case |
Author
|
I have added the test, please review. |
praasz
reviewed
Feb 23, 2026
Comment on lines
+138
to
+146
| for (auto format : getAvailableFormatsForDims(inShape)) { | ||
| auto in_candidate = std::make_shared<DnnlBlockedMemoryDesc>(inShape, fallbackType, format); | ||
|
|
||
| if (in_candidate->blocksExtended()) { | ||
| continue; | ||
| } | ||
|
|
||
| createDescriptor({in_candidate}, {}); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| for (auto format : getAvailableFormatsForDims(inShape)) { | |
| auto in_candidate = std::make_shared<DnnlBlockedMemoryDesc>(inShape, fallbackType, format); | |
| if (in_candidate->blocksExtended()) { | |
| continue; | |
| } | |
| createDescriptor({in_candidate}, {}); | |
| } | |
| for (auto format : getAvailableFormatsForDims(inShape)) { | |
| VecMemoryDescs inputDescs{std::make_shared<DnnlBlockedMemoryDesc>(inShape, fallbackType, format)}; | |
| if (!inputDescs.back()->blocksExtended()){ | |
| createDescriptor(inputDescs, {}); | |
| } | |
| } |
?
Author
There was a problem hiding this comment.
Hi, I tried the suggestion. All the tests passed. I have made the commit with this change applied.
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:
FP16 Softmax on CPU may fail with "Supported primitive descriptors list is empty" when Softmax is a model output.
This change retries descriptor creation using FP32 when FP16 is requested but unsupported by oneDNN.
Tested locally with a minimal FP16 ONNX Softmax model on CPU.
Tickets: