Skip to content

feat: switch to onnxruntime-directml for GPU acceleration#22

Merged
gtt116 merged 1 commit into
mainfrom
feat/onnxruntime-directml
Jun 9, 2026
Merged

feat: switch to onnxruntime-directml for GPU acceleration#22
gtt116 merged 1 commit into
mainfrom
feat/onnxruntime-directml

Conversation

@gtt116

@gtt116 gtt116 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Changes

  • Replace onnxruntime with onnxruntime-directml>=1.24.0 in dependencies
  • Auto-detect DmlExecutionProvider availability in UIParser
  • Enable DirectML for both YOLO and RapidOCR inference
  • Add threading lock to protect DML inference (DirectML is not thread-safe)
  • Run OCR/YOLO sequentially when DML is active to avoid crashes
  • Update enikk.spec comment to reflect onnxruntime-directml

Testing

  • All 295 tests pass
  • Ruff lint passes
  • Verified DmlExecutionProvider is available at runtime

Fixes #16

@gtt116 gtt116 force-pushed the feat/onnxruntime-directml branch from 574d353 to 48c1f8a Compare June 9, 2026 19:59
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

✅ Build succeeded! Artifact: enikk-dev-45add4e

📥 Download artifact

@gtt116

gtt116 commented Jun 9, 2026

Copy link
Copy Markdown
Owner Author

After switching to onnxruntime-directml, on my 2070 Super GPU, the ui_parse duration from 4s to 1.1s.

@gtt116 gtt116 force-pushed the feat/onnxruntime-directml branch from 48c1f8a to 8038001 Compare June 9, 2026 20:03
- Replace onnxruntime with onnxruntime-directml>=1.24.0 in dependencies
- Auto-detect DmlExecutionProvider availability in UIParser
- Enable DirectML for both YOLO and RapidOCR inference
- Add threading lock to protect DML inference (not thread-safe)
- Run OCR/YOLO sequentially when DML is active
- Update enikk.spec comment to reflect onnxruntime-directml
@gtt116 gtt116 force-pushed the feat/onnxruntime-directml branch from 8038001 to 1a77350 Compare June 9, 2026 20:08
@gtt116 gtt116 merged commit dac4135 into main Jun 9, 2026
3 checks passed
@gtt116 gtt116 deleted the feat/onnxruntime-directml branch June 9, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Optimize OCR processing efficiency

1 participant