Home
last modified time | relevance | path

Searched refs:global_tensor (Results 1 – 20 of 20) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dfreeze_global_tensors.cc77 auto global_tensor = in runOnOperation() local
80 if (!global_tensor) continue; in runOnOperation()
85 if (global_tensor.is_mutable()) { in runOnOperation()
87 global_tensor.emitError() in runOnOperation()
93 frozen_global_tensors.insert(global_tensor); in runOnOperation()
111 auto const_op = builder.create<TF::ConstOp>(global_tensor.getLoc(), in runOnOperation()
112 global_tensor.value()); in runOnOperation()
122 for (auto global_tensor : frozen_global_tensors) { in runOnOperation() local
123 global_tensor->erase(); in runOnOperation()
Doptimize_global_tensors.cc179 bool IsImmutable(GlobalTensorOp global_tensor, in IsImmutable() argument
183 if (!global_tensor.is_mutable()) { in IsImmutable()
188 if (IsExported(global_tensor)) { in IsImmutable()
213 auto global_tensor = symbol_table.lookup<GlobalTensorOp>( in CreateGlobalTensorUsesMap() local
215 if (!global_tensor) { in CreateGlobalTensorUsesMap()
218 global_tensor_uses[global_tensor].push_back({func, i}); in CreateGlobalTensorUsesMap()
231 auto global_tensor = kv.first; in MarkGlobalTensorsImmutable() local
233 if (IsImmutable(global_tensor, global_tensor_uses, resource_analyzer)) { in MarkGlobalTensorsImmutable()
234 global_tensor.removeAttr("is_mutable"); in MarkGlobalTensorsImmutable()
241 for (auto global_tensor : in EraseUnusedGlobalTensors() local
[all …]
Dlift_variables.cc188 auto global_tensor = LookupBoundInputOfType<GlobalTensorOp>( in LiftVariables() local
190 if (!global_tensor) continue; in LiftVariables()
200 underlying_type[0] == global_tensor.type()) { in LiftVariables()
209 /*subtypes=*/{global_tensor.type().cast<TensorType>()}, in LiftVariables()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/
Dtf_saved_model_optimize_global_tensors.mlir11 // CHECK: "tf_saved_model.global_tensor"() {
14 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
30 // CHECK: "tf_saved_model.global_tensor"() {
33 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
50 // CHECK: "tf_saved_model.global_tensor"() {
53 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", tf_saved_model.exported_names = ["v…
86 …"tf_saved_model.global_tensor"() { sym_name = "c", type = tensor<f32>, value = dense<42.> : tensor…
108 …"tf_saved_model.global_tensor"() { sym_name = "exported_unbound", tf_saved_model.exported_names = …
114 …"tf_saved_model.global_tensor"() { sym_name = "unexported_unbound", type = tensor<f32>, value = de…
129 // CHECK-NOT: tf_saved_model.global_tensor
[all …]
Dtf_saved_model_freeze_global_tensors.mlir7 // CHECK-NOT: tf_saved_model.global_tensor
8 …"tf_saved_model.global_tensor"() {sym_name = "v", type = tensor<f32>, value = dense<1.0> : tensor<…
43 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<1…
58 …"tf_saved_model.global_tensor"() {sym_name = "v", type = tensor<f32>, value = dense<1.0> : tensor<…
79 …"tf_saved_model.global_tensor"() {sym_name = "v", type = tensor<f32>, value = dense<1.0> : tensor<…
80 …"tf_saved_model.global_tensor"() {sym_name = "v2", type = tensor<f32>, value = dense<1.0> : tensor…
93 // CHECK-NOT: tf_saved_model.global_tensor
94 …"tf_saved_model.global_tensor"() {sym_name = "v", type = tensor<f32>, value = dense<1.0> : tensor<…
95 …"tf_saved_model.global_tensor"() {sym_name = "v2", type = tensor<f32>, value = dense<1.0> : tensor…
Dtf_saved_model_optimize_global_tensors_interprocedural.mlir12 // CHECK: "tf_saved_model.global_tensor"() {
15 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
42 // CHECK: "tf_saved_model.global_tensor"() {
44 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
46 // CHECK: "tf_saved_model.global_tensor"() {
48 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v2", type = tensor<f32>, value = dense<…
76 // CHECK: "tf_saved_model.global_tensor"() {
79 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
102 // CHECK: "tf_saved_model.global_tensor"() {
105 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
[all …]
Dtf_saved_model_ops.mlir17 // CHECK: tf_saved_model.global_tensor
18 "tf_saved_model.global_tensor"() {
26 // CHECK: tf_saved_model.global_tensor
27 "tf_saved_model.global_tensor"() {
83 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
Dtf_saved_model_lift_variables.mlir16 // CHECK: "tf_saved_model.global_tensor"()
18 // CHECK: "tf_saved_model.global_tensor"()
50 // CHECK: "tf_saved_model.global_tensor"()
52 // CHECK: "tf_saved_model.global_tensor"()
76 // CHECK: "tf_saved_model.global_tensor"()
78 // CHECK: "tf_saved_model.global_tensor"()
Dtf_saved_model_ops_invalid.mlir49 …ror@+1 {{'tf_saved_model.exported_names' must be on a 'func' or 'tf_saved_model.global_tensor' op}}
149 …"tf_saved_model.global_tensor"() { sym_name = "some_constant", type = tensor<f32>, value = dense<4…
226 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v0", type = tensor<3xf32>, value = dens…
232 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
246 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<?xf32>, value = dense…
259 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<?xf32>, value = dense…
271 …// expected-error@+1 {{'type' attribute for immutable 'tf_saved_model.global_tensor' should have a…
272 …"tf_saved_model.global_tensor"() { sym_name = "v", type = tensor<?xf32>, value = dense<1.> : tenso…
408 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
Dtf_saved_model_deduplicate_bound_input_bindings.mlir5 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<4…
6 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "w", type = tensor<f32>, value = dense<4…
7 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "x", type = tensor<f32>, value = dense<4…
Dtf_saved_model_freeze_global_tensors_mutable_tensors.mlir7 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<1…
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dremove_unused_func_args_tensors.cc53 auto global_tensor = in runOnOperation() local
56 if (global_tensor && func.getArgument(i).getUsers().empty()) { in runOnOperation()
58 global_tensors_to_remove.insert(global_tensor); in runOnOperation()
64 for (auto global_tensor : global_tensors_to_remove) { in runOnOperation() local
65 global_tensor->erase(); in runOnOperation()
Dlegalize_variables.cc102 auto global_tensor = GetGlobalTensor<T>(symbol_table_, var_op, func); in matchAndRewrite() local
103 if (!global_tensor) return failure(); in matchAndRewrite()
104 auto variable_id = global_tensor_id_->at(global_tensor.sym_name().str()); in matchAndRewrite()
139 for (auto global_tensor : module.getOps<tf_saved_model::GlobalTensorOp>()) { in runOnOperation() local
140 global_tensor_id[global_tensor.sym_name().str()]; in runOnOperation()
Dinitialize_variables.cc130 for (auto global_tensor : tensors_to_initialize) { in InitializeVariables() local
131 InitializeVariable(global_tensor_id.at(global_tensor.sym_name().str()), in InitializeVariables()
132 global_tensor.value(), session_init_func); in InitializeVariables()
164 for (auto global_tensor : module.getOps<tf_saved_model::GlobalTensorOp>()) { in runOnOperation() local
165 global_tensor_id[global_tensor.sym_name().str()]; in runOnOperation()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_saved_model.cc64 static LogicalResult Verify(GlobalTensorOp global_tensor) { in Verify() argument
66 global_tensor.type(), global_tensor.value().Attribute::getType()))) { in Verify()
67 return global_tensor.emitError() << "'type' and 'value' attributes should " in Verify()
70 if (!global_tensor.is_mutable()) { in Verify()
71 if (!global_tensor.type().cast<TensorType>().hasStaticShape()) { in Verify()
72 return global_tensor.emitError() in Verify()
159 if (auto global_tensor = llvm::dyn_cast<GlobalTensorOp>(op)) { in GetBoundInputArgTypeFor() local
160 auto type = global_tensor.type().cast<TensorType>(); in GetBoundInputArgTypeFor()
Dtf_saved_model_ops.td79 `tf_saved_model.global_tensor` that is bound to that function argument
97 def TfSavedModel_GlobalTensorOp : TfSavedModel_Op<"global_tensor"> {
145 which is how `global_tensor`s are referenced)
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/
Dremove_unused_func_args_tensors.mlir5 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "Variable", type = tensor<1x10xf32>, valu…
19 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "Variable", type = tensor<1x10xf32>, valu…
20 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "UnusedVariable", type = tensor<1x10xf32>…
Dinitialize_variables.mlir5 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "Variable", type = tensor<1x10xf32>, valu…
46 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "Variable", type = tensor<1x10xf32>, valu…
Dlegalize-tf-variables.mlir5 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "Variable", type = tensor<1x10xf32>, valu…
40 …"tf_saved_model.global_tensor"() {is_mutable, sym_name = "Variable", type = tensor<1x10xf32>, valu…
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dimport_model.cc2945 auto global_tensor = mlir::tf_saved_model::LookupBoundInputOfType< in AdjustBoundInputArgTypes() local
2947 if (global_tensor) { in AdjustBoundInputArgTypes()
2950 mlir::tf_saved_model::GetBoundInputArgTypeFor(global_tensor); in AdjustBoundInputArgTypes()
2952 if (global_tensor.is_mutable()) { in AdjustBoundInputArgTypes()
2954 global_tensor.getLoc(), old_type, arg, in AdjustBoundInputArgTypes()
2961 builder.create<mlir::TF::ReadVariableOp>(global_tensor.getLoc(), in AdjustBoundInputArgTypes()
2999 GlobalTensorOp global_tensor; in SortSavedModelModule() member
3002 for (auto global_tensor : module.getOps<GlobalTensorOp>()) { in SortSavedModelModule() local
3003 auto exported_names = mlir::tf_saved_model::GetExportedNames(global_tensor); in SortSavedModelModule()
3006 {exported_names.empty() ? "" : exported_names.front(), global_tensor}); in SortSavedModelModule()
[all …]