Home
last modified time | relevance | path

Searched refs:XlaResource (Results 1 – 21 of 21) sorted by relevance

/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_resource.cc30 /*static*/ absl::string_view XlaResource::KindToString(XlaResource::Kind kind) { in KindToString()
32 case XlaResource::kInvalid: in KindToString()
34 case XlaResource::kVariable: in KindToString()
36 case XlaResource::kStack: in KindToString()
38 case XlaResource::kTensorArray: in KindToString()
43 /*static*/ std::unique_ptr<XlaResource> XlaResource::CreateStack( in CreateStack()
45 return absl::make_unique<XlaResource>( in CreateStack()
46 XlaResource::kStack, /*arg_num=*/-1, std::move(name), type, TensorShape(), in CreateStack()
53 /*static*/ std::unique_ptr<XlaResource> XlaResource::CreateTensorArray( in CreateTensorArray()
56 return absl::make_unique<XlaResource>( in CreateTensorArray()
[all …]
Dxla_resource.h31 class XlaResource {
42 static std::unique_ptr<XlaResource> CreateStack(string name, DataType type,
46 static std::unique_ptr<XlaResource> CreateTensorArray(
50 XlaResource(Kind kind, int arg_num, string name, DataType type,
56 XlaResource(const XlaResource&) = delete;
57 XlaResource(XlaResource&&) = delete;
58 XlaResource& operator=(const XlaResource&) = delete;
59 XlaResource& operator=(XlaResource&&) = delete;
120 XlaResource** gradient_out);
159 const std::map<string, std::unique_ptr<XlaResource>>& tensor_array_gradients() in tensor_array_gradients()
[all …]
Dxla_context.h68 XlaResource* AddResource(std::unique_ptr<XlaResource> resource);
70 const std::vector<std::unique_ptr<XlaResource>>& resources() { in resources()
111 std::vector<std::unique_ptr<XlaResource>> resources_;
Dxla_expression.h75 static XlaExpression Resource(XlaResource* resource);
86 XlaResource* resource() const { return resource_; } in resource()
120 XlaResource* resource_ = nullptr;
Dxla_expression_test.cc44 resource_ = absl::make_unique<XlaResource>( in SetUp()
45 XlaResource::kVariable, /*arg_num=*/0, /*name=*/string("avariable"), in SetUp()
56 std::unique_ptr<XlaResource> resource_;
Dxla_op_kernel.cc374 XlaResource* variable = expression->resource(); in ReadVariableInputTensor()
376 TF_RET_CHECK(variable->kind() == XlaResource::kVariable); in ReadVariableInputTensor()
424 XlaResource* variable = expression->resource(); in GetVariableTypeAndShape()
426 TF_RET_CHECK(variable->kind() == XlaResource::kVariable); in GetVariableTypeAndShape()
496 void XlaOpKernelContext::SetResourceOutput(int index, XlaResource* resource) { in SetResourceOutput()
500 Status XlaOpKernelContext::GetResourceInput(int index, XlaResource** resource) { in GetResourceInput()
514 XlaResource* variable = expression->resource(); in AssignVariableTensor()
516 TF_RET_CHECK(variable->kind() == XlaResource::kVariable); in AssignVariableTensor()
Dxla_compiler.cc161 const std::vector<std::unique_ptr<XlaResource>>& resources, in BuildComputation()
245 std::vector<const XlaResource*> arg_resources; in BuildComputation()
253 [](const XlaResource* a, const XlaResource* b) { in BuildComputation()
257 for (const XlaResource* resource : arg_resources) { in BuildComputation()
388 XlaResource::KindToString(resource_kind), in HumanString()
643 case XlaResource::kVariable: { in XLAShapeForArgument()
651 case XlaResource::kTensorArray: { in XLAShapeForArgument()
669 case XlaResource::kStack: { in XLAShapeForArgument()
686 case XlaResource::kInvalid: in XLAShapeForArgument()
724 TF_RET_CHECK(arg.resource_kind != XlaResource::kInvalid); in BuildArguments()
[all …]
Dxla_context.cc73 XlaResource* XlaContext::AddResource(std::unique_ptr<XlaResource> resource) { in AddResource()
Dxla_op_kernel.h190 Status GetResourceInput(int index, XlaResource** resource);
193 void SetResourceOutput(int index, XlaResource* resource);
Dxla_compiler.h148 XlaResource::Kind resource_kind = XlaResource::kInvalid;
Dxla_compiler_test.cc305 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
356 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
399 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
748 args[0].resource_kind = XlaResource::kTensorArray; in TEST_F()
808 args[0].resource_kind = XlaResource::kTensorArray; in TEST_F()
841 args[0].resource_kind = XlaResource::kTensorArray; in TEST_F()
1003 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
1106 args[0].resource_kind = XlaResource::kVariable; in TEST_F()
1157 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
1199 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
[all …]
Dxla_expression.cc57 XlaExpression XlaExpression::Resource(XlaResource* resource) { in Resource()
Dtf2xla.cc277 arg.resource_kind = XlaResource::kVariable; in ConvertGraphToXla()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dtensor_array_ops.cc51 XlaResource* resource, DataType dtype, in MaybeInitializeTensorArray()
53 if (resource->kind() != XlaResource::kTensorArray) { in MaybeInitializeTensorArray()
94 const XlaResource* resource, in CheckTensorArrayIsInitialized()
96 if (resource->kind() != XlaResource::kTensorArray) { in CheckTensorArrayIsInitialized()
113 Status GetTensorArrayShape(const XlaResource* resource, in GetTensorArrayShape()
169 XlaResource* var = in Compile()
170 ctx->xla_context()->AddResource(XlaResource::CreateTensorArray( in Compile()
204 XlaResource* resource; in Compile()
254 XlaResource* resource; in Compile()
297 XlaResource* resource; in Compile()
[all …]
Dstack_ops.cc40 Status GetStackShape(xla::XlaBuilder* builder, XlaResource* resource, in GetStackShape()
62 Status MaybeInitializeStack(xla::XlaBuilder* builder, XlaResource* resource, in MaybeInitializeStack()
110 XlaResource* resource = in Compile()
111 ctx->xla_context()->AddResource(XlaResource::CreateStack( in Compile()
137 XlaResource* resource; in Compile()
183 XlaResource* resource; in Compile()
Dif_op.cc65 XlaResource* resource; in Compile()
115 XlaResource* resource; in Compile()
125 XlaResource* gradient; in Compile()
214 XlaResource* resource; in Compile()
263 XlaResource* resource; in Compile()
Dcase_op.cc62 XlaResource* resource; in Compile()
114 XlaResource* resource; in Compile()
124 XlaResource* gradient; in Compile()
226 XlaResource* resource; in Compile()
275 XlaResource* resource; in Compile()
Dwhile_op.cc59 XlaResource* resource; in MakeXlaCompilerArgumentsFromInputs()
65 if (arg.resource_kind == XlaResource::kTensorArray) { in MakeXlaCompilerArgumentsFromInputs()
350 XlaResource* resource; in Compile()
371 XlaResource* gradient; in Compile()
479 XlaResource* resource; in Compile()
555 XlaResource* resource; in Compile()
Dvariable_ops.cc34 XlaResource* variable; in Compile()
/external/tensorflow/tensorflow/compiler/aot/
Daot_only_var_handle_op.cc43 if (resource->kind() == XlaResource::kVariable && in Compile()
/external/tensorflow/tensorflow/compiler/jit/
Dxla_launch_util.cc478 arg.resource_kind = XlaResource::kVariable; in BuildXlaCompilerArguments()