#include <computation_builder.h>
|
ComputationDataHandle | Parameter (int64 parameter_number, const Shape &shape, const string &name) |
| Enqueues a "retrieve parameter value" instruction to the UserComputation . More...
|
|
|
Status | PrepareComputation () |
| Populates computation_ with a valid object. Used before any given operation is enqueued. More...
|
|
Status | RunOp (OpRequest *op_request, OpResponse *op_response) |
| Run the given parameter op_request and fill in op_response . More...
|
|
ComputationDataHandle | RunOpAndParseResponse (OpRequest *op_request) |
| Call RunOp() and either return the output ComputationDataHandle (on success) or an empty ComputationDataHandle (on failure). More...
|
|
◆ Parameter()
ComputationDataHandle xla::ComputationBuilder::Parameter |
( |
int64 |
parameter_number, |
|
|
const Shape & |
shape, |
|
|
const string & |
name |
|
) |
| |
◆ PrepareComputation()
Status xla::ComputationBuilder::PrepareComputation |
( |
| ) |
|
|
private |
Populates computation_
with a valid object. Used before any given operation is enqueued.
- Check existence of stub service.
- Prepare
ComputationRequest
& ComputationResponse
objects
- Use the service recorded in
client_
to make computation.
- Use the result of step 3 to make a
Computation
object and store in member computation_
Unclear parts:
- Check on line 65
◆ RunOp()
Status xla::ComputationBuilder::RunOp |
( |
OpRequest * |
op_request, |
|
|
OpResponse * |
op_response |
|
) |
| |
|
private |
Run the given parameter op_request
and fill in op_response
.
- Call
PrepareComputation()
to populate member computation_
with a valid object.
- Set the given argument
op_request
(computation handle, metadata, sharding).
- Use
client_
to call service's method Op()
◆ RunOpAndParseResponse()
ComputationDataHandle xla::ComputationBuilder::RunOpAndParseResponse |
( |
OpRequest * |
op_request | ) |
|
|
private |
Call RunOp()
and either return the output ComputationDataHandle
(on success) or an empty ComputationDataHandle
(on failure).
- Prepare
OpResponse
object to record the result and Call RunOp()
.
- Record errors if any (error handling is postponsed to method
Build()
)
The documentation for this class was generated from the following files: