/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | freeze_global_tensors.cc | 77 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()
|
D | optimize_global_tensors.cc | 179 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 …]
|
D | lift_variables.cc | 188 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/ |
D | tf_saved_model_optimize_global_tensors.mlir | 11 // 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 …]
|
D | tf_saved_model_freeze_global_tensors.mlir | 7 // 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…
|
D | tf_saved_model_optimize_global_tensors_interprocedural.mlir | 12 // 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 …]
|
D | tf_saved_model_ops.mlir | 17 // 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…
|
D | tf_saved_model_lift_variables.mlir | 16 // 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"()
|
D | tf_saved_model_ops_invalid.mlir | 49 …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…
|
D | tf_saved_model_deduplicate_bound_input_bindings.mlir | 5 …"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…
|
D | tf_saved_model_freeze_global_tensors_mutable_tensors.mlir | 7 …"tf_saved_model.global_tensor"() { is_mutable, sym_name = "v", type = tensor<f32>, value = dense<1…
|
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/ |
D | remove_unused_func_args_tensors.cc | 53 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()
|
D | legalize_variables.cc | 102 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()
|
D | initialize_variables.cc | 130 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/ |
D | tf_saved_model.cc | 64 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()
|
D | tf_saved_model_ops.td | 79 `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/ |
D | remove_unused_func_args_tensors.mlir | 5 …"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>…
|
D | initialize_variables.mlir | 5 …"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…
|
D | legalize-tf-variables.mlir | 5 …"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/ |
D | import_model.cc | 2945 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 …]
|