MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Send

Method Send

tensorflow/compiler/xla/client/xla_builder.cc:2392–2405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2390}
2391
2392void XlaBuilder::Send(XlaOp operand, const ChannelHandle& handle) {
2393 ReportErrorOrReturn([&]() -> StatusOr<XlaOp> {
2394 // Send HLO takes two operands: a data operand and a token. Generate the
2395 // token to pass into the send.
2396 // TODO(b/80000000): Remove this when clients have been updated to handle
2397 // tokens.
2398 HloInstructionProto token_instr;
2399 *token_instr.mutable_shape() = ShapeUtil::MakeTokenShape().ToProto();
2400 TF_ASSIGN_OR_RETURN(XlaOp token, AddInstruction(std::move(token_instr),
2401 HloOpcode::kAfterAll, {}));
2402
2403 return SendWithToken(operand, token, handle);
2404 });
2405}
2406
2407XlaOp XlaBuilder::SendWithToken(XlaOp operand, XlaOp token,
2408 const ChannelHandle& handle) {

Callers 2

SendFunction · 0.45
ExecuteOnStreamMethod · 0.45

Calls 3

SendWithTokenFunction · 0.85
mutable_shapeMethod · 0.45
ToProtoMethod · 0.45

Tested by

no test coverage detected