Skip to content

feat(predictor): default to ONNX on non-ARM hosts - #429

Merged
MateoLostanlen merged 1 commit into
developfrom
feat/onnx-default-off-arm
Oct 22, 2026
Merged

MateoLostanlen merged 1 commit into
developfrom
feat/onnx-default-off-arm

Conversation

@MateoLostanlen

Copy link
Copy Markdown
Member
  • NCNN is only fast on ARM. On x86 servers the engine used NCNN anyway and only logged a hint to switch to ONNX.
  • Classifier now defaults to NCNN on ARM and ONNX elsewhere. An explicit format is still honored.
  • Same model weights (v8.1.0), only the runtime changes. On an 8 vCPU Xeon, ONNX ran about 1.5x faster than NCNN in a quick benchmark.

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.46%. Comparing base (f2dd3b4) to head (a8e7835).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #429   +/-   ##
========================================
  Coverage    79.46%   79.46%           
========================================
  Files            6        6           
  Lines          852      852           
========================================
  Hits           677      677           
  Misses         175      175           
Flag Coverage Δ
unittests 79.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MateoLostanlen
MateoLostanlen requested review from fe51 and frgfm October 8, 2026 15:49
@frgfm

frgfm commented Oct 9, 2026

Copy link
Copy Markdown
Member

Interesting! Can you share more data of your benchmark to have a better informed decision?
I think we need peak RSS & latency on solobatch inference but on AMD64 with different config (your laptop + a typical VM we'd be running it on). If the 1.5x stays on both, it's a huge bonus. I just want to make sure we consider more likely potential bias here 👍

Excellent initiative either way! I can also open the opportunity to have different docker depending on the target architecture (NCNN installed when ARM, onnx when AMD64)

@MateoLostanlen

Copy link
Copy Markdown
Member Author

Thanks @frgfm ! I measured the 1.5x while setting up the engine on the Argentinian VM, but honestly that's not really the point here. The code already logged that ONNX is recommended on non ARM hosts and kept NCNN anyway, so this just follows that advice.
Nothing changes on ARM, so all Pi deployments keep NCNN. Only x86 hosts (VMs, dev machines) switch to ONNX.
Agreed on per architecture images, I'd keep that for a follow up PR

@MateoLostanlen
MateoLostanlen merged commit d80a688 into develop Oct 22, 2026
11 checks passed
@MateoLostanlen
MateoLostanlen deleted the feat/onnx-default-off-arm branch October 22, 2026 08:48
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.

2 participants