Home
last modified time | relevance | path

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

/external/tensorflow/tensorflow/python/compiler/tensorrt/test/
Dtf_function_test.py76 def _copy_test_attr_to_func_def(self, func_def, param_name, attr_value_type): argument
80 func_def.attr[param_name].CopyFrom(attr_value_pb2.AttrValue(s=byte_value))
82 func_def.attr[param_name].CopyFrom(attr_value_pb2.AttrValue(b=test_value))
84 func_def.attr[param_name].CopyFrom(attr_value_pb2.AttrValue(i=test_value))
96 for func_def in function_protos:
97 if not func_def.signature.name.startswith("TRTEngine"):
99 self.assertIn(key, func_def.attr,
102 self.assertEqual(func_def.attr[key].s, compat.as_bytes(value))
104 self.assertEqual(func_def.attr[key].b, value)
106 self.assertEqual(func_def.attr[key].i, value)
[all …]
/external/tensorflow/tensorflow/core/framework/
Dgraph_def_util.cc131 for (const auto& func_def : graph_def.library().function()) { in IsFunction() local
132 if (op_name == func_def.signature().name()) return true; in IsFunction()
152 FunctionDef* func_def = graph_def->mutable_library()->mutable_function(f); in RemoveNewDefaultAttrsFromGraphDef() local
153 for (int n = 0; n < func_def->node_def_size(); ++n) { in RemoveNewDefaultAttrsFromGraphDef()
154 NodeDef* node_def = func_def->mutable_node_def(n); in RemoveNewDefaultAttrsFromGraphDef()
Dfunction_test.cc1430 auto func_def = FDH::Create( in TEST() local
1437 auto* attr = func_def.mutable_attr(); in TEST()
1440 return func_def; in TEST()
Dfunction.cc854 string DebugString(const FunctionDef& func_def) { return Print(func_def); } in DebugString() argument
1701 const auto& func_def = flib.Find(func_name); in ReachableFunctions() local
1702 const auto attr_it = func_def->attr().find(kApiImplements); in ReachableFunctions()
1703 if (attr_it != func_def->attr().end() && in ReachableFunctions()
Dfunction.h272 std::string DebugString(const FunctionDef& func_def);
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dexport_graphdef.cc609 FunctionDef func_def; in ConvertLibFunction() local
611 GraphToFunctionDef(*sub_graph, function_name, control_ret, &func_def)); in ConvertLibFunction()
617 for (auto& node_def : *func_def.mutable_node_def()) { in ConvertLibFunction()
638 func_def.mutable_signature()->set_is_stateful(true); in ConvertLibFunction()
650 func_def.mutable_attr())); in ConvertLibFunction()
656 (*func_def.mutable_resource_arg_unique_id())[i] = in ConvertLibFunction()
661 (*flib->add_function()) = std::move(func_def); in ConvertLibFunction()
710 for (auto& func_def : flib.function()) { in Convert() local
711 TF_RETURN_IF_ERROR(flib_def->AddFunctionDef(func_def)); in Convert()
785 for (auto& func_def : flib.function()) { in ConvertMlirFunctionToFunctionLibraryDef() local
[all …]
Dimport_model.cc602 const FunctionDef* func_def = in ConvertDeferredFunctions() local
611 for (const auto& name_and_value : func_def->attr()) { in ConvertDeferredFunctions()
614 auto& signature = func_def->signature(); in ConvertDeferredFunctions()
642 FunctionDefToBodyHelper(*func_def, AttrSlice(), &graph_flib_, &fbody)); in ConvertDeferredFunctions()
1394 const auto* func_def = func_lib.Find(std::string(func_name)); in ConvertLibFunction() local
1395 if (func_def == nullptr) { in ConvertLibFunction()
1403 attributes.reserve(func_def->attr_size()); in ConvertLibFunction()
1404 for (const auto& name_and_value : func_def->attr()) { in ConvertLibFunction()
1415 if (func_def->signature().is_stateful()) { in ConvertLibFunction()
2024 const auto* func_def = graph_flib_.Find(node_type_name); in ConvertNode() local
[all …]
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dmeta_optimizer.cc989 const FunctionDef* func_def = flib.Find(func_name); in PropagateTFDataAttrs() local
991 if (func_def == nullptr) return; in PropagateTFDataAttrs()
1001 for (const NodeDef& node : func_def->node_def()) { in PropagateTFDataAttrs()
1021 for (const auto& func_def : fdef_lib.function()) { in PropagateTFDataAttrs() local
1022 const std::string& func_name = func_def.signature().name(); in PropagateTFDataAttrs()
1023 if (data::IsTFDataFunction(func_def)) in PropagateTFDataAttrs()
1029 for (FunctionDef& func_def : *fdef_lib.mutable_function()) { in PropagateTFDataAttrs()
1030 const std::string& func_name = func_def.signature().name(); in PropagateTFDataAttrs()
1032 !data::IsTFDataFunction(func_def)) { in PropagateTFDataAttrs()
1034 (*func_def.mutable_attr())[data::kTFDataFunction].set_b(true); in PropagateTFDataAttrs()
[all …]
Dfunction_api_info_test.cc53 FunctionDef* func_def) { in PopulateFunction() argument
54 OpDef* sig = func_def->mutable_signature(); in PopulateFunction()
59 auto* func_attr = func_def->mutable_attr(); in PopulateFunction()
/external/tensorflow/tensorflow/core/grappler/optimizers/data/
Dmeta_optimizer.cc140 for (const FunctionDef& func_def : in Optimize() local
142 if (flib.Find(func_def.signature().name()) == nullptr) { in Optimize()
143 TF_RETURN_IF_ERROR(flib.AddFunctionDef(func_def)); in Optimize()
/external/tensorflow/tensorflow/compiler/mlir/tfr/integration/
Dtfr_decompose_ctx.cc176 FunctionDef func_def; in ExpandNode() local
178 ConvertMlirFunctionToFunctionLibraryDef(func, export_confs_, &func_def)); in ExpandNode()
180 return func_def; in ExpandNode()
/external/tensorflow/tensorflow/core/distributed_runtime/
Dcluster_function_library_runtime.cc43 const FunctionDef* func_def = flib_def.Find(sig.name()); in ConstructFunctionGraph() local
44 if (func_def == nullptr) { in ConstructFunctionGraph()
52 flib_def.ReachableDefinitions(*func_def); in ConstructFunctionGraph()
159 TF_RETURN_IF_ERROR(FunctionDefToBodyHelper(*func_def, attrs, &pruned_flib_def, in ConstructFunctionGraph()
/external/sl4a/Docs/
Dgenerate_api_reference_md.py49 def __init__(self, rpc_def, func_def): argument
57 self._ParseFunctionDefinition(func_def)
/external/tensorflow/tensorflow/compiler/jit/
Dbuild_xla_ops_pass.cc349 const FunctionDef* func_def = flib_def.Find(function_name); in InferDeviceForCluster() local
350 TF_RET_CHECK(func_def) << "Could not find " << function_name; in InferDeviceForCluster()
354 for (const NodeDef& ndef : func_def->node_def()) { in InferDeviceForCluster()
/external/tensorflow/tensorflow/c/
Dc_test_util.h120 bool GetFunctionDef(TF_Function* func, tensorflow::FunctionDef* func_def);
Dc_test_util.cc412 bool GetFunctionDef(TF_Function* func, tensorflow::FunctionDef* func_def) { in GetFunctionDef() argument
418 if (ret) ret = func_def->ParseFromArray(buffer->data, buffer->length); in GetFunctionDef()
/external/tensorflow/tensorflow/compiler/mlir/tfr/python/
Dtfr_gen.py241 def lookup(self, f_name, func_def=None, optional=False): argument
245 if isinstance(func_def, types.FunctionType):
246 if not hasattr(func_def, '_tfr_op_name'):
252 op_name = getattr(func_def, '_tfr_op_name')
253 elif not func_def:
258 for dec in func_def.decorator_list:
/external/tensorflow/tensorflow/core/tfrt/utils/
Dtfrt_graph_execution_state.cc326 const FunctionDef* func_def = graph->flib_def().Find(func_name); in IsTpuGraph() local
327 for (const NodeDef& node_def : func_def->node_def()) { in IsTpuGraph()
/external/tensorflow/tensorflow/python/framework/
Dconvert_to_constants_test.py1573 for func_def in new_meta_graph_def.graph_def.library.function:
1574 func_name_without_prefix = func_def.signature.name[prefix_len:]
1576 func_def.attr["_noinline"].CopyFrom(attr_value_pb2.AttrValue(b=True))
/external/tensorflow/tensorflow/core/tpu/graph_rewrite/
Ddistributed_tpu_rewrite_pass.cc2910 const FunctionDef* func_def = fld.Find(func_name); in ContainsResourceWriteOp() local
2911 for (const NodeDef& n : func_def->node_def()) { in ContainsResourceWriteOp()