Skip to content

Commit

Permalink
Bring variable assignment back
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Aug 27, 2024
1 parent 9aae105 commit 44d6410
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions exla/lib/exla/defn/buffers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,13 @@ defmodule EXLA.Defn.Buffers do
case data do
%EXLA.Backend{buffer: %EXLA.DeviceBuffer{ref: ref} = buffer}
when node(ref) != node() ->
try do
:erpc.call(node(ref), EXLA.DeviceBuffer, :read, [buffer])
catch
:error, {:exception, reason, stacktrace} ->
reraise Exception.normalize(:error, reason, stacktrace), stacktrace
end
binary =
try do
:erpc.call(node(ref), EXLA.DeviceBuffer, :read, [buffer])
catch
:error, {:exception, reason, stacktrace} ->
reraise Exception.normalize(:error, reason, stacktrace), stacktrace
end

EXLA.BinaryBuffer.from_binary(binary, to_typespec(tensor))

Expand Down

0 comments on commit 44d6410

Please sign in to comment.