Home
last modified time | relevance | path

Searched refs:MutableGraphView (Results 1 – 25 of 58) sorted by relevance

123

/aosp_15_r20/external/tensorflow/tensorflow/core/grappler/
H A Dmutable_graph_view_test.cc36 void CompareNodeFanins(const MutableGraphView& graph, NodeDef* node, in CompareNodeFanins()
48 MutableGraphView::InputPort input_port(node, port); in CompareNodeFanins()
49 MutableGraphView::OutputPort output_port = in CompareNodeFanins()
56 void CompareNodeFanouts(const MutableGraphView& graph, NodeDef* node, in CompareNodeFanouts()
63 MutableGraphView::InputPort input_port(graph.GetNode(tensor_id.node()), in CompareNodeFanouts()
69 void CheckNode(const MutableGraphView& graph, absl::string_view node_name, in CheckNode()
88 void CheckGraph(const MutableGraphView& mutable_graph) { in CheckGraph()
95 [](const absl::flat_hash_set<MutableGraphView::Edge>& mutable_edges, in CheckGraph()
152 MutableGraphView graph(&graph_def); in TEST()
174 MutableGraphView graph(&graph_def); in TEST()
[all …]
H A Dmutable_graph_view.cc56 bool IsOutputPortControlling(const MutableGraphView::OutputPort& port) { in IsOutputPortControlling()
62 bool IsIdentityConsumingSwitch(const MutableGraphView& graph, in IsIdentityConsumingSwitch()
84 bool CanDedupControlWithRegularInput(const MutableGraphView& graph, in CanDedupControlWithRegularInput()
93 bool CanDedupControlWithRegularInput(const MutableGraphView& graph, in CanDedupControlWithRegularInput()
102 bool HasRegularFaninNode(const MutableGraphView& graph, const NodeDef& node, in HasRegularFaninNode()
115 absl::flat_hash_map<MutableGraphView::OutputPort,
116 absl::flat_hash_set<MutableGraphView::InputPort>>;
118 void SwapControlledFanoutInputs(const MutableGraphView& graph, in SwapControlledFanoutInputs()
138 MutableGraphView::OutputPort port; in SwapRegularFanoutInputs()
155 void SwapFanoutInputs(const MutableGraphView& graph, FanoutsMap* fanouts, in SwapFanoutInputs()
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/core/grappler/utils/
H A Dgraph_view.h130 class MutableGraphView; variable
139 MutableGraphView> {
143 MutableFaninView(MutableGraphView* graph_view, int node_index, int port_index) in MutableFaninView()
146 explicit MutableFaninView(MutableGraphView* graph_view, int node_index, in MutableFaninView()
165 friend class MutableGraphView; variable
174 MutableGraphView> {
178 MutableFanoutView(MutableGraphView* graph_view, int node_index, in MutableFanoutView()
182 explicit MutableFanoutView(MutableGraphView* graph_view, int node_index, in MutableFanoutView()
198 friend class MutableGraphView; variable
209 MutableGraphView, false> {
[all …]
H A Dgraph_view_internal_test.cc44 const MutableGraphView* graph_view) { in GetUpdatedNodeNames()
53 using MutableNodeViewDiff = NodeViewDiff<MutableGraphView>;
59 MutableGraphView graph_view(&graph, &s); in TEST()
83 MutableGraphView graph_view(&graph, &s); in TEST()
107 MutableGraphView graph_view(&graph, &s); in TEST()
131 MutableGraphView graph_view(&graph, &s); in TEST()
177 MutableGraphView graph_view(&graph, &s); in TEST()
216 MutableGraphView graph_view(&graph, &s); in TEST()
300 MutableGraphView graph_view(&graph, &s); in TEST()
335 MutableGraphView graph_view(&graph, &s); in TEST()
[all …]
H A Dgraph_view_test.cc56 using GraphViewTypes = ::testing::Types<GraphView, MutableGraphView>;
209 MutableGraphView graph_view(&graph, &s); in TEST()
319 std::pair<MutableFanoutView, MutableGraphView>>;
432 std::pair<MutableFaninView, MutableGraphView>>;
795 void CompareGraphViewWithGraph(MutableGraphView* graph_view, in CompareGraphViewWithGraph()
974 MutableGraphView graph_view(&graph, &s); in TEST_F()
1011 MutableGraphView graph_view(&graph, &s); in TEST_F()
1033 MutableGraphView graph_view(&graph, &s); in TEST_F()
1059 MutableGraphView graph_view(&graph, &s); in TEST_F()
1080 MutableGraphView graph_view(&graph, &s); in TEST_F()
[all …]
H A Dgraph_view.cc223 Mutation::Mutation(MutableGraphView* graph_view) : graph_view_(graph_view) {} in Mutation()
464 MutableGraphView::MutableGraphView(GraphDef* graph, Status* status) in MutableGraphView() function in tensorflow::grappler::utils::MutableGraphView
490 Mutation* MutableGraphView::GetMutationBuilder() { return &mutation_; } in GetMutationBuilder()
492 bool MutableGraphView::AddUniqueNodeInternal(NodeDef* node) { in AddUniqueNodeInternal()
502 Status MutableGraphView::CheckFaninsInternal( in CheckFaninsInternal()
540 void MutableGraphView::AddFaninsInternal( in AddFaninsInternal()
606 Status MutableGraphView::GetNodeNamesAndPartitionUpdatedNodes( in GetNodeNamesAndPartitionUpdatedNodes()
692 Status MutableGraphView::RemovedOrMissingNodeFanoutsWellFormed( in RemovedOrMissingNodeFanoutsWellFormed()
770 Status MutableGraphView::CheckNodeNamesAndFanins( in CheckNodeNamesAndFanins()
807 Status MutableGraphView::CheckKernelRegisteredForNodes() { in CheckKernelRegisteredForNodes()
[all …]
H A Dpattern_utils_test.cc169 MutableGraphView graph_view(&graph, &status); in TEST_F()
251 MutableGraphView graph_view(&graph, &status); in TEST_F()
351 MutableGraphView graph_view(&graph, &status); in TEST_F()
372 MutableGraphView graph_view(&graph, &status); in TEST_F()
408 MutableGraphView graph_view(&graph, &status); in TEST_F()
429 MutableGraphView graph_view(&graph, &status); in TEST_F()
544 MutableGraphView graph_view(&graph, &status); in TEST_F()
/aosp_15_r20/external/tensorflow/tensorflow/core/grappler/optimizers/data/
H A Dgraph_utils_test.cc49 MutableGraphView graph(&graph_def); in TEST()
57 MutableGraphView graph(&graph_def); in TEST()
65 MutableGraphView graph(&graph_def); in TEST()
73 MutableGraphView graph(&graph_def); in TEST()
81 MutableGraphView graph(&graph_def); in TEST()
89 MutableGraphView graph(&graph_def); in TEST()
97 MutableGraphView graph(&graph_def); in TEST()
106 MutableGraphView graph(&graph_def); in TEST()
115 MutableGraphView graph(&graph_def); in TEST()
126 MutableGraphView graph(&graph_def); in TEST()
[all …]
H A Dgraph_utils.h55 MutableGraphView* graph);
58 NodeDef* AddScalarPlaceholder(DataType dtype, MutableGraphView* graph);
62 NodeDef* AddScalarConstNode(T v, MutableGraphView* graph) { in AddScalarConstNode()
71 NodeDef* AddScalarConstNode(bool v, MutableGraphView* graph);
73 NodeDef* AddScalarConstNode(double v, MutableGraphView* graph);
75 NodeDef* AddScalarConstNode(float v, MutableGraphView* graph);
77 NodeDef* AddScalarConstNode(int v, MutableGraphView* graph);
79 NodeDef* AddScalarConstNode(int64_t v, MutableGraphView* graph);
81 NodeDef* AddScalarConstNode(StringPiece v, MutableGraphView* graph);
125 NodeDef* GetInputNode(const NodeDef& node, const MutableGraphView& graph);
[all …]
H A Dgraph_utils.cc82 MutableGraphView* graph) { in AddScalarConstNodeHelper()
102 NodeDef* AddScalarPlaceholder(DataType dtype, MutableGraphView* graph) { in AddScalarPlaceholder()
115 MutableGraphView* graph) { in AddNode()
133 NodeDef* AddScalarConstNode(bool v, MutableGraphView* graph) { in AddScalarConstNode()
139 NodeDef* AddScalarConstNode(double v, MutableGraphView* graph) { in AddScalarConstNode()
145 NodeDef* AddScalarConstNode(float v, MutableGraphView* graph) { in AddScalarConstNode()
151 NodeDef* AddScalarConstNode(int v, MutableGraphView* graph) { in AddScalarConstNode()
157 NodeDef* AddScalarConstNode(int64_t v, MutableGraphView* graph) { in AddScalarConstNode()
163 NodeDef* AddScalarConstNode(StringPiece v, MutableGraphView* graph) { in AddScalarConstNode()
279 NodeDef* GetInputNode(const NodeDef& node, const MutableGraphView& graph) { in GetInputNode()
[all …]
H A Dnoop_elimination.cc37 bool IsTakeAll(const NodeDef& take_node, const MutableGraphView& graph) { in IsTakeAll()
55 bool IsSkipNone(const NodeDef& skip_node, const MutableGraphView& graph) { in IsSkipNone()
61 bool IsRepeatOne(const NodeDef& repeat_node, const MutableGraphView& graph) { in IsRepeatOne()
68 const MutableGraphView& graph) { in IsPrefetchZero()
74 bool IsShardOne(const NodeDef& shard_node, const MutableGraphView& graph) { in IsShardOne()
109 bool IsMapIdentity(const NodeDef& map_node, const MutableGraphView& graph) { in IsMapIdentity()
141 bool IsNoOp(const NodeDef& node, const MutableGraphView& graph) { in IsNoOp()
154 MutableGraphView graph(output); in OptimizeAndCollectStats()
H A Dauto_shard_test.cc95 MutableGraphView graph(&item.graph); in TEST()
127 MutableGraphView graph(&item.graph); in TEST()
160 MutableGraphView graph(&item.graph); in TEST()
186 MutableGraphView graph(&item.graph); in TEST()
212 MutableGraphView graph(&item.graph); in TEST()
239 MutableGraphView graph(&item.graph); in TEST()
265 MutableGraphView graph(&item.graph); in TEST()
289 MutableGraphView graph(&item.graph); in TEST()
318 MutableGraphView graph(&item.graph); in TEST()
341 MutableGraphView graph(&item.graph); in TEST()
[all …]
H A Dauto_shard.cc198 Status AddShardNode(MutableGraphView* graph, const NodeDef& add_before, in AddShardNode()
264 Status AddShuffleDataset(MutableGraphView* graph, const NodeDef& add_before, in AddShuffleDataset()
293 Status AddShuffleDatasetV2(MutableGraphView* graph, const NodeDef& add_before, in AddShuffleDatasetV2()
316 Status AddShuffleDatasetV3(MutableGraphView* graph, const NodeDef& add_before, in AddShuffleDatasetV3()
365 Status RemoveShuffleDataset(MutableGraphView* graph, const NodeDef& node, in RemoveShuffleDataset()
390 Status RemoveShuffleDatasetV2(MutableGraphView* graph, const NodeDef& node, in RemoveShuffleDatasetV2()
412 Status RemoveShuffleDatasetV3(MutableGraphView* graph, const NodeDef& node, in RemoveShuffleDatasetV3()
439 Status ProcessDatasetSourceNode(MutableGraphView* graph, const NodeDef& node, in ProcessDatasetSourceNode()
483 FunctionLibraryDefinition* flib, MutableGraphView* graph, in FindFuncAndTensorSliceDataset()
510 DropRemainderValue GetDropRemainder(const MutableGraphView& graph, in GetDropRemainder()
[all …]
H A Dnoop_elimination_test.cc39 string input_node, MutableGraphView *graph) { in MakeNode()
55 MutableGraphView *graph) { in MakeNonConstNode()
69 NodeDef *MakeCacheNode(string input_node, MutableGraphView *graph) { in MakeCacheNode()
77 NodeDef *MakeRangeNode(MutableGraphView *graph) { in MakeRangeNode()
96 MutableGraphView graph(&item.graph); in TEST_P()
138 MutableGraphView graph(&item.graph); in TEST_P()
191 MutableGraphView graph(&item.graph); in TEST_P()
255 MutableGraphView graph(&item.graph); in TEST_P()
H A Dshuffle_and_repeat_fusion.cc46 MutableGraphView* graph, GraphDef* output, in FuseShuffleV1AndRepeat()
80 MutableGraphView* graph, GraphDef* output, in FuseShuffleV2AndRepeat()
120 MutableGraphView* graph, GraphDef* output, in FuseShuffleV3AndRepeat()
161 MutableGraphView graph(output); in OptimizeAndCollectStats()
H A Dmap_and_filter_fusion.cc47 MutableGraphView* graph) { in MakeFusedNode()
89 MutableGraphView* graph, FunctionDefLibrary* library) { in MakeFilterNode()
121 const FunctionDef& fused_map_func, MutableGraphView* graph, in MakeMapNode()
171 MutableGraphView graph(output); in OptimizeAndCollectStats()
H A Dmake_deterministic.cc161 NodeDef* GetMutableNode(const string& node_name, MutableGraphView* graph) { in GetMutableNode()
171 MutableGraphView* graph) { in ConvertMapOrInterleave()
261 MutableGraphView* graph, in SplitMap()
387 Status ConvertBatch(const string& node_name, MutableGraphView* graph) { in ConvertBatch()
401 Status ConvertMapAndBatch(const string& node_name, MutableGraphView* graph) { in ConvertMapAndBatch()
481 Status ConvertPrefetch(const string& node_name, MutableGraphView* graph) { in ConvertPrefetch()
673 MutableGraphView graph(output); in OptimizeAndCollectStats()
H A Dmap_and_batch_fusion_test.cc30 MutableGraphView graph(&item.graph); in TEST()
114 MutableGraphView graph(&item.graph); in TEST()
198 MutableGraphView graph(&item.graph); in TEST()
284 MutableGraphView graph(&item.graph); in TEST()
370 MutableGraphView graph(&item.graph); in TEST()
H A Dshuffle_and_repeat_fusion_test.cc34 MutableGraphView graph(&item.graph); in TEST()
102 MutableGraphView graph(&item.graph); in TEST()
167 MutableGraphView graph(&item.graph); in TEST()
239 MutableGraphView graph(&item.graph); in TEST()
H A Dslack.cc80 Status Slack::RecursivelyHandleOp(const MutableGraphView& graph, in RecursivelyHandleOp()
117 MutableGraphView graph(output); in OptimizeAndCollectStats()
H A Dbatch_parallelization.cc37 NodeDef MakeParallelBatch(const string& name, MutableGraphView* graph) { in MakeParallelBatch()
68 MutableGraphView graph(output); in OptimizeAndCollectStats()
/aosp_15_r20/external/tensorflow/tensorflow/core/grappler/optimizers/
H A Dshape_optimizer.cc72 MutableGraphView graph(optimized_graph); in Optimize()
79 for (MutableGraphView::InputPort fanout : in Optimize()
80 graph.GetFanout(MutableGraphView::OutputPort(&node, 0))) { in Optimize()
90 const MutableGraphView::OutputPort reduce_indices = in Optimize()
91 graph.GetRegularFanin(MutableGraphView::InputPort(fanout.node, 1)); in Optimize()
142 MutableGraphView graph(optimized_graph); in Optimize()
148 const MutableGraphView::OutputPort input1 = in Optimize()
149 graph.GetRegularFanin(MutableGraphView::InputPort(&node, 0)); in Optimize()
150 const MutableGraphView::OutputPort input2 = in Optimize()
151 graph.GetRegularFanin(MutableGraphView::InputPort(&node, 1)); in Optimize()
H A Dmemory_optimizer.cc518 MutableGraphView view(&item->graph); in SchedulingPass()
885 static bool IsSwappable(const MutableGraphView& graph, in IsSwappable()
886 MutableGraphView::OutputPort output) { in IsSwappable()
912 MutableGraphView::InputPort input; in IsSwappable()
915 MutableGraphView::OutputPort fanin = graph.GetRegularFanin(input); in IsSwappable()
924 const NodeDef* node, int input_id, const MutableGraphView& view, in FindSwapOutTrigger()
928 MutableGraphView::InputPort swap; in FindSwapOutTrigger()
931 MutableGraphView::OutputPort generator = view.GetRegularFanin(swap); in FindSwapOutTrigger()
936 const absl::flat_hash_set<MutableGraphView::InputPort>& fanout = in FindSwapOutTrigger()
955 static bool IsSwappable(MutableGraphView::InputPort input) { in IsSwappable()
[all …]
H A Dloop_optimizer.cc597 Status CheckForDeadFanout(const MutableGraphView& view, in CheckForDeadFanout()
768 MutableGraphView view(optimized_graph); in RemoveDeadBranches()
790 SetVector<MutableGraphView::InputPort, absl::Hash<MutableGraphView::Port>> in RemoveDeadBranches()
792 for (const MutableGraphView::InputPort& port : view.GetFanout(dead)) { in RemoveDeadBranches()
806 MutableGraphView::InputPort dead = zombie_inputs.PopBack(); in RemoveDeadBranches()
825 MutableGraphView::OutputPort value_index(dead.node, 1); in RemoveDeadBranches()
826 const absl::flat_hash_set<MutableGraphView::InputPort>& index_fanout = in RemoveDeadBranches()
853 for (const MutableGraphView::InputPort& port : in RemoveDeadBranches()
864 for (const MutableGraphView::InputPort& dead_fanout : in RemoveDeadBranches()
H A Dauto_mixed_precision.cc1114 NodeDef BuildCastNode(const MutableGraphView::OutputPort& src,
1115 const MutableGraphView::InputPort& dst, bool to_f16,
1119 const CastType& cast_type, MutableGraphView::OutputPort& src);
1124 std::vector<MutableGraphView::OutputPort>& output_ports) const;
1133 MutableGraphView graph_view_;
1151 const MutableGraphView::OutputPort& src, in BuildCastNode()
1152 const MutableGraphView::InputPort& dst, bool to_f16, in BuildCastNode()
2013 MutableGraphView::OutputPort prev_output = in NodeImplicitlyReadsNonResourceVariable()
2038 MutableGraphView::OutputPort src(node, 0); in MakeCastsAllowIfAllOutputsAllow()
2040 for (const MutableGraphView::InputPort& dst : fanout) { in MakeCastsAllowIfAllOutputsAllow()
[all …]

123