Skip to content

Commit a8fa7e9

Browse files
committed
feat(s032): exla declared runtime: false so the release can carry it in :load mode
Mix refuses exla: :load while trinity's applications list depends on it (package run 35603384655). Out of the applications list, exla is on the code path, started on demand by Bumblebee.exla/0 in every environment, and the release loads it without starting it. Signed-off-by: Ayla Croft <aylacroft@proton.me>
1 parent fa019cf commit a8fa7e9

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎mix.exs‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ defmodule Trinity.MixProject do
4747
[
4848
desktop: [
4949
steps: [:assemble, &Burrito.wrap/1],
50-
# Slice 032: exla is loaded, not started, in the release. Its application start
51-
# loads the NIF, and in Burrito's musl ERTS on Linux that load fails
52-
# (`__libc_single_threaded: symbol not found`, package run 35600216451), which took
53-
# the whole release down at boot. `Trinity.Memory.Embedders.Bumblebee.exla/0`
54-
# starts it on demand and a failure is the tier off with that reason, not a crash.
55-
# On a Windows host exla is not declared at all (`exla_deps/0`).
50+
# Slice 032: exla in the release, loaded and not started (see `exla_deps/0`); on a
51+
# Windows host it is not declared at all.
5652
applications: exla_release_applications(),
5753
burrito: [
5854
targets: [
@@ -103,6 +99,14 @@ defmodule Trinity.MixProject do
10399
# `{:off, :no_local_backend}`, and the semantic tier is off until a Windows backend exists
104100
# (NOTES decision 3). The lock file carries exla either way; `mix deps.get` leaves an
105101
# undeclared lock entry alone.
102+
#
103+
# `runtime: false`: exla is compiled and on the code path but not in this application's
104+
# `applications`, so nothing starts it at boot; the release carries it in `:load` mode
105+
# (`exla_release_applications/0`, which Mix accepts only because no application in the
106+
# release depends on it) and `Trinity.Memory.Embedders.Bumblebee.exla/0` starts it on
107+
# demand. Its start loads the NIF, and in Burrito's musl ERTS on Linux that load fails
108+
# (`__libc_single_threaded: symbol not found`, package run 35600216451); started at boot
109+
# it took the whole release down, started on demand it is the tier's reason.
106110
defp exla_release_applications do
107111
case :os.type() do
108112
{:win32, _} -> []
@@ -113,7 +117,7 @@ defmodule Trinity.MixProject do
113117
defp exla_deps do
114118
case :os.type() do
115119
{:win32, _} -> []
116-
_ -> [{:exla, "~> 0.13.1"}]
120+
_ -> [{:exla, "~> 0.13.1", runtime: false}]
117121
end
118122
end
119123

0 commit comments

Comments
 (0)