Skip to content

Add EXLA to enable use of at least CPU-based ML #559

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/rpi4.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ config :vintage_net,
]

config :delux, indicators: %{default: %{green: "ACT"}}

config :nx, default_backend: EXLA.Backend
2 changes: 2 additions & 0 deletions config/rpi5.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ config :delux, indicators: %{default: %{green: "ACT"}}
# The RPi5 doesn't support WPA3 yet, but it also doesn't fail with the generic
# configuration. This will enable WPA3 support when it's available.
config :vintage_net_wifi, :quick_configure, &VintageNetWiFi.Cookbook.generic/2

config :nx, default_backend: EXLA.Backend
8 changes: 8 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ defmodule NervesLivebook.MixProject do

# See the BlueHeron repository for the boards that it supports.
@ble_targets [:rpi0, :rpi3, :rpi3a]
@xla_targets [:rpi4, :rpi5]

# Instruct the compiler to create deterministic builds to minimize
# differences between firmware versions. This helps delta firmware update
# compression.
System.put_env("ERL_COMPILER_OPTIONS", "deterministic")

if Mix.target() in @xla_targets do
System.put_env("XLA_TARGET_PLATFORM", "aarch64-linux-gnu")
end

def project do
[
app: @app,
Expand Down Expand Up @@ -111,6 +116,9 @@ defmodule NervesLivebook.MixProject do
{:vega_lite, "~> 0.1"},
{:vintage_net_wifi, "~> 0.12.5", targets: @all_targets},
{:vintage_net_qmi, "~> 0.4.1", targets: @all_targets},
{:axon, "~> 0.7", targets: @xla_targets},
{:bumblebee, "~> 0.6", targets: @xla_targets},
{:exla, "~> 0.9", targets: @xla_targets},

# Pull in libraries that start applications, but don't automatically
# start the applications. See the release definition below.
Expand Down
Loading