Open mofeing opened 1 week 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?
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:
IfrtComputationClient
CreateDataPlaceholder
GetDataShards
,GetDataShard
GetPjRtBuffer
~ not implementedCompile
ExecuteComputation
GetNumDevices
GetDefaultDevice
GetNumProcesses
ComputationClient::Data
andIfrtComputationClient::IfrtData
?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