Skip to content

Nx.Serving.batched_run not working - always hangs #93

@GenericJam

Description

@GenericJam

I could not get batched_run to work under any circumstances using EMLX. I had to use Nx.Serving.run instead.

To reproduce, run this notebook - https://hexdocs.pm/bumblebee/stable_diffusion.html

Modified like this:

Mix.install([
  {:emlx, github: "elixir-nx/emlx", branch: "main"},
  {:bumblebee, github: "elixir-nx/bumblebee"},
  {:nx, "~> 0.10.0"},
  {:kino, "~> 0.18.0"}
])

Nx.global_default_backend({EMLX.Backend, device: :gpu})

With testing it hangs right at the spot where batched_run is called. The EMLX readme describes a potential NIF deadlock under some circumstances which would describe the behaviour well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions