Skip to content

CPU: fallback to FP32 when FP16 Softmax is unsupported#33441

Open
VaishnaviOnPC wants to merge 4 commits intoopenvinotoolkit:masterfrom
VaishnaviOnPC:fix-softmax-fp16-cpu
Open

CPU: fallback to FP32 when FP16 Softmax is unsupported#33441
VaishnaviOnPC wants to merge 4 commits intoopenvinotoolkit:masterfrom
VaishnaviOnPC:fix-softmax-fp16-cpu

Conversation

@VaishnaviOnPC
Copy link

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:

@VaishnaviOnPC VaishnaviOnPC requested review from a team as code owners January 2, 2026 19:25
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Jan 2, 2026
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Jan 2, 2026
@maxnick
Copy link
Contributor

maxnick commented Jan 5, 2026

@nshchego , could you please review?

@nshchego
Copy link
Contributor

Please add appropriate test case

@VaishnaviOnPC
Copy link
Author

I have added the test, please review.

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}, {});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

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, {});
}
}

?

Copy link
Author

Choose a reason for hiding this comment

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

Hi, I tried the suggestion. All the tests passed. I have made the commit with this change applied.

@maxnick maxnick requested a review from nshchego February 23, 2026 11:01
@maxnick maxnick added this to the 2026.1 milestone Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CPU OpenVINO CPU plugin ExternalPR External contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants