Home
last modified time | relevance | path

Searched refs:op_def (Results 1 – 25 of 108) sorted by relevance

12345

/external/tensorflow/tensorflow/core/framework/
Dop_compatibility_test.cc44 const OpDef* op_def; in RegisteredOpDef() local
45 TF_CHECK_OK(OpRegistry::Global()->LookUpOpDef(node_def()->op(), &op_def)); in RegisteredOpDef()
46 return op_def; in RegisteredOpDef()
224 TF_ASSERT_OK(NodeDefBuilder("add_attr", &old_op.op_def).Finalize(node_def())); in TEST_F()
225 ExpectSuccess(old_op.op_def); in TEST_F()
239 TF_ASSERT_OK(NodeDefBuilder("less_strict", &old_op.op_def) in TEST_F()
242 ExpectSuccess(old_op.op_def); in TEST_F()
257 TF_ASSERT_OK(NodeDefBuilder("remove_restriction", &old_op.op_def) in TEST_F()
260 ExpectSuccess(old_op.op_def); in TEST_F()
275 TF_ASSERT_OK(NodeDefBuilder("attr_order", &old_op.op_def) in TEST_F()
[all …]
Dop_def_util.cc146 const OpDef::AttrDef* FindAttr(StringPiece name, const OpDef& op_def) { in FindAttr() argument
147 for (int i = 0; i < op_def.attr_size(); ++i) { in FindAttr()
148 if (op_def.attr(i).name() == name) { in FindAttr()
149 return &op_def.attr(i); in FindAttr()
155 OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def) { in FindAttrMutable() argument
156 for (int i = 0; i < op_def->attr_size(); ++i) { in FindAttrMutable()
157 if (op_def->attr(i).name() == name) { in FindAttrMutable()
158 return op_def->mutable_attr(i); in FindAttrMutable()
164 const OpDef::ArgDef* FindInputArg(StringPiece name, const OpDef& op_def) { in FindInputArg() argument
165 for (int i = 0; i < op_def.input_arg_size(); ++i) { in FindInputArg()
[all …]
Dop_def_builder.cc108 strings::StrCat(__VA_ARGS__, AttrError(orig, op_def->name()))); \
144 void FinalizeAttr(StringPiece spec, OpDef* op_def, in FinalizeAttr() argument
146 OpDef::AttrDef* attr = op_def->add_attr(); in FinalizeAttr()
318 __VA_ARGS__, InOutError(is_output, orig, op_def->name()))); \
323 void FinalizeInputOrOutput(StringPiece spec, bool is_output, OpDef* op_def, in FinalizeInputOrOutput() argument
326 is_output ? op_def->add_output_arg() : op_def->add_input_arg(); in FinalizeInputOrOutput()
354 const OpDef::AttrDef* attr = FindAttr(type_or_attr, *op_def); in FinalizeInputOrOutput()
379 OpDef::AttrDef* attr = FindAttrMutable(arg->number_attr(), op_def); in FinalizeInputOrOutput()
387 OpDef::AttrDef* attr = FindAttrMutable(arg->type_list_attr(), op_def); in FinalizeInputOrOutput()
401 op_def->set_is_stateful(true); in FinalizeInputOrOutput()
[all …]
Dnode_def_util_test.cc34 return op_reg_data.op_def; in ToOpDef()
49 void ExpectSuccess(const NodeDef& good, const OpDef& op_def) { in ExpectSuccess() argument
50 EXPECT_EQ(Status::OK(), ValidateNodeDef(good, op_def)) in ExpectSuccess()
52 << "; OpDef: " << SummarizeOpDef(op_def); in ExpectSuccess()
55 void ExpectFailure(const NodeDef& bad, const OpDef& op_def, in ExpectFailure() argument
57 Status status = ValidateNodeDef(bad, op_def); in ExpectFailure()
60 << "; OpDef: " << SummarizeOpDef(op_def); in ExpectFailure()
65 << "; OpDef: " << SummarizeOpDef(op_def); in ExpectFailure()
70 << "; OpDef: " << SummarizeOpDef(op_def) << "\nActual error: " << status in ExpectFailure()
369 const OpDef op_def = ToOpDef(OpDefBuilder("Simple") in TEST() local
[all …]
Dop.cc37 const OpDef** op_def) const { in LookUpOpDef()
38 *op_def = nullptr; in LookUpOpDef()
41 *op_def = &op_reg_data->op_def; in LookUpOpDef()
109 op_defs->push_back(p.second->op_def); in GetRegisteredOps()
137 *out->Add() = item.second->op_def; in Export()
195 s = ValidateOpDef(op_reg_data->op_def); in RegisterAlreadyLocked()
197 !gtl::InsertIfNotPresent(&registry_, op_reg_data->op_def.name(), in RegisterAlreadyLocked()
199 s = errors::AlreadyExists("Op with name ", op_reg_data->op_def.name()); in RegisterAlreadyLocked()
204 watcher_status = watcher_(s, op_reg_data->op_def); in RegisterAlreadyLocked()
223 for (const OpDef& op_def : op_list->op()) { in OpListOpRegistry() local
[all …]
Dfake_input.cc31 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 …]
Dop_def_util.h30 Status ValidateOpDef(const OpDef& op_def);
34 Status CheckOpDeprecation(const OpDef& op_def, int graph_def_version);
43 const OpDef::AttrDef* FindAttr(StringPiece name, const OpDef& op_def);
44 OpDef::AttrDef* FindAttrMutable(StringPiece name, OpDef* op_def);
48 const OpDef::ArgDef* FindInputArg(StringPiece name, const OpDef& op_def);
52 string SummarizeOpDef(const OpDef& op_def);
71 void RemoveDescriptionsFromOpDef(OpDef* op_def);
75 void RemoveNonDeprecationDescriptionsFromOpDef(OpDef* op_def);
Dnode_def_util.cc350 Status InputTypeForNode(const NodeDef& node_def, const OpDef& op_def, in InputTypeForNode() argument
353 for (const auto& arg : op_def.input_arg()) { in InputTypeForNode()
365 Status OutputTypeForNode(const NodeDef& node_def, const OpDef& op_def, in OutputTypeForNode() argument
368 for (const auto& arg : op_def.output_arg()) { in OutputTypeForNode()
380 Status InOutTypesForNode(const NodeDef& node_def, const OpDef& op_def, in InOutTypesForNode() argument
382 for (const auto& arg : op_def.input_arg()) { in InOutTypesForNode()
385 for (const auto& arg : op_def.output_arg()) { in InOutTypesForNode()
391 Status ValidateNodeDef(const NodeDef& node_def, const OpDef& op_def) { in ValidateNodeDef() argument
392 if (node_def.op() != op_def.name()) { in ValidateNodeDef()
394 "' does not match ", SummarizeOpDef(op_def), in ValidateNodeDef()
[all …]
Dcommon_shape_fns_test.cc46 return op_reg_data.op_def; in MakeOpDef()
57 OpDef op_def = op_reg_data.op_def; in TEST() local
65 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({}), S({10})}, {}, in TEST()
77 OpDef op_def = op_reg_data.op_def; in TEST() local
84 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({})}, {}, {}, {}); in TEST()
91 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, in TEST()
108 OpDef op_def = op_reg_data.op_def; in TEST() local
119 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, in TEST()
129 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, in TEST()
139 InferenceContext c(TF_GRAPH_DEF_VERSION, &def, op_def, {S({2}), S({3, 4})}, in TEST()
[all …]
Dop_def_builder.h40 OpRegistrationData(const OpDef& def) : op_def(def) {} in OpRegistrationData()
43 : op_def(def), shape_inference_fn(fn), is_function_op(is_function) {} in op_def() function
45 OpDef op_def; member
153 OpDef* op_def() { return &op_reg_data_.op_def; } in op_def() function
Dgraph_def_util_test.cc31 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()
Dgraph_def_util.cc65 const OpDef* op_def; in AddDefaultAttrsToGraphDef() local
66 TF_RETURN_IF_ERROR(op_registry.LookUpOpDef(node_def->op(), &op_def)); in AddDefaultAttrsToGraphDef()
67 AddDefaultsToNodeDef(*op_def, node_def); in AddDefaultAttrsToGraphDef()
209 const OpDef* op_def; in StrippedOpListForGraph() local
210 TF_RETURN_IF_ERROR(op_registry.LookUpOpDef(op_name, &op_def)); in StrippedOpListForGraph()
212 stripped_op->CopyFrom(*op_def); in StrippedOpListForGraph()
Dmemory_types.cc75 const OpDef* op_def; in MemoryTypesForNode() local
76 TF_RETURN_IF_ERROR(op_registry->LookUpOpDef(ndef.op(), &op_def)); in MemoryTypesForNode()
86 InOutTypesForNode(ndef, *op_def, &inp_dtypes, &out_dtypes)); in MemoryTypesForNode()
106 TF_RETURN_IF_ERROR(NameRangesForNode(ndef, *op_def, &inp_names, &out_names)); in MemoryTypesForNode()
120 "' not found in OpDef: ", SummarizeOpDef(*op_def)); in MemoryTypesForNode()
Ddataset.h179 const OpDef* op_def; in EnsureFunctionIsStateless() local
180 TF_RETURN_IF_ERROR(lib_def->LookUpOpDef(node_def.op(), &op_def)); in EnsureFunctionIsStateless()
185 if (IsOpWhitelisted(op_def)) { in EnsureFunctionIsStateless()
188 if (op_def->is_stateful()) { in EnsureFunctionIsStateless()
203 bool IsOpWhitelisted(const OpDef* op_def) const { in IsOpWhitelisted() argument
204 return (StringPiece(op_def->name()).ends_with("Dataset") && in IsOpWhitelisted()
205 op_def->output_arg_size() == 1 && in IsOpWhitelisted()
206 op_def->output_arg(0).type() == DT_VARIANT) || in IsOpWhitelisted()
208 op_def->name()); in IsOpWhitelisted()
213 bool HasAttr(const OpDef* op_def, const string& attr_name) const { in HasAttr() argument
[all …]
Dop_def_builder_test.cc48 OpDef& op_def = op_reg_data.op_def; in ExpectSuccess() local
54 CanonicalizeAttrTypeListOrder(&op_def); in ExpectSuccess()
56 EXPECT_EQ(op_def.ShortDebugString(), expected.ShortDebugString()); in ExpectSuccess()
68 OpDef& op_def = op_reg_data.op_def; in ExpectOrdered() local
73 EXPECT_EQ(op_def.ShortDebugString(), expected.ShortDebugString()); in ExpectOrdered()
632 const OpDef& op_def = op_reg_data.op_def; in TEST_F() local
633 EXPECT_TRUE(op_def.is_stateful()); in TEST_F()
/external/tensorflow/tensorflow/python/framework/
Dop_def_library.py37 def _Attr(op_def, name): argument
38 for attr in op_def.attr:
42 (op_def.name, name))
218 def __init__(self, op_def): argument
219 self.op_def = op_def
222 for arg in list(op_def.input_arg) + list(op_def.output_arg):
226 (arg.name, op_def.name, num_type_fields))
228 attr_type = _Attr(op_def, arg.type_attr).type
232 (arg.type_attr, op_def.name, attr_type))
234 attr_type = _Attr(op_def, arg.type_list_attr).type
[all …]
Dop_def_registry.py33 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
Dpython_op_gen.cc163 string ArgTypeName(const OpDef& op_def, const OpDef::ArgDef& arg, in ArgTypeName() argument
174 const OpDef::AttrDef* attr = FindAttr(arg.number_attr(), op_def); in ArgTypeName()
197 const OpDef::AttrDef* attr = FindAttr(arg.type_attr(), op_def); in ArgTypeName()
215 const OpDef::AttrDef* attr = FindAttr(attr_name, op_def); in ArgTypeName()
248 string GetReturns(const OpDef& op_def, in GetReturns() argument
251 DCHECK_EQ(op_def.output_arg_size(), output_type_string.size()); in GetReturns()
252 const int num_outs = op_def.output_arg_size(); in GetReturns()
258 StringPiece description = op_def.output_arg(0).description(); in GetReturns()
271 desc = op_def.output_arg(0).description(); in GetReturns()
272 } else if (!op_def.output_arg(0).name().empty()) { in GetReturns()
[all …]
Dimporter.py83 op_def = op_dict[node_def.op]
84 return _ArgsToTypes(node_def, op_def.input_arg)
88 op_def = op_dict[node_def.op]
89 return _ArgsToTypes(node_def, op_def.output_arg)
177 op_def = op_dict[node.op]
178 _SetDefaultAttrValues(node, op_def)
205 def _FindAttrInOpDef(attr_name, op_def): argument
206 for attr_def in op_def.attr:
227 op_def = op_dict[node.op]
232 if _FindAttrInOpDef(key, op_def) is None:
[all …]
/external/tensorflow/tensorflow/core/graph/
Dvalidate_test.cc101 *op_list.add_op() = op_reg_data.op_def; in TEST()
113 *op_list.add_op() = op_reg_data.op_def; in TEST()
129 for (const OpDef& op_def : op_list.op()) { in TEST() local
130 if (op_def.name() == "FloatInput") { in TEST()
134 if (op_def.name() == "Int32Input") { in TEST()
138 if (op_def.name() == "HasDocs") { in TEST()
141 EXPECT_TRUE(op_def.summary().empty()); in TEST()
Dgraph.cc38 NodeProperties(const OpDef* op_def, const NodeDef& node_def, in NodeProperties() argument
40 : op_def(op_def), in NodeProperties()
45 const OpDef* op_def; // not owned member in tensorflow::NodeProperties
143 const OpDef& Node::op_def() const { return *props_->op_def; } in op_def() function in tensorflow::Node
324 const OpDef* op_def; in AddNode() local
325 status->Update(ops_.LookUpOpDef(node_def.op(), &op_def)); in AddNode()
330 status->Update(InOutTypesForNode(node_def, *op_def, &inputs, &outputs)); in AddNode()
337 std::make_shared<NodeProperties>(op_def, node_def, inputs, outputs), in AddNode()
351 const OpDef* op_def; in CopyNode() local
352 TF_CHECK_OK(ops_.LookUpOpDef(node->type_string(), &op_def)); in CopyNode()
[all …]
Dvalidate.cc35 const OpDef* op_def; in ValidateGraphDef() local
36 TF_RETURN_IF_ERROR(op_registry.LookUpOpDef(node_def.op(), &op_def)); in ValidateGraphDef()
37 TF_RETURN_IF_ERROR(ValidateNodeDef(node_def, *op_def)); in ValidateGraphDef()
38 TF_RETURN_IF_ERROR(CheckOpDeprecation(*op_def, version)); in ValidateGraphDef()
Dnode_builder.cc42 NodeBuilder::NodeBuilder(StringPiece name, const OpDef* op_def) in NodeBuilder() argument
43 : def_builder_(name, op_def) {} in NodeBuilder()
111 TF_RETURN_IF_ERROR(ValidateNodeDef(node_def, def_builder_.op_def())); in Finalize()
113 CheckOpDeprecation(def_builder_.op_def(), graph->versions().producer())); in Finalize()
134 def_builder_.op_def().name())); in AddIndexError()
139 ") to node with type ", def_builder_.op_def().name())); in AddIndexError()
/external/tensorflow/tensorflow/core/grappler/
Dop_types.cc348 const OpDef* op_def = nullptr; in IsFreeOfSideEffect() local
349 Status status = OpRegistry::Global()->LookUpOpDef(node.op(), &op_def); in IsFreeOfSideEffect()
353 if (op_def->is_stateful()) { in IsFreeOfSideEffect()
357 for (const auto& input : op_def->input_arg()) { in IsFreeOfSideEffect()
381 const OpDef* op_def = nullptr; \
382 Status status = OpRegistry::Global()->LookUpOpDef(node.op(), &op_def); \
383 return status.ok() && op_def->is_##PROPERTY(); \
407 const OpDef* op_def = nullptr; in HasOpDef() local
408 return OpRegistry::Global()->LookUpOpDef(node.op(), &op_def).ok(); in HasOpDef()
/external/tensorflow/tensorflow/python/eager/
Dpywrap_tfe_src.cc1350 const tensorflow::OpDef& op_def) { argument
1351 for (int i = 0; i < op_def.input_arg_size(); i++) {
1353 if (!op_def.input_arg(i).number_attr().empty() ||
1354 !op_def.input_arg(i).type_list_attr().empty()) {
1411 return &op_reg_data->op_def;
1434 const tensorflow::OpDef* op_def, PyObject* args, argument
1447 op_def->input_arg_size() -
1454 args, kFastPathExecuteInputStartIndex + op_def->input_arg_size() + i);
1532 const tensorflow::OpDef* op_def = GetOpDef(op_name); local
1533 if (op_def == nullptr) return nullptr;
[all …]

12345