EnzymeAD / Reactant.jl

MIT License
58 stars 5 forks source link

IFRT tracking issue #176

Open mofeing opened 1 week ago

mofeing commented 1 week ago

Based on https://github.com/pytorch/xla/blob/master/torch_xla/csrc/runtime/ifrt_computation_client.h, we might be interested in implementing some functions similar to the following C++ methods in ReactantExtra:

Also it might be interesting to get some ideas for abstracting both PjRt and IFRT structures into one common interface by looking to https://github.com/pytorch/xla/blob/master/torch_xla/csrc/runtime/computation_client.h

Steps

  1. Get some IFRT buffer object and move data in and out of it
  2. Compile sth with this buffer
mofeing commented 6 days ago

@wsmoses A question about ReactantExtra's C-API: when the C++ API returns a absl::StatusOr, we sometimes unwrap the value manually, set an error inout argument and return a pointer; and other times we just call xla::ValueOrThrow. When should we use each?