Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Linux ARM64 bindings (as with Mac ARM64, no prebuilt available) #79

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tc-wolf
Copy link

@tc-wolf tc-wolf commented May 12, 2021

  • Had to change some i8 -> std::os::raw::c_char for c char arrays
  • Add bindgen output for linux arm64
  • Started on compiling from scratch, though might want to abandon this part.
    • Main motivation is that no prebuilt bindings available, though compiling ORT here might not be the right place(?).

I've tested this out in a private repo, and the bindings work on arm64 on linux. When I started the fork, onnxruntime-rs was on 0.0.11, so might need some cleanup.

This was built against v1.6.0 of the ONNX runtime.

tc-wolf and others added 7 commits April 23, 2021 00:21
Has to point to OS / platform-specific versions.
Pointer to i8 is platform-specific, this should let onnxruntime compile
on aarch64 with the generated bindings.
Use c_char here as well.
This is WIP but want to make sure committed and pushed to branch so that
can resume work on this later.
* Update bindgen config to use `usize`

* Update macOS bindings

* Update Linux bindings

* Update Windows (x86_64) bindings

* Update Windows (x86) bindings

* Use `usize` instead of `u64`

* Use conditional function calling conventions

* Re-enable CI for Windows 32bit

* Fix CI matrix

* Add generated bindings for Apple M1

* On macOS Big Sur, homebrew installs to /opt/homebrew instead of /usr/local, adapt installation notes

* Feature is 'generate-bindings', not 'bindgen'. Change error message

* Add more paths to include directory, required when compilling and installing from source

* Formatting

* Compilation notes: environment variable was changed to 'ORT_LIB_LOCATION' (from 'ONNXRUNTIME_INSTALL_DIR')

* Add entry to changelog

* Add macOS aarch64 to README

* Add note about LD_LIBRARY_PATH in README

* Add a VSCode config to run clippy and format on save

* Clippy: Allow upper case acronyms, names coming from specific ML models

* Fix clippy lint: Change 'Into' impls to 'From'

* Add ORT_LIB_LOCATION note in readme for 'ORT_STRATEGY=system'

* Update changelog following nbigaouette#70

* Update macos/aarch64 bindings following nbigaouette#70

* Formatting

* Upgrade 'ndarray' to 0.15 (from 0.13)

* Upgrade 'ureq' to 2.1 (from 1.5)

* Add changelog entries

* Clippy: Box the larse ureq::Error in OrtDownloadError

* Release v0.0.12

* Return an Err on shape mismatch instead of panic

This way we let the user of the library decide how to handle the issue.

Co-authored-by: krazijames <krazijames@gmail.com>
Co-authored-by: Nicolas Bigaouette <nbigaouette@gmail.com>
Co-authored-by: Keith Lohnes <lohnesk@gmail.com>
@tc-wolf tc-wolf changed the title [WIP] Linux ARM64 bindings (as with Mac ARM64, no prebuilt available) Linux ARM64 bindings (as with Mac ARM64, no prebuilt available) Jun 8, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant