Home
last modified time | relevance | path

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

/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_resource.cc29 /*static*/ absl::string_view XlaResource::KindToString(XlaResource::Kind kind) { in KindToString()
31 case XlaResource::kInvalid: in KindToString()
33 case XlaResource::kVariable: in KindToString()
35 case XlaResource::kStack: in KindToString()
37 case XlaResource::kTensorArray: in KindToString()
42 /*static*/ std::unique_ptr<XlaResource> XlaResource::CreateStack( in CreateStack()
44 return absl::make_unique<XlaResource>( in CreateStack()
45 XlaResource::kStack, /*arg_num=*/-1, std::move(name), type, TensorShape(), in CreateStack()
52 /*static*/ std::unique_ptr<XlaResource> XlaResource::CreateTensorArray( in CreateTensorArray()
55 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);
161 const std::map<string, std::unique_ptr<XlaResource>>& tensor_array_gradients() in tensor_array_gradients()
[all …]
Dxla_expression.h75 static XlaExpression Resource(XlaResource* resource);
78 static XlaExpression ConstantResource(Tensor value, XlaResource* resource);
104 XlaResource* resource() const { return resource_; } in resource()
152 XlaResource* resource_ = nullptr;
Dxla_context.h78 XlaResource* AddResource(std::unique_ptr<XlaResource> resource);
80 const std::vector<std::unique_ptr<XlaResource>>& resources() { in resources()
124 std::vector<std::unique_ptr<XlaResource>> resources_;
Dxla_argument.h89 XlaResource::Kind resource_kind = XlaResource::kInvalid;
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.cc468 XlaResource* variable = expression->resource(); in ReadVariableInputTensor()
470 TF_RET_CHECK(variable->kind() == XlaResource::kVariable); in ReadVariableInputTensor()
529 XlaResource* variable = expression->resource(); in GetVariableTypeAndShape()
531 TF_RET_CHECK(variable->kind() == XlaResource::kVariable); in GetVariableTypeAndShape()
603 void XlaOpKernelContext::SetResourceOutput(int index, XlaResource* resource) { in SetResourceOutput()
607 Status XlaOpKernelContext::GetResourceInput(int index, XlaResource** resource) { in GetResourceInput()
622 XlaResource* variable = expression->resource(); in AssignVariableTensor()
624 TF_RET_CHECK(variable->kind() == XlaResource::kVariable); in AssignVariableTensor()
Dxla_compiler.cc169 const std::vector<std::unique_ptr<XlaResource>>& resources, in BuildComputation()
266 std::vector<const XlaResource*> arg_resources; in BuildComputation()
274 [](const XlaResource* a, const XlaResource* b) { in BuildComputation()
284 for (const XlaResource* resource : arg_resources) { in BuildComputation()
307 arg.resource_kind != XlaResource::kTensorArray && in BuildComputation()
454 " resource_kind=", XlaResource::KindToString(resource_kind), in HumanString()
875 case XlaResource::kVariable: { in XLAShapeForArgument()
886 case XlaResource::kTensorArray: { in XLAShapeForArgument()
904 case XlaResource::kStack: { in XLAShapeForArgument()
921 case XlaResource::kInvalid: in XLAShapeForArgument()
[all …]
Dxla_context.cc80 XlaResource* XlaContext::AddResource(std::unique_ptr<XlaResource> resource) { in AddResource()
Dxla_op_kernel.h205 Status GetResourceInput(int index, XlaResource** resource);
208 void SetResourceOutput(int index, XlaResource* resource);
Dxla_compiler_test.cc300 args[0].resource_kind = XlaResource::kVariable; in TEST_F()
341 args[0].resource_kind = XlaResource::kVariable; in TEST_F()
396 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
449 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
512 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
817 args[0].resource_kind = XlaResource::kTensorArray; in TEST_F()
876 args[0].resource_kind = XlaResource::kTensorArray; in TEST_F()
908 args[0].resource_kind = XlaResource::kTensorArray; in TEST_F()
1068 args[1].resource_kind = XlaResource::kVariable; in TEST_F()
1175 args[0].resource_kind = XlaResource::kVariable; in TEST_F()
[all …]
Dxla_expression.cc42 XlaResource* resource) { in ConstantResource()
67 XlaExpression XlaExpression::Resource(XlaResource* resource) { in Resource()
Dgraph_compiler.cc95 XlaResource* resource = expressions[i]->resource(); in PrepareArguments()
318 XlaResource* resource = in CompileFunctionalNode()
Dxla_compiler.h210 static void PopulateArgumentFromResource(const XlaResource& resource,
Dgraph_compiler_util.cc259 arg.resource_kind = XlaResource::kVariable; in PopulateXlaArgs()
/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()
Dcase_op.cc97 XlaResource* resource; in Compile()
172 XlaResource* resource; in Compile()
182 XlaResource* gradient; in Compile()
298 XlaResource* resource; in Compile()
352 XlaResource* resource; in Compile()
Dif_op.cc60 XlaResource* resource; in PopulateTensorArrayGradients()
70 XlaResource* gradient; in PopulateTensorArrayGradients()
187 XlaResource* resource; in Compile()
286 XlaResource* resource; in Compile()
337 XlaResource* resource; in Compile()
Dwhile_op.cc83 XlaResource* resource; in MakeXlaCompilerArgumentsFromInputs()
86 if (arg.resource_kind == XlaResource::kTensorArray) { in MakeXlaCompilerArgumentsFromInputs()
371 XlaResource* resource; in Compile()
392 XlaResource* gradient; in Compile()
499 XlaResource* resource; in Compile()
608 XlaResource* resource; in Compile()
Dvariable_ops.cc35 XlaResource* variable; in Compile()
/external/tensorflow/tensorflow/compiler/aot/
Daot_only_var_handle_op.cc46 if (resource->kind() == XlaResource::kVariable && in Compile()
/external/tensorflow/tensorflow/compiler/jit/
Dxla_launch_util.cc620 arg.resource_kind = XlaResource::kVariable; in BuildXlaCompilerArguments()
/external/tensorflow/tensorflow/core/tpu/kernels/
Dtpu_compile_op_common.cc201 arg.resource_kind = XlaResource::kVariable; in BuildComputationArgumentDescriptions()