Skip to content
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

Remove EXLA Precompiled #8

Merged
merged 1 commit into from
Feb 21, 2022
Merged

Remove EXLA Precompiled #8

merged 1 commit into from
Feb 21, 2022

Conversation

seanmor5
Copy link
Contributor

No longer necessary with the XLA extension :)

No longer necessary with the XLA extension :)
@wojtekmach wojtekmach merged commit 1767f43 into wojtekmach:main Feb 21, 2022
@wojtekmach
Copy link
Owner

Excellent, thank you! :D

@seanmor5 seanmor5 deleted the patch-1 branch February 21, 2022 16:27
@wojtekmach
Copy link
Owner

% elixir exla.exs
warning: module attribute @defn_compiler was set but never used
  exla.exs:9

#Nx.Tensor<
  f32[2][2]
  [
    [0.032058604061603546, 0.08714432269334793],
    [0.23688282072544098, 0.6439142227172852]
  ]
>

is the warning legit? Or it's a Mix.install quirk maybe?

@seanmor5
Copy link
Contributor Author

@wojtekmach Oh I know where that's from, I will open another PR!

@wojtekmach
Copy link
Owner

wojtekmach commented Mar 22, 2022

@seanmor5 fyi: I noticed this today:

% elixir exla.exs

11:30:57.424 [warning] The on_load function for module Elixir.EXLA.NIF returned:
{:error,
 {:load_failed,
  'Failed to load NIF library: \'dlopen(/Users/wojtek/.cache/mix/installs/elixir-1.14.0-dev-erts-13.0/d138a9da4197c536f64d574bf01d2a9c/_build/dev/lib/exla/priv/libexla.so, 0x0002): Library not loaded: @loader_path/lib/libxla_extension.so\n  Referenced from: /Users/wojtek/.cache/mix/installs/elixir-1.14.0-dev-erts-13.0/d138a9da4197c536f64d574bf01d2a9c/deps/exla/exla/cache/libexla.so\n  Reason: tried: \'/Users/wojtek/.cache/mix/installs/elixir-1.14.0-dev-erts-13.0/d138a9da4197c536f64d574bf01d2a9c/deps/exla/exla/cache/lib/libxla_extension.so\' (no such file), \'/usr/local/lib/libxla_extension.so\' (no such file), \'/usr/lib/libxla_extension.so\' (no such file)\''}}


11:30:57.424 [notice] Application exla exited: EXLA.Application.start(:normal, []) returned an error: shutdown: failed to start child: EXLA.Logger
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function EXLA.NIF.start_log_sink/1 is undefined (module EXLA.NIF is not available)
            (exla 0.1.0-dev) EXLA.NIF.start_log_sink(#PID<0.181.0>)
            (exla 0.1.0-dev) lib/exla/logger.ex:12: EXLA.Logger.init/1
            (stdlib 4.0) gen_server.erl:430: :gen_server.init_it/2
            (stdlib 4.0) gen_server.erl:397: :gen_server.init_it/6
            (stdlib 4.0) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
** (UndefinedFunctionError) function EXLA.__jit__/4 is undefined or private, but the behaviour Nx.Defn.Compiler expects it to be present. Did you mean:

      * __jit__/5

    (exla 0.1.0-dev) EXLA.__jit__(#Function<0.97003411/1 in Foo.softmax/1>, [#Nx.Tensor<
    s64[2][2]
    [
      [1, 2],
      [3, 4]
    ]
  >], #Function<2.92604979/1 in Nx.Defn.Compiler.__runtime__/2>, [])
    exla.exs:16: (file)
    (elixir 1.14.0-dev) lib/code.ex:1228: Code.require_file/2

when I change nx and exla to both be GitHub dependencies, I'm getting:

Generated exla app

11:30:41.396 [warning] The on_load function for module Elixir.EXLA.NIF returned:
{:error,
 {:load_failed,
  'Failed to load NIF library: \'dlopen(/Users/wojtek/.cache/mix/installs/elixir-1.14.0-dev-erts-13.0/40cd290807bca422cd49d8b6dd3b9b8b/_build/dev/lib/exla/priv/libexla.so, 0x0002): Library not loaded: @loader_path/lib/libxla_extension.so\n  Referenced from: /Users/wojtek/.cache/mix/installs/elixir-1.14.0-dev-erts-13.0/40cd290807bca422cd49d8b6dd3b9b8b/deps/exla/exla/cache/libexla.so\n  Reason: tried: \'/Users/wojtek/.cache/mix/installs/elixir-1.14.0-dev-erts-13.0/40cd290807bca422cd49d8b6dd3b9b8b/deps/exla/exla/cache/lib/libxla_extension.so\' (no such file), \'/usr/local/lib/libxla_extension.so\' (no such file), \'/usr/lib/libxla_extension.so\' (no such file)\''}}


11:30:41.396 [notice] Application exla exited: EXLA.Application.start(:normal, []) returned an error: shutdown: failed to start child: EXLA.Logger
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function EXLA.NIF.start_log_sink/1 is undefined (module EXLA.NIF is not available)
            (exla 0.1.0-dev) EXLA.NIF.start_log_sink(#PID<0.669.0>)
            (exla 0.1.0-dev) lib/exla/logger.ex:12: EXLA.Logger.init/1
            (stdlib 4.0) gen_server.erl:430: :gen_server.init_it/2
            (stdlib 4.0) gen_server.erl:397: :gen_server.init_it/6
            (stdlib 4.0) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
** (exit) exited in: GenServer.call(EXLA.Client, {:client, :host, [platform: :host]}, :infinity)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.14.0-dev) lib/gen_server.ex:1024: GenServer.call/3
    (exla 0.1.0-dev) lib/exla/defn.ex:223: EXLA.Defn.__jit__/5
    (nx 0.1.0) lib/nx/defn/compiler.ex:235: Nx.Defn.Compiler.__runtime__/2
    exla.exs:16: (file)

please let me know if I can help debugging, should report the issue elsewhere, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants