elixir-nx / ortex

ONNX Runtime bindings for Elixir
MIT License
126 stars 15 forks source link

upgrading to ort 2.0.0-rc.2, onnxruntime 1.17.3 #28

Open michaelbearne opened 5 months ago

michaelbearne commented 5 months ago

Hi

I had an issue getting the Ortex compiled in a Docker container, and then an issue running the tests on a Mac, which I thought might have been caused by downloading the Onnx runtime shared libraries.

So, I tried upgrading to the latest Rustler and Ortex. With these updates, I don't seem to need the libs copy workaround in lib/vortex/native.ex as now one lib is created. I have only tested this on Mac and Linux without Cuda.

The issue with not working on Mac was the Statically linking to CoreML bindings needing the link flag
"-C link-arg=-fapple-link-rtlib" according to the Ort docs.

The docker compile was a path issue with cargo, which I only figured out after updating the dependencies.

gregszumel commented 5 months ago

Hey @michaelbearne -- thanks for this PR!

I tried running mix test on my machine and had some lib-not-found issues, so maybe ort is changing the way it handles downloading libraries between rc-0 and rc-2?

I think we'll unfortunately need to hold off on merging this into main for now, at least until ort's API is more settled, or until I get more capacity to debug why I'm getting those errors.