elixir-nx / emlx

MLX Backend for Nx
Apache License 2.0
58 stars 1 forks source link

remove `maybe_pad_binary` #20

Closed cocoa-xu closed 1 week ago

cocoa-xu commented 1 week ago

Which causes some issues with certain data types:

iex(1)> Nx.tensor([[10, 20]], type: {:u, 16}, backend: {EMLX.Backend, []})
#Nx.Tensor<
  u16[1][2]
  EMLX.Backend<cpu, 0.888734815.1661861894.78664>
  [
    [10, 0]
  ]
>