nbigaouette / onnxruntime-rs

Rust wrapper for Microsoft's ONNX Runtime (version 1.8)
Apache License 2.0
283 stars 100 forks source link

Add Apple M1 support #74

Closed nbigaouette closed 3 years ago

nbigaouette commented 3 years ago

This PR adds Apple M1 support.

Note that no pre-built microsoft/onnxruntime binaries exists for the M1 (aarch64) so it needs to be manually compiled (see ONNX_Compilation_Notes.md for some notes on that). This means one has to use ORT_STRATEGY=system and ORT_LIB_LOCATION=/path/to/onnxruntime (see README.md).

Their is no CI for this arch so it will not be tested. See https://github.com/actions/virtual-environments/issues/2187 for GitHub Actions' M1 support request.

codecov-io commented 3 years ago

Codecov Report

Merging #74 (a5e7f95) into master (1948683) will increase coverage by 1.53%. The diff coverage is 75.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   14.58%   16.11%   +1.53%     
==========================================
  Files          18       19       +1     
  Lines         960     1117     +157     
==========================================
+ Hits          140      180      +40     
- Misses        820      937     +117     
Impacted Files Coverage Δ
...untime-sys/src/generated/macos/aarch64/bindings.rs 0.00% <ø> (ø)
onnxruntime/src/session.rs 0.00% <0.00%> (ø)
onnxruntime/src/tensor/ort_tensor.rs 79.16% <75.47%> (-3.19%) :arrow_down:
onnxruntime/src/lib.rs 42.55% <84.61%> (+5.20%) :arrow_up:
onnxruntime/src/error.rs 62.50% <100.00%> (+5.35%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3b5fcd3...a5e7f95. Read the comment docs.