/external/tensorflow/tensorflow/core/framework/ |
D | node_def_util_test.cc | 41 NodeDef node_def; in ToNodeDef() local 42 EXPECT_TRUE(protobuf::TextFormat::MergeFromString(text, &node_def)); in ToNodeDef() 43 return node_def; in ToNodeDef() 47 NodeDef node_def; in ToNodeDef() local 48 TF_EXPECT_OK(builder.Finalize(&node_def)); in ToNodeDef() 49 return node_def; in ToNodeDef() 79 const NodeDef node_def = ToNodeDef(R"proto( in TEST() local 82 ExpectSuccess(node_def, op); in TEST() 84 EXPECT_EQ("{{node n}} = In[T=DT_FLOAT](a)", SummarizeNodeDef(node_def)); in TEST() 87 NodeDef bad = node_def; in TEST() [all …]
|
D | node_def_util.h | 66 std::string SummarizeNodeDef(const NodeDef& node_def, 68 std::string SummarizeAttrs(const NodeDef& node_def); 74 std::string FormatNodeDefForError(const NodeDef& node_def); 83 void AddNodeAttr(StringPiece name, const AttrValue& value, NodeDef* node_def); 84 void AddNodeAttr(StringPiece name, AttrValue&& value, NodeDef* node_def); 85 void AddNodeAttr(StringPiece name, StringPiece value, NodeDef* node_def); 86 void AddNodeAttr(StringPiece name, const char* value, NodeDef* node_def); 87 void AddNodeAttr(StringPiece name, int32 value, NodeDef* node_def); 88 void AddNodeAttr(StringPiece name, int64 value, NodeDef* node_def); 89 void AddNodeAttr(StringPiece name, float value, NodeDef* node_def); [all …]
|
D | node_properties_test.cc | 62 const NodeDef& node_def, in ValidateNodeProperties() argument 66 EXPECT_EQ(props.node_def.name(), node_def.name()); in ValidateNodeProperties() 83 NodeDef node_def; in TEST() local 84 node_def.set_name("foo"); in TEST() 91 NodeProperties props_from_slices(&op_def, node_def, input_types_slice, in TEST() 93 ValidateNodeProperties(props_from_slices, &op_def, node_def, input_types, in TEST() 97 NodeProperties props_from_vectors(&op_def, node_def, input_types, in TEST() 99 ValidateNodeProperties(props_from_vectors, &op_def, node_def, input_types, in TEST() 105 NodeDef node_def; in TEST() local 106 node_def.set_name("bar"); in TEST() [all …]
|
D | node_def_util.cc | 53 AttrSlice::AttrSlice(const NodeDef& node_def) in AttrSlice() argument 54 : ndef_(&node_def), attrs_(&ndef_->attr()) {} in AttrSlice() 103 string SummarizeNodeDef(const NodeDef& node_def, int max_inputs_in_summary) { in SummarizeNodeDef() argument 104 string ret = strings::StrCat(errors::FormatNodeNameForError(node_def.name()), in SummarizeNodeDef() 105 " = ", node_def.op(), "["); in SummarizeNodeDef() 106 strings::StrAppend(&ret, SummarizeAttrsHelper(node_def, node_def.device())); in SummarizeNodeDef() 111 for (const string& input : node_def.input()) { in SummarizeNodeDef() 124 string SummarizeAttrs(const NodeDef& node_def) { in SummarizeAttrs() argument 125 return SummarizeAttrsHelper(node_def, node_def.device()); in SummarizeAttrs() 138 string FormatNodeDefForError(const NodeDef& node_def) { in FormatNodeDefForError() argument [all …]
|
D | op_compatibility_test.cc | 47 TF_CHECK_OK(OpRegistry::Global()->LookUpOpDef(node_def()->op(), &op_def)); in RegisteredOpDef() 54 TF_ASSERT_OK(InOutTypesForNode(*node_def(), old_op_def, &old_in_types, in ExpectSuccess() 59 AddDefaultsToNodeDef(*new_op_def, node_def()); in ExpectSuccess() 62 TF_ASSERT_OK(ValidateNodeDef(*node_def(), *new_op_def)); in ExpectSuccess() 64 TF_ASSERT_OK(InOutTypesForNode(*node_def(), *new_op_def, &new_in_types, in ExpectSuccess() 110 TF_ASSERT_OK(InOutTypesForNode(*node_def(), old_op_def, &old_in_types, in ExpectInvalid() 115 AddDefaultsToNodeDef(*new_op_def, node_def()); in ExpectInvalid() 118 Status status = ValidateNodeDef(*node_def(), *new_op_def); in ExpectInvalid() 120 ADD_FAILURE() << SummarizeNodeDef(*node_def()); in ExpectInvalid() 133 TF_ASSERT_OK(InOutTypesForNode(*node_def(), old_op_def, &old_in_types, in ExpectTypeMismatch() [all …]
|
D | graph_def_util.cc | 72 NodeDef* node_def = graph_def->mutable_node(i); in AddDefaultAttrsToGraphDef() local 74 Status s = op_registry.LookUpOpDef(node_def->op(), &op_def); in AddDefaultAttrsToGraphDef() 76 AddDefaultsToNodeDef(*op_def, node_def); in AddDefaultAttrsToGraphDef() 86 NodeDef* node_def, const OpRegistryInterface& consumer_op_registry, in RemoveNewDefaultAttrsFromNodeDef() argument 92 producer_op_registry.LookUpOpDef(node_def->op(), &producer_op_def)); in RemoveNewDefaultAttrsFromNodeDef() 94 consumer_op_registry.LookUpOpDef(node_def->op(), &consumer_op_def)); in RemoveNewDefaultAttrsFromNodeDef() 97 for (const auto& attr : node_def->attr()) { in RemoveNewDefaultAttrsFromNodeDef() 107 " but found in node: ", FormatNodeDefForError(*node_def)); in RemoveNewDefaultAttrsFromNodeDef() 121 node_def->mutable_attr()->erase(attr_name); in RemoveNewDefaultAttrsFromNodeDef() 123 op_attr_removed->insert(std::make_pair(node_def->op(), attr_name)); in RemoveNewDefaultAttrsFromNodeDef() [all …]
|
D | fake_input.cc | 31 FakeInputImpl(const OpDef* op_def, int in_index, const NodeDef* node_def, 60 const NodeDef* node_def, NodeDefBuilder* builder) in FakeInputImpl() argument 64 node_def_(node_def), 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() 219 return [n, dt](const OpDef& op_def, int in_index, const NodeDef& node_def, in FakeInput() argument [all …]
|
/external/tensorflow/tensorflow/python/framework/ |
D | errors_impl.py | 70 def __init__(self, node_def, op, message, error_code): argument 81 self._node_def = node_def 119 def node_def(self): member in OpError 231 def __init__(self, node_def, op, message): argument 233 super(CancelledError, self).__init__(node_def, op, message, CANCELLED) 250 def __init__(self, node_def, op, message, error_code=UNKNOWN): argument 252 super(UnknownError, self).__init__(node_def, op, message, error_code) 270 def __init__(self, node_def, op, message): argument 272 super(InvalidArgumentError, self).__init__(node_def, op, message, 285 def __init__(self, node_def, op, message): argument [all …]
|
D | op_def_library_test.py | 51 """, out.op.node_def) 56 """, out.op.node_def) 61 """, out.op.node_def) 67 """, out.op.node_def) 117 """, op.node_def) 126 """, out.op.node_def) 133 """, out.op.node_def) 140 """, out.op.node_def) 154 """, out.op.node_def) 161 """, out.op.node_def) [all …]
|
D | function_def_to_graph.py | 173 node_def = graph_def.node.add() 174 node_def.name = arg_def.name 175 node_def.op = "Placeholder" 176 node_def.attr["dtype"].type = arg_def.type 181 node_def.attr["shape"].shape.CopyFrom(input_shape) 187 node_def.attr["shape"].shape.CopyFrom(arg_attrs[k].list.shape[0]) 189 node_def.attr[k].CopyFrom(arg_attrs[k]) 192 graph_def.node.extend(fdef.node_def) 206 for node_def in fdef.node_def: 209 f = graph._functions.get(node_def.op, None) # pylint: disable=protected-access [all …]
|
D | meta_graph.py | 71 node_def = copy.deepcopy(from_node_def) 72 for i, v in enumerate(node_def.input): 74 not node_def.input[i].lstrip("^").startswith(export_scope)): 77 node_def.input[i] = re.sub(r"([\^]|^)(.*)", 80 unbound_inputs.append(node_def.input[i]) 82 node_def.input[i] = ops.strip_name_scope(v, export_scope) 83 node_def.name = compat.as_bytes( 91 node_def.attr[k].CopyFrom(attr_value_pb2.AttrValue( 93 elif node_def.op in ("Enter", "RefEnter") and k == "frame_name": 96 node_def.attr[k].CopyFrom(attr_value_pb2.AttrValue(s=new_s)) [all …]
|
D | graph_to_function_def.py | 61 return op.node_def # pylint: disable=protected-access 105 func.node_def.extend([_get_node_def(op)]) 106 node_def = func.node_def[-1] 107 for i in range(len(node_def.input)): 108 if not node_def.input[i].startswith("^"): 109 assert node_def.input[i] in input_dict, ("%s missing from %s" % 110 (node_def.input[i], 112 node_def.input[i] = input_dict[node_def.input[i]]
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | graph_constructor.cc | 60 inline bool IsMerge(const NodeDef& node_def) { in IsMerge() argument 61 return node_def.op() == "Merge" || node_def.op() == "RefMerge" || in IsMerge() 62 node_def.op() == "_XlaMerge"; in IsMerge() 65 inline bool IsNextIteration(const NodeDef& node_def) { in IsNextIteration() argument 66 return node_def.op() == "NextIteration" || in IsNextIteration() 67 node_def.op() == "RefNextIteration"; in IsNextIteration() 227 Status IsNodeFullyMapped(const NodeDef& node_def, bool* is_node_mapped); 228 Status ValidateColocationConstraints(const NodeDef& node_def); 229 Status MakeNode(NodeDef&& node_def, Node** node); 232 Status ModifyNodeDefForImport(NodeDef* node_def); [all …]
|
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/ |
D | convert_nodes.cc | 499 TFTRT_RETURN_ERROR_IF_NULLPTR(*tensor, params->node_def.name()); 511 TFAttrs attrs(params->node_def); in CreateBroadcastableScalarConstant() 1102 const NodeDef& node_def, const std::vector<TRT_TensorOrWeights>& inputs, in OpConverterParams() argument 1106 : node_def(node_def), in OpConverterParams() 1116 Converter* converter, const NodeDef& node_def, in OpConverterParams() argument 1120 node_def(node_def), in OpConverterParams() 1148 const NodeDef& node_def, int output_port, in ConvertToTensorOrWeights() argument 1150 if (node_def.op() == "Const") { in ConvertToTensorOrWeights() 1162 return ConvertConstToWeights(node_def, inputs, tensor_or_weights); in ConvertToTensorOrWeights() 1164 if (!graph_properties_.HasOutputProperties(node_def.name())) { in ConvertToTensorOrWeights() [all …]
|
D | convert_nodes_test.cc | 155 NodeDef node_def; local 156 node_def.set_name(name); 157 node_def.set_op(op); 159 node_def.add_input(input); 162 (*node_def.mutable_attr())[attr.first] = attr.second; 164 return node_def; 765 Status GetInputs(const NodeDef& node_def, in GetInputs() argument 767 return converter_->GetInputs(node_def, inputs); in GetInputs() 804 NodeDef node_def = MakeNodeDef("my_op", "MyOp", {"my_input"}); in TEST_F() local 809 ExpectStatus(converter_->ConvertNode(node_def), error::UNIMPLEMENTED, in TEST_F() [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | implementation_selector.cc | 149 NodeDef* node_def = node_view->node(); in UpdateNodeDef() local 151 VLOG(3) << "Node def before swap is: " << node_def->DebugString(); in UpdateNodeDef() 154 node_def->mutable_attr()->find("f")->second.mutable_func()->set_name( in UpdateNodeDef() 158 auto tin = node_def->mutable_attr()->find("Tin"); in UpdateNodeDef() 165 auto tout = node_def->mutable_attr()->find("Tout"); in UpdateNodeDef() 175 for (int i = node_def->input_size() - 1; i >= 0; --i) { in UpdateNodeDef() 176 if (!IsControlInput(node_def->input(i))) break; in UpdateNodeDef() 177 control_deps.push_back(node_def->input(i)); in UpdateNodeDef() 178 node_def->mutable_input()->RemoveLast(); in UpdateNodeDef() 182 const int prev_input_size = node_def->input_size(); in UpdateNodeDef() [all …]
|
/external/tensorflow/tensorflow/python/util/ |
D | kernel_registry.cc | 29 tensorflow::NodeDef node_def; in TryFindKernelClass() local 30 if (!node_def.ParseFromString(serialized_node_def)) { in TryFindKernelClass() 37 tensorflow::OpRegistry::Global()->LookUp(node_def.op(), &op_reg_data); in TryFindKernelClass() 39 LOG(WARNING) << "Op " << node_def.op() << " not found: " << status; in TryFindKernelClass() 42 AddDefaultsToNodeDef(op_reg_data->op_def, &node_def); in TryFindKernelClass() 45 if (!tensorflow::DeviceNameUtils::ParseFullName(node_def.device(), in TryFindKernelClass() 48 << node_def.ShortDebugString(); in TryFindKernelClass() 53 tensorflow::DeviceType(parsed_name.type.c_str()), node_def, in TryFindKernelClass() 56 LOG(WARNING) << "Op [" << node_def.op() << "]: " << status; in TryFindKernelClass()
|
/external/tensorflow/tensorflow/core/ops/ |
D | state_ops_test.cc | 31 .Finalize(&op.node_def)); in TEST() 46 .Finalize(&op.node_def)); in TEST() 56 .Finalize(&op.node_def)); in TEST() 78 .Finalize(&op.node_def)); in TEST() 99 .Finalize(&op.node_def)); in TEST() 109 .Finalize(&op.node_def)); in TEST() 116 .Finalize(&op.node_def)); in TEST() 122 .Finalize(&op.node_def)); in TEST() 132 .Finalize(&op.node_def)); in TEST() 138 .Finalize(&op.node_def)); in TEST() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | upgrade_graph.cc | 45 auto is_resource_op_with_empty_shared_name = [](const NodeDef& node_def, in GenerateResourceSharedNameIfEmpty() 68 auto iter = node_def.attr().find("shared_name"); in GenerateResourceSharedNameIfEmpty() 69 if (iter == node_def.attr().end()) return true; in GenerateResourceSharedNameIfEmpty() 83 for (auto& node_def : *fdef.mutable_node_def()) { in GenerateResourceSharedNameIfEmpty() 85 TF_RETURN_IF_ERROR(flib_def->LookUpOpDef(node_def.op(), &op_def)); in GenerateResourceSharedNameIfEmpty() 86 if (is_resource_op_with_empty_shared_name(node_def, *op_def)) { in GenerateResourceSharedNameIfEmpty() 90 (*node_def.mutable_attr())["shared_name"].set_s( in GenerateResourceSharedNameIfEmpty() 91 absl::StrCat(node_def.name(), "@", func_name)); in GenerateResourceSharedNameIfEmpty() 98 for (auto& node_def : *gdef.mutable_node()) { in GenerateResourceSharedNameIfEmpty() 100 TF_RETURN_IF_ERROR(flib_def->LookUpOpDef(node_def.op(), &op_def)); in GenerateResourceSharedNameIfEmpty() [all …]
|
D | export_graphdef.cc | 214 auto node_def = absl::make_unique<NodeDef>(); in GetArgumentNode() local 216 node_def->set_name(name.str()); in GetArgumentNode() 218 node_def->set_name( in GetArgumentNode() 221 node_def->set_op(FunctionLibraryDefinition::kArgOp); in GetArgumentNode() 225 node_def->mutable_attr())); in GetArgumentNode() 232 (*node_def->mutable_attr())["T"] = type_attr; in GetArgumentNode() 236 (*node_def->mutable_attr())["index"] = index_attr; in GetArgumentNode() 240 *node_def->mutable_device() = device_attr.getValue().str(); in GetArgumentNode() 247 node_def->mutable_attr())); in GetArgumentNode() 249 return node_def; in GetArgumentNode() [all …]
|
/external/tensorflow/tensorflow/python/saved_model/ |
D | function_deserialization.py | 391 op.node_def.attr["f"].func.name)] 428 def _check_op_has_custom_gradients(node_def): argument 430 return ("_gradient_op_type" in node_def.attr and 431 node_def.op not in ["StatefulPartitionedCall", "PartitionedCall"]) 434 def fix_node_def(node_def, functions, shared_name_suffix): argument 436 if node_def.op in functions: 437 node_def.op = functions[node_def.op].name 438 for _, attr_value in node_def.attr.items(): 446 if node_def.op == "HashTableV2": 447 if ("use_node_name_sharing" not in node_def.attr or [all …]
|
/external/tensorflow/tensorflow/lite/tools/ |
D | list_flex_ops.cc | 49 string FindTensorflowKernelClass(tensorflow::NodeDef* node_def) { in FindTensorflowKernelClass() argument 50 if (!node_def || node_def->op().empty()) { in FindTensorflowKernelClass() 56 tensorflow::OpRegistry::Global()->LookUp(node_def->op(), &op_reg_data); in FindTensorflowKernelClass() 58 LOG(FATAL) << "Op " << node_def->op() << " not found: " << status; in FindTensorflowKernelClass() 60 AddDefaultsToNodeDef(op_reg_data->op_def, node_def); in FindTensorflowKernelClass() 63 if (!tensorflow::DeviceNameUtils::ParseFullName(node_def->device(), in FindTensorflowKernelClass() 66 << node_def->ShortDebugString(); in FindTensorflowKernelClass() 70 tensorflow::DeviceType(parsed_name.type.c_str()), *node_def, in FindTensorflowKernelClass() 73 LOG(FATAL) << "Failed to find kernel class for op: " << node_def->op(); in FindTensorflowKernelClass()
|
/external/tensorflow/tensorflow/compiler/tf2xla/ |
D | sharding_util_test.cc | 63 NodeDef node_def; in TEST_P() local 65 node_def.set_op("_Arg"); in TEST_P() 66 node_def.set_name("arg"); in TEST_P() 73 node_def.mutable_attr()->insert( in TEST_P() 104 test_sharding_metadata([&node_def]() { in TEST_P() 105 return GetShardingFromNodeDef(node_def, /*add_metadata=*/true); in TEST_P() 110 test_sharding_metadata([&node_def]() { in TEST_P() 111 return ParseShardingFromDevice(node_def, /*num_cores_per_replica=*/1, in TEST_P() 119 Node* node = graph.AddNode(node_def, &status); in TEST_P()
|
D | sharding_util.cc | 89 const NodeDef& node_def, int num_cores_per_replica, bool add_metadata) { in ParseShardingFromDevice() argument 90 const string& device_name = node_def.device(); in ParseShardingFromDevice() 92 GetShardingFromNodeDef(node_def, add_metadata)); in ParseShardingFromDevice() 96 CreateOpMetadata(node_def.op(), node_def.name())) in ParseShardingFromDevice() 151 const NodeDef& node_def, bool add_metadata) { in GetShardingFromNodeDef() argument 152 if (!HasNodeAttr(node_def, kShardingAttribute)) { in GetShardingFromNodeDef() 157 TF_RETURN_IF_ERROR(GetNodeAttr(node_def, kShardingAttribute, &value)); in GetShardingFromNodeDef() 164 AssignOpMetadataToSharding(sharding, node_def.op(), node_def.name()); in GetShardingFromNodeDef()
|
/external/tensorflow/tensorflow/compiler/jit/ |
D | xla_kernel_creator.cc | 76 return CanCreateXlaKernel(props->node_def) && in CanCreateKernel() 81 const NodeDef& node_def, in CreateXlaKernel() argument 83 if (!CanCreateXlaKernel(node_def)) { in CreateXlaKernel() 84 return errors::Internal("Invalid node: ", node_def.ShortDebugString()); in CreateXlaKernel() 87 VLOG(3) << "Attempting to create XlaLaunchOp for " << node_def.DebugString(); in CreateXlaKernel() 94 TF_RETURN_IF_ERROR(NameAndAttrsFromFunctionCall(node_def, &function)); in CreateXlaKernel() 117 if (!IsCompilable(flr, node_def, &uncompilable_nodes_map)) { in CreateXlaKernel() 127 SummarizeNodeDef(node_def, /*max_inputs_in_summary=*/10), ".\n"); in CreateXlaKernel() 159 &fbody->fdef.signature(), node_def, fbody->arg_types, fbody->ret_types); in CreateXlaKernel() 176 return CreateXlaKernel(flr, props->node_def, kernel); in CreateKernel()
|