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

Method ExecuteAndTransfer

tensorflow/compiler/xla/client/client.cc:166–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166StatusOr<Literal> Client::ExecuteAndTransfer(
167 const XlaComputation& computation, absl::Span<GlobalData* const> arguments,
168 const ExecutionOptions* execution_options,
169 ExecutionProfile* execution_profile) {
170 TF_ASSIGN_OR_RETURN(
171 std::unique_ptr<GlobalData> data,
172 Execute(computation, arguments, execution_options, execution_profile));
173
174 absl::optional<Shape> shape_with_output_layout;
175 if (execution_options && execution_options->has_shape_with_output_layout()) {
176 shape_with_output_layout =
177 Shape(execution_options->shape_with_output_layout());
178 }
179 return Transfer(*data, shape_with_output_layout.has_value()
180 ? &(*shape_with_output_layout)
181 : nullptr);
182}
183
184StatusOr<Literal> Client::ComputeConstant(const XlaComputation& computation,
185 const Layout* output_layout) const {

Callers 2

TESTFunction · 0.45
mainFunction · 0.45

Calls 4

TF_ASSIGN_OR_RETURNFunction · 0.50
ExecuteFunction · 0.50
ShapeFunction · 0.50
has_valueMethod · 0.45

Tested by 1

TESTFunction · 0.36