/external/tensorflow/tensorflow/python/framework/ |
D | op_def_library.py | 55 def _SatisfiesTypeConstraint(dtype, attr_def, param_name): argument 56 if attr_def.HasField("allowed_values"): 57 allowed_list = attr_def.allowed_values.list.type 66 def _SatisfiesLengthConstraint(length, attr_def, param_name, op_type_name): argument 67 if attr_def.has_minimum and length < attr_def.minimum: 70 (param_name, op_type_name, length, attr_def.minimum)) 73 def _SatisfiesAllowedStringsConstraint(value, attr_def, arg_name, op_type_name): argument 74 if value not in attr_def.allowed_values.list.s: 78 map(compat.as_text, attr_def.allowed_values.list.s)))) 81 def _SatisfiesIntMinimumConstraint(value, attr_def, arg_name, op_type_name): argument [all …]
|
D | python_api_info.cc | 142 for (const auto& attr_def : op_def.attr()) { in Initialize() local 143 TF_RETURN_IF_ERROR(InitializeAttribute(attr_def, param_name_to_index)); in Initialize() 230 const OpDef::AttrDef& attr_def, in InitializeAttribute() argument 232 if (attr_def.name() == "name") { in InitializeAttribute() 236 const char* name = InternPyString(attr_def.name()); in InitializeAttribute() 239 gtl::FindWithDefault(param_name_to_index, attr_def.name(), -1); in InitializeAttribute() 240 const AttributeType dtype = AttributeTypeFromName(attr_def.type()); in InitializeAttribute() 246 attr_def.name(), ": '", attr_def.type(), in InitializeAttribute() 252 DataType default_dtype = attr_def.has_default_value() in InitializeAttribute() 253 ? attr_def.default_value().type() in InitializeAttribute() [all …]
|
D | importer.py | 139 for attr_def in op_def.attr: 140 if attr_name == attr_def.name: 141 return attr_def 170 attr_def = _FindAttrInOpDef(key, producer_op_def) 171 if (attr_def and attr_def.HasField('default_value') and 172 node.attr[key] == attr_def.default_value): 339 for attr_def in op_def.attr: 340 key = attr_def.name 341 if attr_def.HasField('default_value'): 344 node_def.attr[key].CopyFrom(attr_def.default_value)
|
D | meta_graph.py | 450 for attr_def in op_def.attr: 451 if attr_def.name == attr_name: 452 if not attr_def.HasField("default_value"): 458 attr_def.default_value.SerializeToString())
|
D | python_api_info.h | 230 const OpDef::AttrDef& attr_def,
|
/external/tensorflow/tensorflow/java/src/gen/cc/ |
D | op_specs.cc | 64 std::pair<Type, Type> TypesOf(const OpDef_AttrDef& attr_def, 103 for (const auto& attr_def : op_def_.attr()) { in TypeOf() local 104 if (attr_def.name() == arg_def.type_attr()) { in TypeOf() 105 type = TypesOf(attr_def, iterable_out).first; in TypeOf() 128 std::pair<Type, Type> TypeResolver::TypesOf(const OpDef_AttrDef& attr_def, in TypesOf() argument 132 StringPiece attr_type = attr_def.type(); in TypesOf() 158 if (IsRealNumbers(attr_def.allowed_values())) { in TypesOf() 167 visited_attrs_.insert(std::make_pair(attr_def.name(), types.first)); in TypesOf() 301 AttributeSpec CreateAttribute(const OpDef_AttrDef& attr_def, in CreateAttribute() argument 305 std::pair<Type, Type> types = type_resolver->TypesOf(attr_def, &iterable); in CreateAttribute() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | upgrade_graph.cc | 54 [](const auto& attr_def) { in GenerateResourceSharedNameIfEmpty() argument 55 return attr_def.name() == "use_node_name_sharing" && in GenerateResourceSharedNameIfEmpty() 56 attr_def.type() == "bool"; in GenerateResourceSharedNameIfEmpty() 62 [](const auto& attr_def) { in GenerateResourceSharedNameIfEmpty() argument 63 return attr_def.name() == "shared_name" && in GenerateResourceSharedNameIfEmpty() 64 attr_def.type() == "string"; in GenerateResourceSharedNameIfEmpty()
|
D | export_tf_dialect_op.cc | 105 for (const auto& attr_def : op_reg_data->op_def.attr()) { in GetUnregisteredAttrs() local 106 registered_attrs.insert(attr_def.name()); in GetUnregisteredAttrs()
|
/external/tensorflow/tensorflow/core/common_runtime/eager/ |
D | attr_builder.cc | 181 for (const auto& attr_def : op_def->attr()) { in FillAttrValueMap() local 182 if (attr_def.has_default_value() && !m->count(attr_def.name())) { in FillAttrValueMap() 183 SetInAttrValueMap(m, attr_def.name(), attr_def.default_value()); in FillAttrValueMap() 194 for (const OpDef::AttrDef& attr_def : op_def->attr()) { in ValueMatchesDefault() local 195 if (attr_def.name() == attr_name && attr_def.has_default_value() && in ValueMatchesDefault() 196 AreAttrValuesEqual(attr_def.default_value(), attr_value)) { in ValueMatchesDefault()
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/python/ |
D | tfr_gen.py | 104 def _get_type_from_proto(arg_def=None, attr_def=None): argument 106 if attr_def.type == 'bool': 108 elif attr_def.type == 'int32': 110 elif attr_def.type == 'int' or attr_def.type == 'int64': 112 elif attr_def.type == 'float': 123 def _get_type_info_from_proto(arg_def=None, attr_def=None): argument 124 attr_type = _get_type_from_proto(arg_def, attr_def) 127 attr_type, attr_def.name, attr_def.type) 298 for attr_def in attrs_no_default + attrs_with_default: 299 inputs.append(_get_type_info_from_proto(None, attr_def)) [all …]
|
/external/tensorflow/tensorflow/core/framework/ |
D | graph_def_util.cc | 184 for (const OpDef::AttrDef& attr_def : op_def->attr()) { in StripDefaultAttributes() local 185 if (attr_def.has_default_value()) { in StripDefaultAttributes() 187 const string& name = attr_def.name(); in StripDefaultAttributes() 190 const AttrValue& default_value = attr_def.default_value(); in StripDefaultAttributes()
|
D | op_def_util_test.cc | 37 OpDef::AttrDef attr_def; in ADef() local 38 EXPECT_TRUE(protobuf::TextFormat::MergeFromString(text, &attr_def)); in ADef() 39 return attr_def; in ADef()
|
D | function.cc | 696 for (const auto& attr_def : op_def->attr()) { in AddDefaultAttrs() local 697 if (attr_def.has_default_value() && !attr_slice.Find(attr_def.name())) { in AddDefaultAttrs() 698 if (!attrs->insert({attr_def.name(), attr_def.default_value()}).second) { in AddDefaultAttrs() 699 return errors::Internal("Somehow duplicated: ", attr_def.name()); in AddDefaultAttrs() 1813 gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def, in Create() argument 1823 for (const auto& a : attr_def) b.Attr(a); in Create() 1863 gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def, in Create() argument 1866 return Create(function_name, in_def, out_def, attr_def, node_def, ret_def, in Create() 1874 gtl::ArraySlice<string> attr_def, in Define() argument 1880 for (const auto& a : attr_def) b.Attr(a); in Define() [all …]
|
D | function.h | 147 gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def, 159 gtl::ArraySlice<string> attr_def, 167 gtl::ArraySlice<string> attr_def, 173 gtl::ArraySlice<string> attr_def,
|
D | node_def_util.cc | 724 for (const auto& attr_def : op_def.attr()) { in AddDefaultsToNodeDef() local 726 if (attr_def.has_default_value() && !attrs.Find(attr_def.name())) { in AddDefaultsToNodeDef() 727 AddNodeAttr(attr_def.name(), attr_def.default_value(), node_def); in AddDefaultsToNodeDef()
|
D | graph_to_functiondef.cc | 285 OpDef::AttrDef* attr_def = fdef->mutable_signature()->add_attr(); in FillFunctionBody() local 286 attr_def->set_name(func_attr_name); in FillFunctionBody() 287 attr_def->set_type(node_attr_def->type()); in FillFunctionBody()
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | xla_op_registry.cc | 233 for (const OpDef::AttrDef& attr_def : op_def->attr()) { in RegisterCompilationKernels() local 234 if (attr_def.type() == "type" || attr_def.type() == "list(type)") { in RegisterCompilationKernels() 235 type_attrs.insert(attr_def.name()); in RegisterCompilationKernels()
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | auto_mixed_precision.cc | 333 const OpDef::AttrDef* attr_def = FindAttr(attr_name, op_def); in AddNode() local 334 if (!attr_def) { in AddNode() 338 if (attr_def->type() == "type") { in AddNode() 340 } else if (attr_def->type() == "list(type)") { in AddNode() 824 DataTypeSet AllowedDataTypes(const OpDef::AttrDef& attr_def) { in AllowedDataTypes() argument 825 const auto& allowed_types = attr_def.allowed_values().list().type(); in AllowedDataTypes() 840 const OpDef::AttrDef* attr_def = FindAttr(t_attr_id.attr_name, op_def); in AllowedDataTypes() local 841 CHECK(attr_def); // Crash Ok in AllowedDataTypes() 842 return AllowedDataTypes(*attr_def); in AllowedDataTypes()
|