elixir-nx / nx

Multi-dimensional arrays (tensors) and numerical definitions for Elixir
2.66k stars 194 forks source link

Support cross-compilation for use with Nerves #1543

Closed fhunleth closed 1 month ago

fhunleth commented 1 month ago

This moves the Makefile code that queries the system type and CUDA availability under a guard for whether things are being cross-compiled. If cross-compiled, then the settings are hardcoded. This should work in non-Nerves compilation cases too, but those weren't tested.

fhunleth commented 1 month ago

Thanks!

@polvalente In case you're curious, @lawik has been working with the Whisper model and we've been collaborating on https://github.com/nerves-livebook/nerves_livebook/pull/559. Note that Whisper doesn't work on that PR due to a lack of ffmpeg, but much simpler use seems to be working.