/external/tensorflow/tensorflow/core/grappler/ |
D | op_types.h | 25 bool IsAdd(const NodeDef& node); 26 bool IsAddN(const NodeDef& node); 27 bool IsAll(const NodeDef& node); 28 bool IsAngle(const NodeDef& node); 29 bool IsAny(const NodeDef& node); 30 bool IsAnyDiv(const NodeDef& node); 31 bool IsAnyMax(const NodeDef& node); 32 bool IsAnyMaxPool(const NodeDef& node); 33 bool IsAnyMin(const NodeDef& node); 34 bool IsApproximateEqual(const NodeDef& node); [all …]
|
D | op_types.cc | 29 bool IsAdd(const NodeDef& node) { in IsAdd() 37 bool IsAddN(const NodeDef& node) { return node.op() == "AddN"; } in IsAddN() 39 bool IsAll(const NodeDef& node) { return node.op() == "All"; } in IsAll() 41 bool IsAngle(const NodeDef& node) { return node.op() == "Angle"; } in IsAngle() 43 bool IsAny(const NodeDef& node) { return node.op() == "Any"; } in IsAny() 45 bool IsAnyDiv(const NodeDef& node) { in IsAnyDiv() 50 bool IsAnyMax(const NodeDef& node) { in IsAnyMax() 55 bool IsAnyMaxPool(const NodeDef& node) { in IsAnyMaxPool() 61 bool IsAnyMin(const NodeDef& node) { in IsAnyMin() 66 bool IsApproximateEqual(const NodeDef& node) { in IsApproximateEqual() [all …]
|
D | utils.h | 48 NodeDef* GetNode(const string& name) const; 50 const std::set<NodeDef*>& GetOutputs(const string& node_name) const; 53 void AddNode(const string& name, NodeDef* node); 65 const std::set<NodeDef*> empty_set_; 66 gtl::FlatMap<string, NodeDef*> nodes_; 67 gtl::FlatMap<string, std::set<NodeDef*>> outputs_; 236 string AsControlDependency(const NodeDef& node); 243 bool NodeIsOnCpu(const NodeDef* node); 246 bool NodeIsOnGpu(const NodeDef* node); 250 int NumOutputs(const NodeDef& node, GraphDef* graph); [all …]
|
D | mutable_graph_view.h | 43 class MutableGraphView : public internal::GraphViewInternal<GraphDef, NodeDef> { 46 for (NodeDef& node : *graph->mutable_node()) AddUniqueNodeOrDie(&node); in MutableGraphView() 47 for (NodeDef& node : *graph->mutable_node()) AddAndDedupFanouts(&node); in MutableGraphView() 64 NodeDef* AddNode(NodeDef&& node); 255 void AddAndDedupFanouts(NodeDef* node); 284 Status UpdateFanoutsInternal(NodeDef* from_node, NodeDef* to_node); 289 bool AddFaninInternal(NodeDef* node, const OutputPort& fanin); 298 NodeDef* GetControllingFaninToAdd(absl::string_view node_name, 304 NodeDef* GetOrCreateIdentityConsumingSwitch(const OutputPort& fanin); 307 bool RemoveRegularFaninInternal(NodeDef* node, const OutputPort& fanin); [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | constant_folding.h | 41 NodeDef* node, size_t original_size = 0); 59 string OptimizedNodeName(const NodeDef& node, StringPiece suffix) const; 60 bool OptimizedNodeExists(const NodeDef& node, StringPiece suffix) const; 62 bool IsReallyConstant(const NodeDef& node) const; 66 Status MaterializeBroadcastGradientArgs(const NodeDef& node, 68 Status MaterializeReductionIndices(NodeDef* node, 70 Status MaterializeConstantValuedNode(NodeDef* node, 74 bool IsFoldable(const NodeDef& node) const; 76 Status EvaluateNode(const NodeDef& node, 80 Status EvaluateOneFoldable(const NodeDef& node, std::vector<NodeDef>* outputs, [all …]
|
D | memory_optimizer.cc | 71 std::unordered_set<const NodeDef*> FindCandidateRecomputeNodes( in FindCandidateRecomputeNodes() 73 const std::function<bool(const NodeDef&)>& is_candidate, in FindCandidateRecomputeNodes() 74 const std::function<bool(const NodeDef&)>& is_target) { in FindCandidateRecomputeNodes() 75 std::unordered_set<const NodeDef*> candidate_recompute_nodes; in FindCandidateRecomputeNodes() 81 for (const NodeDef* output : node_map.GetOutputs(node.name())) { in FindCandidateRecomputeNodes() 95 const NodeDef* input_node = node_map.GetNode(input_name); in FindCandidateRecomputeNodes() 111 const std::function<bool(const NodeDef&)>& is_candidate, in connected_subgraph() 112 std::unordered_set<const NodeDef*>* expanded_nodes) { in connected_subgraph() 113 std::queue<const NodeDef*> to_visit; in connected_subgraph() 114 for (const NodeDef* starting_node : *expanded_nodes) { in connected_subgraph() [all …]
|
D | auto_parallel_test.cc | 57 const NodeDef& node_assign = output.node(0); in TEST_F() 61 const NodeDef& node_constant_b = output.node(1); in TEST_F() 64 const NodeDef& node_fifo_queue = output.node(2); in TEST_F() 67 const NodeDef& node_identity = output.node(3); in TEST_F() 71 const NodeDef& node_var = output.node(4); in TEST_F() 74 const NodeDef& node_div_const0 = output.node(5); in TEST_F() 78 const NodeDef& node_div0 = output.node(6); in TEST_F() 81 const NodeDef& node_add0 = output.node(7); in TEST_F() 84 const NodeDef& node_gradient0 = output.node(8); in TEST_F() 87 const NodeDef& node_constant_a0 = output.node(9); in TEST_F() [all …]
|
D | remapper.cc | 65 explicit FusedBatchNorm(const NodeDef* fused_batch_norm) in FusedBatchNorm() 68 const NodeDef* fused_batch_norm = nullptr; 74 Conv2DWithBiasAdd(const NodeDef* conv2d, const NodeDef* bias_add) in Conv2DWithBiasAdd() 77 const NodeDef* conv2d = nullptr; 78 const NodeDef* bias_add = nullptr; 84 Conv2DWithBiasAddAndRelu(const NodeDef* conv2d, const NodeDef* bias_add, in Conv2DWithBiasAddAndRelu() 85 const NodeDef* relu) in Conv2DWithBiasAddAndRelu() 88 const NodeDef* conv2d = nullptr; 89 const NodeDef* bias_add = nullptr; 90 const NodeDef* relu = nullptr; [all …]
|
D | static_schedule.cc | 32 const VirtualPlacer& placer, const NodeDef& node) { in PredictExecutionTime() 61 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* completion_times) { in EstimateEarliestExecutionTimes() argument 62 std::unordered_map<string, const NodeDef*> name_map; in EstimateEarliestExecutionTimes() 63 std::unordered_map<const NodeDef*, int> pending_inputs; in EstimateEarliestExecutionTimes() 64 std::deque<const NodeDef*> ready_nodes; in EstimateEarliestExecutionTimes() 65 for (const NodeDef& node : item.graph.node()) { in EstimateEarliestExecutionTimes() 79 std::unordered_map<const NodeDef*, std::vector<const NodeDef*>> fanouts; in EstimateEarliestExecutionTimes() 80 for (const NodeDef& node : item.graph.node()) { in EstimateEarliestExecutionTimes() 88 const NodeDef* fanin = it->second; in EstimateEarliestExecutionTimes() 100 const NodeDef* node = ready_nodes.front(); in EstimateEarliestExecutionTimes() [all …]
|
D | arithmetic_optimizer.cc | 70 bool ValuesFromConstNode(const NodeDef& node, std::vector<T>* values) { in ValuesFromConstNode() 112 bool MaybeAddControlInput(const string& new_input, NodeDef* node, in MaybeAddControlInput() 130 void SetDataTypeToAttr(DataType dtype, const string& attr_name, NodeDef* node) { in SetDataTypeToAttr() 134 NodeDef* GetTailOfValuePreservingChain( in GetTailOfValuePreservingChain() 135 const NodeDef& node, const NodeMap& node_map, in GetTailOfValuePreservingChain() 137 auto is_value_preserving_non_branching = [&](const NodeDef& node) { in GetTailOfValuePreservingChain() 145 NodeDef* GetTailOfIdempotentChain( in GetTailOfIdempotentChain() 146 const NodeDef& node, const NodeMap& node_map, in GetTailOfIdempotentChain() 148 auto is_idempotent_non_branching = [&](const NodeDef& node) { in GetTailOfIdempotentChain() 194 explicit ArithmeticOptimizerContext(SetVector<NodeDef*>* nodes_to_simplify) in ArithmeticOptimizerContext() [all …]
|
/external/tensorflow/tensorflow/core/grappler/costs/ |
D | virtual_scheduler.h | 40 std::vector<std::pair<const NodeDef*, int>> inputs; // Input, port pairs. 43 std::unordered_map<int, std::vector<const NodeDef*>> outputs; 89 std::vector<const NodeDef*> nodes_executed; 94 const std::pair<const NodeDef*, int>& element) const { in operator() 95 return std::hash<const NodeDef*>()(element.first); in operator() 101 std::unordered_set<std::pair<const NodeDef*, int>, NodePairHash> 105 std::unordered_set<std::pair<const NodeDef*, int>, NodePairHash> 110 std::unordered_set<std::pair<const NodeDef*, int>, NodePairHash> 136 const std::unordered_map<const NodeDef*, NodeState>* node_state) {} in Init() argument 137 virtual void AddNode(const NodeDef* node) = 0; [all …]
|
/external/tensorflow/tensorflow/core/framework/ |
D | node_def_util.h | 35 class NodeDef; variable 51 string SummarizeNodeDef(const NodeDef& node_def); 52 string SummarizeAttrs(const NodeDef& node_def); 58 string FormatNodeDefForError(const NodeDef& node_def); 63 void MergeDebugInfo(const NodeDebugInfo& from, NodeDef* to); 64 void MergeDebugInfo(const NodeDef& from, NodeDef* to); 70 void AddNodeAttr(StringPiece name, const AttrValue& value, NodeDef* node_def); 71 void AddNodeAttr(StringPiece name, StringPiece value, NodeDef* node_def); 72 void AddNodeAttr(StringPiece name, const char* value, NodeDef* node_def); 73 void AddNodeAttr(StringPiece name, int32 value, NodeDef* node_def); [all …]
|
D | node_def_util_test.cc | 40 NodeDef ToNodeDef(const string& text) { in ToNodeDef() 41 NodeDef node_def; in ToNodeDef() 46 NodeDef ToNodeDef(const NodeDefBuilder& builder) { in ToNodeDef() 47 NodeDef node_def; in ToNodeDef() 52 void ExpectSuccess(const NodeDef& good, const OpDef& op_def) { in ExpectSuccess() 58 void ExpectFailure(const NodeDef& bad, const OpDef& op_def, in ExpectFailure() 79 const NodeDef node_def = ToNodeDef(R"proto( in TEST() 87 NodeDef bad = node_def; in TEST() 124 NodeDef good = node_def; in TEST() 144 const NodeDef node_def = ToNodeDef(R"proto( in TEST() [all …]
|
/external/tensorflow/tensorflow/core/grappler/optimizers/data/ |
D | graph_utils.h | 51 NodeDef* AddNode(StringPiece name, StringPiece op, 57 NodeDef* AddScalarPlaceholder(DataType dtype, MutableGraphView* graph); 61 NodeDef* AddScalarConstNode(T v, MutableGraphView* graph) { in AddScalarConstNode() 70 NodeDef* AddScalarConstNode(bool v, MutableGraphView* graph); 72 NodeDef* AddScalarConstNode(double v, MutableGraphView* graph); 74 NodeDef* AddScalarConstNode(float v, MutableGraphView* graph); 76 NodeDef* AddScalarConstNode(int v, MutableGraphView* graph); 78 NodeDef* AddScalarConstNode(int64 v, MutableGraphView* graph); 80 NodeDef* AddScalarConstNode(StringPiece v, MutableGraphView* graph); 109 NodeDef* GetInputNode(const NodeDef& node, const MutableGraphView& graph); [all …]
|
D | map_vectorization.cc | 59 FunctionDef* CreateMapDefunWrapper(const NodeDef& map_node, in CreateMapDefunWrapper() 70 NodeDef* map_defun_node = vectorized_func->mutable_node_def()->Add(); in CreateMapDefunWrapper() 112 FunctionDef* AddVectorizedFunction(const NodeDef& map_node, in AddVectorizedFunction() 119 const NodeDef& map_defun_node = vectorized_func->node_def(0); in AddVectorizedFunction() 135 bool IsOutputShapesFullyDefined(const NodeDef& node) { in IsOutputShapesFullyDefined() 153 Status GetInputMap(const NodeDef& node, NameRangeMap* result) { in GetInputMap() 162 const NodeDef& from, NodeDef* to) { in CopyInputs() 177 const NodeDef& node, string* result) { in GetInputNodeName() 191 Status AddNewBatchNode(const NodeDef& old_batch_node, const NodeDef& input_node, in AddNewBatchNode() 193 MutableGraphView* graph, NodeDef** new_batch_node) { in AddNewBatchNode() [all …]
|
D | map_and_batch_fusion_test.cc | 32 NodeDef *start_node = graph_utils::AddScalarConstNode<int64>(0, &graph); in TEST() 33 NodeDef *stop_node = graph_utils::AddScalarConstNode<int64>(10, &graph); in TEST() 34 NodeDef *step_node = graph_utils::AddScalarConstNode<int64>(1, &graph); in TEST() 41 NodeDef *range_node = graph_utils::AddNode("", "RangeDataset", range_inputs, in TEST() 43 NodeDef *captured_input_node = in TEST() 46 NodeDef *map_node; in TEST() 62 NodeDef *batch_size_node = graph_utils::AddScalarConstNode<int64>(5, &graph); in TEST() 63 NodeDef *batch_node; in TEST() 89 NodeDef map_and_batch_node = output.node(graph_utils::FindGraphNodeWithOp( in TEST() 95 NodeDef num_parallel_calls_node = output.node( in TEST() [all …]
|
D | hoist_random_uniform.cc | 39 NodeDef MakeStatelessMap(const NodeDef& map_node, const NodeDef& zip_node, in MakeStatelessMap() 42 NodeDef stateless_map; in MakeStatelessMap() 68 NodeDef MakeRandomDataset(const NodeDef& random_uniform_node, in MakeRandomDataset() 70 NodeDef random_dataset; in MakeRandomDataset() 90 NodeDef MakeBatchTwo(const NodeDef& random_dataset, MutableGraphView* graph) { in MakeBatchTwo() 91 NodeDef batch_dataset; in MakeBatchTwo() 113 NodeDef MakeZipNode(const NodeDef& first_node, const NodeDef& second_node, in MakeZipNode() 115 NodeDef zip_node; in MakeZipNode() 183 const NodeDef** random_uniform_op) { in CanHoistRandomUniform() 216 int NumberOfPlaceholders(const NodeDef& map_node) { in NumberOfPlaceholders() [all …]
|
D | graph_utils.cc | 57 std::vector<int> CreateInputIndex(const NodeDef& node) { in CreateInputIndex() 70 NodeDef* AddScalarConstNodeHelper( in AddScalarConstNodeHelper() 73 NodeDef node; in AddScalarConstNodeHelper() 92 NodeDef* AddScalarPlaceholder(DataType dtype, MutableGraphView* graph) { in AddScalarPlaceholder() 93 NodeDef node; in AddScalarPlaceholder() 102 NodeDef* AddNode(StringPiece name, StringPiece op, in AddNode() 106 NodeDef node; in AddNode() 123 NodeDef* AddScalarConstNode(bool v, MutableGraphView* graph) { in AddScalarConstNode() 129 NodeDef* AddScalarConstNode(double v, MutableGraphView* graph) { in AddScalarConstNode() 135 NodeDef* AddScalarConstNode(float v, MutableGraphView* graph) { in AddScalarConstNode() [all …]
|
/external/tensorflow/tensorflow/core/grappler/utils/ |
D | traversal.h | 37 DfsCallbacks(std::function<void(const NodeDef*)> pre, in DfsCallbacks() 38 std::function<void(const NodeDef*)> post, in DfsCallbacks() 39 std::function<void(const NodeDef*, const NodeDef*)> back_edge) in DfsCallbacks() 44 static DfsCallbacks PreOrder(std::function<void(const NodeDef*)> pre) { in PreOrder() 48 static DfsCallbacks PostOrder(std::function<void(const NodeDef*)> post) { in PostOrder() 52 std::function<void(const NodeDef*)> pre_order; 53 std::function<void(const NodeDef*)> post_order; 54 std::function<void(const NodeDef*, const NodeDef*)> on_back_edge; 67 DfsPredicates(std::function<bool(const NodeDef*)> enter, in DfsPredicates() 68 std::function<bool(const NodeDef*)> advance) in DfsPredicates() [all …]
|
/external/tensorflow/tensorflow/tools/graph_transforms/ |
D | strip_unused_nodes_test.cc | 41 NodeDef* add_node = graph_def.add_node(); in TestSimpleAdd() 47 NodeDef* a_node = graph_def.add_node(); in TestSimpleAdd() 51 NodeDef* b_node = graph_def.add_node(); in TestSimpleAdd() 55 NodeDef* c_node = graph_def.add_node(); in TestSimpleAdd() 62 std::map<string, const NodeDef*> node_lookup; in TestSimpleAdd() 73 NodeDef* add_node1 = graph_def.add_node(); in TestCommonAncestor() 79 NodeDef* add_node2 = graph_def.add_node(); in TestCommonAncestor() 85 NodeDef* add_node3 = graph_def.add_node(); in TestCommonAncestor() 91 NodeDef* const_node1 = graph_def.add_node(); in TestCommonAncestor() 95 NodeDef* const_node2 = graph_def.add_node(); in TestCommonAncestor() [all …]
|
D | remove_nodes_test.cc | 41 NodeDef* add_node1 = graph_def.add_node(); in TestRemoveNodes() 47 NodeDef* add_node2 = graph_def.add_node(); in TestRemoveNodes() 53 NodeDef* add_node3 = graph_def.add_node(); in TestRemoveNodes() 59 NodeDef* identity_node1 = graph_def.add_node(); in TestRemoveNodes() 64 NodeDef* identity_node2 = graph_def.add_node(); in TestRemoveNodes() 69 NodeDef* identity_node3 = graph_def.add_node(); in TestRemoveNodes() 74 NodeDef* const_node1 = graph_def.add_node(); in TestRemoveNodes() 78 NodeDef* const_node2 = graph_def.add_node(); in TestRemoveNodes() 82 NodeDef* const_node3 = graph_def.add_node(); in TestRemoveNodes() 86 NodeDef* add_node4 = graph_def.add_node(); in TestRemoveNodes() [all …]
|
D | sort_by_execution_order_test.cc | 35 const NodeDef& node = graph_def.node(i); in GetOrder() 42 NodeDef* add_node = graph_def.add_node(); in TestSimpleAdd() 48 NodeDef* b_node = graph_def.add_node(); in TestSimpleAdd() 52 NodeDef* a_node = graph_def.add_node(); in TestSimpleAdd() 69 NodeDef* negative_node = graph_def.add_node(); in TestSimpleLinear() 74 NodeDef* relu_node = graph_def.add_node(); in TestSimpleLinear() 79 NodeDef* sqrt_node = graph_def.add_node(); in TestSimpleLinear() 84 NodeDef* const_node = graph_def.add_node(); in TestSimpleLinear() 102 NodeDef* add_node1 = graph_def.add_node(); in TestSimpleTree() 108 NodeDef* add_node2 = graph_def.add_node(); in TestSimpleTree() [all …]
|
D | fuse_convolutions.cc | 48 std::vector<NodeDef>* new_nodes) { in FuseResizePadAndConv() 50 const NodeDef& conv_node = match.node; in FuseResizePadAndConv() 51 const NodeDef& mirror_pad_node = match.inputs[0].node; in FuseResizePadAndConv() 52 const NodeDef& weights_node = match.inputs[1].node; in FuseResizePadAndConv() 53 const NodeDef& resize_node = match.inputs[0].inputs[0].node; in FuseResizePadAndConv() 54 const NodeDef& pad_dims_node = match.inputs[0].inputs[1].node; in FuseResizePadAndConv() 61 NodeDef fused_conv; in FuseResizePadAndConv() 97 std::vector<NodeDef>* new_nodes) { in FuseResizeAndConv() 99 const NodeDef& conv_node = match.node; in FuseResizeAndConv() 100 const NodeDef& resize_node = match.inputs[0].node; in FuseResizeAndConv() [all …]
|
D | backports_test.cc | 45 NodeDef* mul_node1 = graph_def.add_node(); in TestBackportConcatV2() 51 NodeDef* add_node2 = graph_def.add_node(); in TestBackportConcatV2() 57 NodeDef* add_node3 = graph_def.add_node(); in TestBackportConcatV2() 63 NodeDef* const_node1 = graph_def.add_node(); in TestBackportConcatV2() 67 NodeDef* const_node2 = graph_def.add_node(); in TestBackportConcatV2() 71 NodeDef* const_node3 = graph_def.add_node(); in TestBackportConcatV2() 75 NodeDef* concat_node = graph_def.add_node(); in TestBackportConcatV2() 89 std::map<string, const NodeDef*> node_lookup; in TestBackportConcatV2() 111 NodeDef* size_node = graph_def.add_node(); in TEST() 118 NodeDef* tensor_array_node = graph_def.add_node(); in TEST() [all …]
|
D | sparsify_gather_test.cc | 41 NodeDef* CreateNode(const StringPiece name, const StringPiece op, in CreateNode() 42 const std::vector<NodeDef*>& inputs, GraphDef* graph_def, in CreateNode() 44 NodeDef* node_def = graph_def->add_node(); in CreateNode() 48 std::for_each(inputs.begin(), inputs.end(), [&node_def](NodeDef* input) { in CreateNode() 52 std::for_each(inputs.begin(), inputs.end(), [&node_def](NodeDef* input) { in CreateNode() 59 void MakeGather(StringPiece name, bool gather_v2, NodeDef* params, in MakeGather() 60 NodeDef* indices, GraphDef* graph_def) { in MakeGather() 62 NodeDef* axis_node = in MakeGather() 81 NodeDef* input_node = CreateNode("ids", "Const", {}, &graph_def); in TestSinglePartition() 82 NodeDef* w_node; in TestSinglePartition() [all …]
|