/external/tensorflow/tensorflow/core/framework/ |
D | op_compatibility_test.cc | 45 const OpDef* op_def; in RegisteredOpDef() local 46 TF_CHECK_OK(OpRegistry::Global()->LookUpOpDef(node_def()->op(), &op_def)); in RegisteredOpDef() 47 return op_def; in RegisteredOpDef() 225 TF_ASSERT_OK(NodeDefBuilder("add_attr", &old_op.op_def).Finalize(node_def())); in TEST_F() 226 ExpectSuccess(old_op.op_def); in TEST_F() 240 TF_ASSERT_OK(NodeDefBuilder("less_strict", &old_op.op_def) in TEST_F() 243 ExpectSuccess(old_op.op_def); in TEST_F() 258 TF_ASSERT_OK(NodeDefBuilder("remove_restriction", &old_op.op_def) in TEST_F() 261 ExpectSuccess(old_op.op_def); in TEST_F() 277 TF_ASSERT_OK(NodeDefBuilder("attr_order", &old_op.op_def) in TEST_F() [all …]
|
D | op_def_util.cc | 150 const OpDef::AttrDef* FindAttr(StringPiece name, const OpDef& op_def) { in FindAttr() argument 151 for (int i = 0; i < op_def.attr_size(); ++i) { in FindAttr() 152 if (op_def.attr(i).name() == name) { in FindAttr() 153 return &op_def.attr(i); in FindAttr() 159 OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def) { in FindAttrMutable() argument 160 for (int i = 0; i < op_def->attr_size(); ++i) { in FindAttrMutable() 161 if (op_def->attr(i).name() == name) { in FindAttrMutable() 162 return op_def->mutable_attr(i); in FindAttrMutable() 168 const OpDef::ArgDef* FindInputArg(StringPiece name, const OpDef& op_def) { in FindInputArg() argument 169 for (int i = 0; i < op_def.input_arg_size(); ++i) { in FindInputArg() [all …]
|
D | node_def_util_test.cc | 37 return op_reg_data.op_def; in ToOpDef() 52 void ExpectSuccess(const NodeDef& good, const OpDef& op_def) { in ExpectSuccess() argument 53 EXPECT_EQ(Status::OK(), ValidateNodeDef(good, op_def)) in ExpectSuccess() 55 << "; OpDef: " << SummarizeOpDef(op_def); in ExpectSuccess() 58 void ExpectFailure(const NodeDef& bad, const OpDef& op_def, in ExpectFailure() argument 60 Status status = ValidateNodeDef(bad, op_def); in ExpectFailure() 63 << "; OpDef: " << SummarizeOpDef(op_def); in ExpectFailure() 68 << "; OpDef: " << SummarizeOpDef(op_def); in ExpectFailure() 73 << "; OpDef: " << SummarizeOpDef(op_def) << "\nActual error: " << status in ExpectFailure() 374 const OpDef op_def = ToOpDef(OpDefBuilder("Simple") in TEST() local [all …]
|
D | op_def_builder.cc | 108 strings::StrCat(__VA_ARGS__, AttrError(orig, op_def->name()))); \ 146 void FinalizeAttr(StringPiece spec, OpDef* op_def, in FinalizeAttr() argument 148 OpDef::AttrDef* attr = op_def->add_attr(); in FinalizeAttr() 331 __VA_ARGS__, InOutError(is_output, orig, op_def->name()))); \ 336 void FinalizeInputOrOutput(StringPiece spec, bool is_output, OpDef* op_def, in FinalizeInputOrOutput() argument 339 is_output ? op_def->add_output_arg() : op_def->add_input_arg(); in FinalizeInputOrOutput() 367 const OpDef::AttrDef* attr = FindAttr(type_or_attr, *op_def); in FinalizeInputOrOutput() 392 OpDef::AttrDef* attr = FindAttrMutable(arg->number_attr(), op_def); in FinalizeInputOrOutput() 400 OpDef::AttrDef* attr = FindAttrMutable(arg->type_list_attr(), op_def); in FinalizeInputOrOutput() 414 op_def->set_is_stateful(true); in FinalizeInputOrOutput() [all …]
|
D | fake_input.cc | 31 FakeInputImpl(const OpDef* op_def, int in_index, const NodeDef* node_def, 59 FakeInputImpl::FakeInputImpl(const OpDef* op_def, int in_index, in FakeInputImpl() argument 61 : op_def_(op_def), in FakeInputImpl() 62 arg_(&op_def->input_arg(in_index)), in FakeInputImpl() 193 return [](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() 195 FakeInputImpl impl(&op_def, in_index, &node_def, builder); in FakeInput() 201 return [dt](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() argument 203 FakeInputImpl impl(&op_def, in_index, &node_def, builder); in FakeInput() 210 return [n](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() argument 212 FakeInputImpl impl(&op_def, in_index, &node_def, builder); in FakeInput() [all …]
|
D | op_def_util.h | 31 Status ValidateOpDef(const OpDef& op_def); 35 Status CheckOpDeprecation(const OpDef& op_def, int graph_def_version); 44 const OpDef::AttrDef* FindAttr(StringPiece name, const OpDef& op_def); 45 OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def); 49 const OpDef::ArgDef* FindInputArg(StringPiece name, const OpDef& op_def); 57 string SummarizeOpDef(const OpDef& op_def); 76 void RemoveDescriptionsFromOpDef(OpDef* op_def); 80 void RemoveNonDeprecationDescriptionsFromOpDef(OpDef* op_def);
|
D | node_def_util.cc | 402 Status InputTypeForNode(const NodeDef& node_def, const OpDef& op_def, in InputTypeForNode() argument 405 for (const auto& arg : op_def.input_arg()) { in InputTypeForNode() 417 Status InputTypesForNode(const NodeDef& node_def, const OpDef& op_def, in InputTypesForNode() argument 419 for (const auto& arg : op_def.input_arg()) { in InputTypesForNode() 425 Status OutputTypeForNode(const NodeDef& node_def, const OpDef& op_def, in OutputTypeForNode() argument 428 for (const auto& arg : op_def.output_arg()) { in OutputTypeForNode() 440 Status OutputTypesForNode(const NodeDef& node_def, const OpDef& op_def, in OutputTypesForNode() argument 442 for (const auto& arg : op_def.output_arg()) { in OutputTypesForNode() 448 Status InOutTypesForNode(const NodeDef& node_def, const OpDef& op_def, in InOutTypesForNode() argument 450 TF_RETURN_IF_ERROR(InputTypesForNode(node_def, op_def, inputs)); in InOutTypesForNode() [all …]
|
D | op.cc | 38 const OpDef** op_def) const { in LookUpOpDef() 39 *op_def = nullptr; in LookUpOpDef() 42 *op_def = &op_reg_data->op_def; in LookUpOpDef() 129 op_defs->push_back(p.second->op_def); in GetRegisteredOps() 166 *out->Add() = item.second->op_def; in Export() 224 s = ValidateOpDef(op_reg_data->op_def); in RegisterAlreadyLocked() 226 !gtl::InsertIfNotPresent(®istry_, op_reg_data->op_def.name(), in RegisterAlreadyLocked() 228 s = errors::AlreadyExists("Op with name ", op_reg_data->op_def.name()); in RegisterAlreadyLocked() 233 watcher_status = watcher_(s, op_reg_data->op_def); in RegisterAlreadyLocked() 252 for (const OpDef& op_def : op_list->op()) { in OpListOpRegistry() local [all …]
|
D | common_shape_fns_test.cc | 47 return op_reg_data.op_def; in MakeOpDef() 58 OpDef op_def = op_reg_data.op_def; in TEST() local 66 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({}), S({10})}, {}, in TEST() 78 OpDef op_def = op_reg_data.op_def; in TEST() local 85 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({})}, {}, {}, {}); in TEST() 92 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, in TEST() 109 OpDef op_def = op_reg_data.op_def; in TEST() local 120 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, in TEST() 130 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, in TEST() 140 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({2}), S({3, 4})}, in TEST() [all …]
|
D | op_def_builder.h | 42 OpRegistrationData(const OpDef& def) : op_def(def) {} in OpRegistrationData() 45 : op_def(def), shape_inference_fn(fn), is_function_op(is_function) {} in op_def() function 47 OpDef op_def; member 162 OpDef* op_def() { return &op_reg_data_.op_def; } in op_def() function
|
D | node_def_util.h | 257 Status InputTypeForNode(const NodeDef& node_def, const OpDef& op_def, 261 Status InputTypesForNode(const NodeDef& node_def, const OpDef& op_def, 265 Status OutputTypeForNode(const NodeDef& node_def, const OpDef& op_def, 269 Status OutputTypesForNode(const NodeDef& node_def, const OpDef& op_def, 273 Status InOutTypesForNode(const NodeDef& node_def, const OpDef& op_def, 277 Status NumOutputsForNode(const NodeDef& node_def, const OpDef& op_def, 285 Status ValidateNodeDef(const NodeDef& node_def, const OpDef& op_def); 297 Status NameRangesForNode(const NodeDef& node_def, const OpDef& op_def, 299 Status NameRangesForNode(const Node& node, const OpDef& op_def, 303 void AddDefaultsToNodeDef(const OpDef& op_def, NodeDef* node_def);
|
D | graph_def_util_test.cc | 31 Status FinalizeOpDef(const OpDefBuilder& b, OpDef* op_def) { in FinalizeOpDef() argument 34 *op_def = op_reg_data.op_def; in FinalizeOpDef() 231 OpDef* op_def = op_list.add_op(); in TEST() local 232 op_def->set_name(op); in TEST() 233 op_def->set_summary("summary"); in TEST() 234 op_def->set_description("description"); in TEST() 235 op_def->set_is_commutative(op == "B"); in TEST()
|
D | memory_types.cc | 80 const OpDef* op_def; in MemoryTypesForNode() local 81 TF_RETURN_IF_ERROR(op_registry->LookUpOpDef(ndef.op(), &op_def)); in MemoryTypesForNode() 91 InOutTypesForNode(ndef, *op_def, &inp_dtypes, &out_dtypes)); in MemoryTypesForNode() 111 TF_RETURN_IF_ERROR(NameRangesForNode(ndef, *op_def, &inp_names, &out_names)); in MemoryTypesForNode() 125 "' not found in OpDef: ", SummarizeOpDef(*op_def)); in MemoryTypesForNode()
|
/external/tensorflow/tensorflow/python/framework/ |
D | op_def_library.py | 37 def _Attr(op_def, name): argument 38 for attr in op_def.attr: 42 (op_def.name, name)) 234 def __init__(self, op_def): argument 235 self.op_def = op_def 238 for arg in list(op_def.input_arg) + list(op_def.output_arg): 242 (arg.name, op_def.name, num_type_fields)) 244 attr_type = _Attr(op_def, arg.type_attr).type 248 (arg.type_attr, op_def.name, attr_type)) 250 attr_type = _Attr(op_def, arg.type_list_attr).type [all …]
|
D | op_def_registry.py | 33 for op_def in op_list.op: 34 if op_def.name in _registered_ops: 35 assert _registered_ops[op_def.name] == op_def 37 _registered_ops[op_def.name] = op_def
|
D | importer.py | 110 op_def = op_dict[node.op] 111 _SetDefaultAttrValues(node, op_def) 138 def _FindAttrInOpDef(attr_name, op_def): argument 139 for attr_def in op_def.attr: 160 op_def = op_dict[node.op] 165 if _FindAttrInOpDef(key, op_def) is None: 329 def _SetDefaultAttrValues(node_def, op_def): argument 331 assert node_def.op == op_def.name 332 for attr_def in op_def.attr:
|
/external/tensorflow/tensorflow/core/ops/ |
D | tpu_embedding_ops.cc | 88 auto* op_def = &op_reg_data->op_def; in RegisterPerTableLoadOpsForAlgorithmBody() local 89 op_def->set_name( in RegisterPerTableLoadOpsForAlgorithmBody() 97 auto* arg = op_def->add_input_arg(); in RegisterPerTableLoadOpsForAlgorithmBody() 103 auto* table_id_attr = op_def->add_attr(); in RegisterPerTableLoadOpsForAlgorithmBody() 111 auto* table_name_attr = op_def->add_attr(); in RegisterPerTableLoadOpsForAlgorithmBody() 117 auto* num_shards_attr = op_def->add_attr(); in RegisterPerTableLoadOpsForAlgorithmBody() 122 auto* shard_id_attr = op_def->add_attr(); in RegisterPerTableLoadOpsForAlgorithmBody() 137 op_def->set_is_commutative(false); in RegisterPerTableLoadOpsForAlgorithmBody() 138 op_def->set_is_aggregate(false); in RegisterPerTableLoadOpsForAlgorithmBody() 139 op_def->set_is_stateful(true); in RegisterPerTableLoadOpsForAlgorithmBody() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | resource_operation_table_test.cc | 31 bool HasResourceInputOrOutput(const OpDef& op_def) { in HasResourceInputOrOutput() argument 32 return absl::c_any_of(op_def.input_arg(), IsResourceArgDef) || in HasResourceInputOrOutput() 33 absl::c_any_of(op_def.output_arg(), IsResourceArgDef); in HasResourceInputOrOutput() 46 const OpDef* op_def; in TEST() local 47 TF_ASSERT_OK(OpRegistry::Global()->LookUpOpDef(xla_op_name, &op_def)); in TEST() 48 if (HasResourceInputOrOutput(*op_def)) { in TEST()
|
/external/tensorflow/tensorflow/js/ops/ |
D | ts_op_gen.cc | 53 GenTypeScriptOp(const OpDef& op_def, const ApiDef& api_def); 89 GenTypeScriptOp::GenTypeScriptOp(const OpDef& op_def, const ApiDef& api_def) in GenTypeScriptOp() argument 90 : op_def_(op_def), api_def_(api_def), num_outputs_(0) {} in GenTypeScriptOp() 229 void WriteTSOp(const OpDef& op_def, const ApiDef& api_def, WritableFile* ts) { in WriteTSOp() argument 230 GenTypeScriptOp ts_op(op_def, api_def); in WriteTSOp() 231 TF_CHECK_OK(ts->Append(GenTypeScriptOp(op_def, api_def).Code())); in WriteTSOp() 274 for (const auto& op_def : ops.op()) { in WriteTSOps() local 276 if (op_def.has_deprecation() && in WriteTSOps() 277 op_def.deprecation().version() <= TF_GRAPH_DEF_VERSION) { in WriteTSOps() 281 const auto* api_def = api_def_map.GetApiDef(op_def.name()); in WriteTSOps() [all …]
|
/external/tensorflow/tensorflow/java/src/gen/cc/ |
D | op_specs.cc | 46 explicit TypeResolver(const OpDef& op_def) : op_def_(op_def) {} in TypeResolver() argument 335 EndpointSpec CreateEndpoint(const OpDef& op_def, const ApiDef& api_def, in CreateEndpoint() argument 354 OpSpec OpSpec::Create(const OpDef& op_def, const ApiDef& api_def) { in Create() argument 356 op_def.deprecation().explanation()); in Create() 357 TypeResolver type_resolver(op_def); in Create() 359 for (int i = 0; i < op_def.input_arg().size(); ++i) { in Create() 360 if (op_def.input_arg(i).name() == next_input_name) { in Create() 361 op.inputs_.push_back(CreateInput(op_def.input_arg(i), api_def.in_arg(i), in Create() 367 for (int i = 0; i < op_def.attr().size(); ++i) { in Create() 370 if (!type_resolver.IsAttributeVisited(op_def.attr(i).name())) { in Create() [all …]
|
/external/tensorflow/tensorflow/core/graph/ |
D | validate_test.cc | 102 *op_list.add_op() = op_reg_data.op_def; in TEST() 114 *op_list.add_op() = op_reg_data.op_def; in TEST() 130 for (const OpDef& op_def : op_list.op()) { in TEST() local 131 if (op_def.name() == "FloatInput") { in TEST() 135 if (op_def.name() == "Int32Input") { in TEST() 139 if (op_def.name() == "HasDocs") { in TEST() 142 EXPECT_TRUE(op_def.summary().empty()); in TEST()
|
D | graph.cc | 39 NodeProperties(const OpDef* op_def, const NodeDef& node_def, in NodeProperties() 41 : op_def(op_def), in NodeProperties() 46 const OpDef* op_def; // not owned member 159 InOutTypesForNode(props_->node_def, *(props_->op_def), &inputs, &outputs); in UpdateProperties() 164 props_ = std::make_shared<NodeProperties>(props_->op_def, props_->node_def, in UpdateProperties() 171 const OpDef& Node::op_def() const { return *props_->op_def; } in op_def() function in tensorflow::Node 407 const OpDef* op_def; in AddNode() local 408 status->Update(ops_.LookUpOpDef(node_def.op(), &op_def)); in AddNode() 413 status->Update(InOutTypesForNode(node_def, *op_def, &inputs, &outputs)); in AddNode() 420 std::make_shared<NodeProperties>(op_def, node_def, inputs, outputs), in AddNode() [all …]
|
D | node_builder.cc | 45 NodeBuilder::NodeBuilder(StringPiece name, const OpDef* op_def) in NodeBuilder() argument 46 : def_builder_(name, op_def) {} in NodeBuilder() 124 TF_RETURN_IF_ERROR(ValidateNodeDef(node_def, def_builder_.op_def())); in Finalize() 126 CheckOpDeprecation(def_builder_.op_def(), graph->versions().producer())); in Finalize() 149 def_builder_.op_def().name())); in AddIndexError() 154 def_builder_.op_def().name(), ". Node: ", FormatNodeForError(*node))); in AddIndexError()
|
/external/tensorflow/tensorflow/core/common_runtime/eager/ |
D | attr_builder.cc | 56 Status OpDefForOp(const char* op_name, const OpDef** op_def) { in OpDefForOp() argument 60 *op_def = &op_reg_data->op_def; in OpDefForOp() 71 const OpDef* op_def = nullptr; in AttrTypeMapForOp() local 72 Status s = OpDefForOp(op_name, &op_def); in AttrTypeMapForOp() 89 for (const auto& attr : op_def->attr()) { in AttrTypeMapForOp() 169 const OpDef* op_def = nullptr; in FillAttrValueMap() local 170 Status s = OpDefForOp(op_name_.c_str(), &op_def); in FillAttrValueMap() 175 DCHECK(op_def); in FillAttrValueMap() 176 for (const auto& attr_def : op_def->attr()) { in FillAttrValueMap()
|
/external/tensorflow/tensorflow/core/grappler/ |
D | op_types.cc | 583 const OpDef* op_def; in MaybeHasRefInput() local 584 Status status = OpRegistry::Global()->LookUpOpDef(node.op(), &op_def); in MaybeHasRefInput() 589 for (const auto& input : op_def->input_arg()) { in MaybeHasRefInput() 605 const OpDef* op_def = nullptr; in IsStateful() local 607 Status status = op_registry->LookUpOpDef(op_name, &op_def); in IsStateful() 613 return op_def->is_stateful(); in IsStateful() 626 const OpDef* op_def = nullptr; in IsFreeOfSideEffect() local 628 Status status = op_registry->LookUpOpDef(op_name, &op_def); in IsFreeOfSideEffect() 632 if (op_def->is_stateful()) { in IsFreeOfSideEffect() 636 for (const auto& input : op_def->input_arg()) { in IsFreeOfSideEffect() [all …]
|