EXLA compile fails

Trying to follow Jose’s video on Announcing Livebook (with Axon). The very first Elixir cell introducing the dependencies fails on EXLA compilation. Here’s the message:

**warning: got "@impl true" for function __jit__/4 but no behaviour specifies such callback. There are no known callbacks, please specify the proper @behaviour and make sure it defines callbacks**
**  lib/exla.ex:353: EXLA (module)**

**warning: got "@impl true" for function __stream__/6 but no behaviour specifies such callback. There are no known callbacks, please specify the proper @behaviour and make sure it defines callbacks**
**  lib/exla.ex:356: EXLA (module)**

**== Compilation error in file lib/exla/defn/stream.ex ==**
**** (ArgumentError) could not load module Nx.Stream due to reason :unavailable**
**    (elixir 1.13.2) lib/protocol.ex:315: Protocol.assert_protocol!/2**
**    lib/exla/defn/stream.ex:60: (module)**
**could not compile dependency :exla, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile exla", update it with "mix deps.update exla" or clean it with "mix deps.clean exla"**

I’m using: Elixir 1.13.2 & Livebook 0.5.2 on Fedora-35.

Thanks! :smiley:

1 Like

Hi there,

Here’s the compile log with more lines before the error.
It seems the compiler cann’t find Nx.Defn.Compiler, whereas I’ve got this in mix.exs:

  defp deps do
    [
      {:exla, "~> 0.1.0-dev", github: "elixir-nx/nx", sparse: "exla"},
      {:nx, "~> 0.1.0-dev", github: "elixir-nx/nx", spasre: "nx", override: true},
      {:axon, "~> 0.1.0-dev", github: "elixir-nx/axon"}
    ]
  end

====

Compiling 21 files (.ex)
warning: @behaviour Nx.Defn.Compiler does not exist (in module EXLA)
lib/exla.ex:1: EXLA (module)

warning: got “@impl true” for function jit/4 but no behaviour specifies such callback. There are no known callbacks, please specify the proper @behaviour and make sure it defines callbacks
lib/exla.ex:353: EXLA (module)

warning: got “@impl true” for function stream/6 but no behaviour specifies such callback. There are no known callbacks, please specify the proper @behaviour and make sure it defines callbacks
lib/exla.ex:356: EXLA (module)

== Compilation error in file lib/exla/defn/stream.ex ==
** (ArgumentError) could not load module Nx.Stream due to reason :unavailable
(elixir 1.13.3) lib/protocol.ex:315: Protocol.assert_protocol!/2
lib/exla/defn/stream.ex:60: (module)
could not compile dependency :exla, “mix compile” failed. Errors may have been logged above. You can recompile this dependency with “mix deps.compile exla”, update it with “mix deps.update exla” or clean it with “mix deps.clean exla”

Hope this makes it more clear

Thanks :smiley: (

1 Like

In the EXLA readme “At the moment you will have to use a Git dependency while we work on our first release:”. Hope this helps.

2 Likes

Thanks. I understand.

1 Like

There is a typo in your deps. The word “sparse” is wrong!

3 Likes