Skip to content

fix: disable oneDNN/mkldnn by default on Windows CPU - #18340

Closed
grloper wants to merge 1 commit into
PaddlePaddle:mainfrom
grloper:fix/disable-mkldnn-windows-cpu
Closed

grloper wants to merge 1 commit into
PaddlePaddle:mainfrom
grloper:fix/disable-mkldnn-windows-cpu

Conversation

@grloper

@grloper grloper commented Sep 1, 2026

Copy link
Copy Markdown

Summary

PaddlePaddle 3.3+ crashes on Windows CPU during inference with:

NotImplementedError: (Unimplemented) ConvertPirAttribute2RuntimeAttribute not support [pir::ArrayAttribute<pir::DoubleAttribute>]

This is the known oneDNN/PIR executor bug tracked upstream in PaddlePaddle/Paddle#77340 and PaddleOCR#17869.

Root cause

\DEFAULT_ENABLE_MKLDNN = True\ means on Windows CPU, paddlex enables oneDNN (mkldnn run_mode), which hits the broken PIR conversion path in PaddlePaddle 3.3+.

Fix

Set \DEFAULT_ENABLE_MKLDNN = False\ on \win32\ only. Other platforms keep the existing behavior, and users can still opt in explicitly with \PaddleOCR(enable_mkldnn=True).

Verification

Tested on Windows 11 / Python 3.13 / PaddlePaddle 3.3.1 / PaddleOCR 3.7.0: CPU inference now completes without the crash.

Related

PaddlePaddle 3.3+ PIR executor crashes on Windows CPU during inference
with: NotImplementedError: (Unimplemented) ConvertPirAttribute2RuntimeAttribute
not support [pir::ArrayAttribute<pir::DoubleAttribute>].

This happens because DEFAULT_ENABLE_MKLDNN=True, and paddlex enables
oneDNN when the run_mode contains mkldnn. Disable mkldnn by default on
win32 so out-of-the-box CPU inference works; other platforms keep the
existing behavior, and users can still opt in with
PaddleOCR(enable_mkldnn=True).

Refs: PaddlePaddle/Paddle#77340
      #17869
@CLAassistant

CLAassistant commented Sep 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@grloper grloper closed this by deleting the head repository Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants