-
Notifications
You must be signed in to change notification settings - Fork 285
Open
Description
Hello,
I trained the D-FINE nano model on a custom dataset and exported it to ONNX using the provided export_onnx.py.
Inference results:
- ✅ CPU execution provider → correct
- ✅ CUDA execution provider → correct
- ❌ DirectML execution provider → extremely low confidences (~0.05), incorrect bounding box sizes and some operations fallback to the CPU
I used the provided C++ ONNX Runtime example (onnxExample.cpp), adding DirectML with:
OrtGetApiBase()->GetApi(ORT_API_VERSION)->GetExecutionProviderApi("DML", ORT_API_VERSION, reinterpret_cast<const void**>(&m_dmlApi));
m_dmlApi->SessionOptionsAppendExecutionProvider_DML(session_options, 0);What I tried:
- Disabled ONNX Runtime optimizations → same wrong results.
- Exported with fixed input size (no dynamic axes), opset 17 → model runs fully on GPU (no CPU fallback), still wrong results.
- Exported without postprocessing → same issue.
So far it looks like DirectML produces incorrect outputs even though CPU/CUDA inference works fine.
Is this a known issue with the model/export, or with ONNX Runtime + DirectML?
Would other models as RF-DETR or DT-DETR work with DirectML?
Any guidance would be appreciated.
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

