Commit 7f6b2a99 authored by Todd Wang's avatar Todd Wang Committed by TensorFlower Gardener
Browse files

[TF:XLA] Reduce boilerplate in ComputationBuilder op implementations.

This makes the code a bit easier to read, and less likely we'll accidentally
forget to set common fields for any new ops. A similar pattern is used for every
op:

  ComputationDataHandle ComputationBuilder::Foo(...) {
    OpRequest op_request;
    FooRequest* request = op_request.mutable_foo_request();
    // ... fill in specific request ...
    return RunOpAndParseResponse(&op_request);
  }

No functional changes.

PiperOrigin-RevId: 181415608
parent 1e934ece
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment