zeam-vm / pelemay_backend_bak

An integrated lightweight tensor backend for Nx.
Apache License 2.0
6 stars 0 forks source link

For Nx 0.4.0 #38

Open zacky1972 opened 1 year ago

zacky1972 commented 1 year ago
warning: function init/1 required by behaviour Nx.Backend is not implemented (in module PelemayBackend.Backend)
  lib/pelemay_backend/backend.ex:1: PelemayBackend.Backend (module)

warning: Nx.BinaryBackend.svd/3 is undefined or private
  lib/pelemay_backend/backend.ex:263: PelemayBackend.Backend.svd/3
  1) doctest Nx.weighted_mean/3 (578) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6935: (test)

..................................................................................

  2) doctest Nx.weighted_mean/3 (574) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6907: (test)

.......................................................................................

  3) doctest Nx.weighted_mean/3 (576) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6921: (test)

...................................................................................................

  4) doctest Nx.weighted_mean/3 (579) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6946: (test)

........

  5) doctest Nx.median/2 (266) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx/tensor.ex:91: Nx.Tensor.fetch_axes/2
       (nx 0.4.2) lib/nx/tensor.ex:61: Nx.Tensor.fetch/2
       (elixir 1.14.2) lib/access.ex:288: Access.get/3
       (nx 0.4.2) lib/nx.ex:7179: Nx.median/2
       (for doctest at) deps/nx/lib/nx.ex:7079: (test)

........................................................................................................

  6) doctest Nx.weighted_mean/3 (575) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6913: (test)

......................................................

  7) test multiply scalar and vector (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:10
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     code: assert Nx.multiply(2.0, Nx.tensor([1.0, 2.0], type: {:f, 32})) ==
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       test/pelemay_backend/backend_test.exs:11: (test)

..........................................................................................................

  8) doctest Nx.weighted_mean/3 (577) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6927: (test)

.................................

  9) doctest Nx.weighted_mean/3 (582) (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:228
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       (nx 0.4.2) lib/nx.ex:7037: Nx.weighted_mean/3
       (for doctest at) deps/nx/lib/nx.ex:6980: (test)

.......

 10) test multiply scalar and vector(1000) (PelemayBackendTest)
     test/pelemay_backend_test.exs:7
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     code: assert result == PelemayBackend.jit_apply(fun, [2.0, input])
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       test/pelemay_backend_test.exs:11: (test)
zacky1972 commented 1 year ago

Almost issues fixed (working branch is issue/38):

% mix test
make: Nothing to be done for `all'.
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

  1) test multiply scalar and vector (PelemayBackend.BackendTest)
     test/pelemay_backend/backend_test.exs:10
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     code: assert Nx.multiply(2.0, Nx.tensor([1.0, 2.0], type: {:f, 32})) ==
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       test/pelemay_backend/backend_test.exs:11: (test)

...................................................................

  2) test multiply scalar and vector(1000) (PelemayBackendTest)
     test/pelemay_backend_test.exs:7
     ** (RuntimeError) the local variable 0 should be a tuple in case of aloadt
     code: assert result == PelemayBackend.jit_apply(fun, [2.0, input])
     stacktrace:
       (pelemay_backend 0.1.0-dev) lib/pelemay_backend/defn.ex:69: anonymous fn/2 in PelemayBackend.Defn.__compile__/4
       (nx 0.4.2) lib/nx/defn.ex:457: Nx.Defn.do_jit_apply/3
       test/pelemay_backend_test.exs:11: (test)

Finished in 1.5 seconds (0.00s async, 1.5s sync)
594 doctests, 2 tests, 2 failures

Randomized with seed 879370