Home
last modified time | relevance | path

Searched refs:Subgraph (Results 1 – 25 of 67) sorted by relevance

123

/external/tensorflow/tensorflow/core/grappler/graph_analyzer/
Dgraph_analyzer_test.cc46 void ExtendSubgraph(Subgraph* parent) { gran_->ExtendSubgraph(parent); } in ExtendSubgraph()
48 void ExtendSubgraphPortAllOrNone(Subgraph* parent, GenNode* node, in ExtendSubgraphPortAllOrNone()
53 void ExtendSubgraphAllOrNone(Subgraph* parent, GenNode* node) { in ExtendSubgraphAllOrNone()
73 std::deque<Subgraph*>& GetTodo() { return gran_->todo_; } in GetTodo()
154 std::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")})); in TEST_F()
175 auto parent = std::make_unique<Subgraph>(Subgraph::Identity()); in TEST_F()
177 std::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")})); in TEST_F()
199 std::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")})); in TEST_F()
221 std::make_unique<Subgraph>(Subgraph::Identity({GetNode("add2")})); in TEST_F()
238 auto root = std::make_unique<Subgraph>( in TEST_F()
[all …]
Dsubgraph.h33 class Subgraph {
49 explicit Subgraph(Identity id) : id_(std::move(id)), hash_(id_.Hash()) {} in Subgraph() function
52 Subgraph(const Identity& parent_id, GenNode* add_node);
54 Subgraph() = delete;
55 Subgraph(const Subgraph& other) = delete;
56 void operator=(const Subgraph& other) = delete;
59 bool operator<(const Subgraph& other) const { return this->id_ < other.id_; }
61 bool operator==(const Subgraph& other) const {
81 void MergeCollation(const Subgraph& other) { in MergeCollation()
105 explicit SubgraphIterator(const Subgraph::Identity* id);
[all …]
Dsubgraph.cc31 Subgraph::Identity::Identity(InitializerList init) { in Identity()
37 bool Subgraph::Identity::operator<(const Identity& other) const { in operator <()
57 bool Subgraph::Identity::operator==(const Identity& other) const { in operator ==()
70 size_t Subgraph::Identity::Hash() const { in Hash()
79 string Subgraph::Dump() { in Dump()
94 void Subgraph::ExtractForSignature(SigNodeMap* result) { in ExtractForSignature()
112 Subgraph::Subgraph(const Identity& parent_id, GenNode* add_node) in Subgraph() function in tensorflow::grappler::graph_analyzer::Subgraph
120 SubgraphIterator::SubgraphIterator(const Subgraph::Identity* id) in SubgraphIterator()
214 Subgraph* SubgraphPtrSet::ExtendParent(const Subgraph::Identity& parent_id, in ExtendParent()
224 auto sg = std::make_unique<Subgraph>(parent_id, node); in ExtendParent()
[all …]
Dsubgraph_test.cc50 Subgraph::Identity id1; in TEST()
51 Subgraph::Identity id2; in TEST()
56 Subgraph sg1(id1); in TEST()
57 Subgraph sg2(id2); in TEST()
68 Subgraph::Identity id1; in TEST()
70 Subgraph sg1(id1); in TEST()
94 Subgraph::Identity id; in TEST()
96 Subgraph sg(id); in TEST()
157 Subgraph::Identity id; in TEST()
159 Subgraph sg(id); in TEST()
[all …]
Dgraph_analyzer.h85 void ExtendSubgraph(Subgraph* parent);
90 void ExtendSubgraphAllOrNone(Subgraph* parent, const GenNode* node);
92 void ExtendSubgraphPortAllOrNone(Subgraph* parent, const GenNode* node,
95 void AddExtendedSubgraph(Subgraph* parent, const Subgraph::Identity& id);
99 bool HasInvalidMultiInputs(Subgraph* sg);
121 std::deque<Subgraph*> todo_;
Dgraph_analyzer.cc75 const Subgraph::Identity empty_parent; in FindSubgraphs()
94 void GraphAnalyzer::ExtendSubgraph(Subgraph* parent) { in ExtendSubgraph()
128 Subgraph* sg = sg_set.ExtendParent(parent->id(), neighbor.node); in ExtendSubgraph()
136 void GraphAnalyzer::ExtendSubgraphAllOrNone(Subgraph* parent, in ExtendSubgraphAllOrNone()
138 Subgraph::Identity id = parent->id(); in ExtendSubgraphAllOrNone()
165 void GraphAnalyzer::ExtendSubgraphPortAllOrNone(Subgraph* parent, in ExtendSubgraphPortAllOrNone()
173 Subgraph::Identity id = parent->id(); in ExtendSubgraphPortAllOrNone()
191 void GraphAnalyzer::AddExtendedSubgraph(Subgraph* parent, in AddExtendedSubgraph()
192 const Subgraph::Identity& id) { in AddExtendedSubgraph()
197 auto sg = std::make_unique<Subgraph>(id); in AddExtendedSubgraph()
[all …]
Dsig_node_test.cc68 Subgraph::Identity id; in BuildSigMap()
72 Subgraph sg(id); in BuildSigMap()
484 Subgraph::Identity id1; in TEST_F()
487 Subgraph sg1(id1); in TEST_F()
502 Subgraph::Identity id2; in TEST_F()
505 Subgraph sg2(id2); in TEST_F()
524 Subgraph::Identity id1; in TEST_F()
527 Subgraph sg1(id1); in TEST_F()
535 Subgraph::Identity id2; in TEST_F()
538 Subgraph sg2(id2); in TEST_F()
[all …]
/external/tensorflow/tensorflow/lite/kernels/
Dsubgraph_test_util.h43 void BuildAddSubgraph(Subgraph* subgraph);
47 void BuildMulSubgraph(Subgraph* subgraph);
51 void BuildPadSubgraph(Subgraph* subgraph);
58 void BuildIfSubgraph(Subgraph* subgraph);
67 void BuildLessEqualCondSubgraph(Subgraph* subgraph, int rhs);
72 void BuildAccumulateLoopBodySubgraph(Subgraph* subgraph);
80 void BuildPadLoopBodySubgraph(Subgraph* subgraph,
85 void BuildWhileSubgraph(Subgraph* subgraph);
89 void BuildAssignRandomValueToVariableSubgraph(Subgraph* graph);
93 void BuildCallOnceAndReadVariableSubgraph(Subgraph* graph);
[all …]
Dwhile.cc55 Subgraph* src_subgraph, in CopyTensorsShapeAndType()
57 Subgraph* dst_subgraph, in CopyTensorsShapeAndType()
87 TfLiteStatus CopyTensorsData(TfLiteContext* context, Subgraph* src_subgraph, in CopyTensorsData()
89 Subgraph* dst_subgraph, in CopyTensorsData()
114 Subgraph* src_subgraph, in DeepCopyTensorsShapeTypeData()
116 Subgraph* dst_subgraph, in DeepCopyTensorsShapeTypeData()
121 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in DeepCopyTensorsShapeTypeData()
141 TfLiteContext* context, TfLiteNode* node, Subgraph* src_subgraph, in ShallowCopyTensorsShapeTypeData()
142 const SrcVector& src_tensor_indices, Subgraph* dst_subgraph, in ShallowCopyTensorsShapeTypeData()
145 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in ShallowCopyTensorsShapeTypeData()
[all …]
Dcall_once.cc59 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in Prepare()
76 Subgraph* init_subgraph = (*subgraphs)[op_data->init_subgraph_index].get(); in Prepare()
85 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in Eval()
95 Subgraph& init_subgraph = *(*subgraphs)[op_data->init_subgraph_index]; in Eval()
Dif.cc70 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in Prepare()
75 Subgraph* then_subgraph = (*subgraphs)[op_data->then_subgraph_index].get(); in Prepare()
76 Subgraph* else_subgraph = (*subgraphs)[op_data->else_subgraph_index].get(); in Prepare()
147 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in Eval()
155 Subgraph& active_branch_subgraph = in Eval()
221 Subgraph* then_subgraph = (*subgraphs)[op_data->then_subgraph_index].get(); in Eval()
222 Subgraph* else_subgraph = (*subgraphs)[op_data->else_subgraph_index].get(); in Eval()
Dsubgraph_test_util.cc76 void SetupTensor(Subgraph* subgraph, int tensor_index, TfLiteType type) { in SetupTensor()
90 void SubgraphBuilder::BuildAddSubgraph(Subgraph* subgraph) { in BuildAddSubgraph()
121 void SubgraphBuilder::BuildMulSubgraph(Subgraph* subgraph) { in BuildMulSubgraph()
152 void SubgraphBuilder::BuildPadSubgraph(Subgraph* subgraph) { in BuildPadSubgraph()
181 void SubgraphBuilder::BuildIfSubgraph(Subgraph* subgraph) { in BuildIfSubgraph()
216 void SubgraphBuilder::BuildLessEqualCondSubgraph(Subgraph* subgraph, int rhs) { in BuildLessEqualCondSubgraph()
249 void SubgraphBuilder::BuildAccumulateLoopBodySubgraph(Subgraph* subgraph) { in BuildAccumulateLoopBodySubgraph()
295 void SubgraphBuilder::BuildPadLoopBodySubgraph(Subgraph* subgraph, in BuildPadLoopBodySubgraph()
349 void SubgraphBuilder::BuildWhileSubgraph(Subgraph* subgraph) { in BuildWhileSubgraph()
385 Subgraph* subgraph) { in BuildAssignRandomValueToVariableSubgraph()
[all …]
/external/tensorflow/tensorflow/lite/core/
Dsubgraph.cc200 explicit InterpreterInfo(Subgraph* subgraph) : subgraph_(subgraph) {} in InterpreterInfo()
228 Subgraph* subgraph_;
231 Subgraph::Subgraph(ErrorReporter* error_reporter, in Subgraph() function in tflite::Subgraph
233 std::vector<std::unique_ptr<Subgraph>>* subgraphs, in Subgraph()
270 Subgraph::~Subgraph() { in ~Subgraph()
287 void Subgraph::CleanupNode(int node_index) { in CleanupNode()
300 TfLiteStatus Subgraph::ReplaceNodeSubsetsWithDelegateKernels( in ReplaceNodeSubsetsWithDelegateKernels()
303 return static_cast<Subgraph*>(context->impl_) in ReplaceNodeSubsetsWithDelegateKernels()
402 TfLiteStatus Subgraph::ReplaceNodeSubsetsWithDelegateKernels( in ReplaceNodeSubsetsWithDelegateKernels()
472 TfLiteExternalContext* Subgraph::GetExternalContext( in GetExternalContext()
[all …]
Dsubgraph.h52 class Subgraph {
57 Subgraph(ErrorReporter* error_reporter,
59 std::vector<std::unique_ptr<Subgraph>>* subgraphs,
65 Subgraph(const Subgraph&) = delete;
68 Subgraph(Subgraph&&) = default;
69 Subgraph& operator=(const Subgraph&) = delete;
70 virtual ~Subgraph();
333 std::vector<std::unique_ptr<Subgraph>>* GetSubgraphs() { return subgraphs_; } in GetSubgraphs()
857 std::vector<std::unique_ptr<Subgraph>>* subgraphs_ = nullptr;
/external/tensorflow/tensorflow/core/graph/
Dsubgraph_test.cc107 string Subgraph(const string& fed_str, const string& fetch_str, in Subgraph() function in tensorflow::__anon8d571e820111::SubgraphTest
158 EXPECT_EQ("OK", Subgraph("", "", "t1")); in TEST_F()
171 EXPECT_EQ("OK", Subgraph("", "", "t2,t3_a")); in TEST_F()
184 EXPECT_EQ("OK", Subgraph("input:1", "", "t2")); in TEST_F()
198 Subgraph("input:1", "", "t2", true /* use_function_convention */)); in TEST_F()
207 EXPECT_EQ("OK", Subgraph("W1:0", "", "t1")); in TEST_F()
219 Subgraph("W1:0", "", "t1", true /* use_function_convention */)); in TEST_F()
236 EXPECT_EQ("OK", Subgraph("input:1,t1,W2", "", "t2", in TEST_F()
250 EXPECT_EQ("OK", Subgraph("", "W2,input:1,t1,t2", "t2")); in TEST_F()
264 EXPECT_EQ("OK", Subgraph("", "W2,input:1,t1,t2", "t2", in TEST_F()
[all …]
/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/
Dcall.cc54 Subgraph* subgraph, in ValidateAndResizeInputsIfNeeded()
105 Subgraph* subgraph, int loop_count) { in ValidateAndResizeOutputs()
128 Subgraph* dst_subgraph, int loop_index, in CopyInputTensorsData()
146 Subgraph* src_subgraph, TfLiteNode* node, in CopyOutputTensorsData()
199 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in Prepare()
205 Subgraph* subgraph = (*subgraphs)[op_data->subgraph_index].get(); in Prepare()
229 Subgraph* this_subgraph = reinterpret_cast<Subgraph*>(context->impl_); in Eval()
231 Subgraph* subgraph = (*subgraphs)[op_data->subgraph_index].get(); in Eval()
/external/tensorflow/tensorflow/lite/delegates/flex/
Ddelegate_data_test.cc70 [](const std::vector<std::unique_ptr<Subgraph>>& subgraphs, in TEST()
81 auto add_subgraph = std::make_unique<Subgraph>( in TEST()
86 auto mul_subgraph = std::make_unique<Subgraph>( in TEST()
93 std::vector<std::unique_ptr<Subgraph>> subgraphs; in TEST()
96 Subgraph main_subgraph(error_reporter.get(), nullptr, &subgraphs, in TEST()
215 [](const std::vector<std::unique_ptr<Subgraph>>& subgraphs, in TEST()
226 Subgraph main_subgraph(error_reporter.get(), /*external_contexts=*/nullptr, in TEST()
Dsubgraph_resource.h35 explicit TFLiteSubgraphResource(Subgraph& subgraph, TfLiteDelegate* delegate) in TFLiteSubgraphResource()
49 Subgraph& GetSubgraphResource() const TF_EXCLUSIVE_LOCKS_REQUIRED(mutex_) { in GetSubgraphResource()
65 Subgraph& subgraph_ TF_GUARDED_BY(mutex_);
Ddelegate_data.cc56 const Subgraph& subgraph, in BuildFunctionDefProto()
113 const std::vector<std::unique_ptr<Subgraph>>& subgraphs, in GetSubgraphNamesForFunctionExecution()
155 Subgraph& main_subgraph, in RegisterFunctionDefForSubgraphs()
157 const std::vector<std::unique_ptr<Subgraph>>&, std::set<std::string>*)>& in RegisterFunctionDefForSubgraphs()
161 std::vector<std::unique_ptr<Subgraph>>* subgraphs = in RegisterFunctionDefForSubgraphs()
204 const tensorflow::SessionOptions& session_options, Subgraph* main_subgraph, in Prepare()
Ddelegate_data.h50 Subgraph* main_subgraph = nullptr,
97 Subgraph& main_subgraph,
99 const std::vector<std::unique_ptr<Subgraph>>&,
Dtflite_subgraph_execute.cc83 tflite::Subgraph& subgraph_selected = resource->GetSubgraphResource(); in Compute()
112 tflite::Subgraph& subgraph_selected) { in ResizeInputTensor()
142 tflite::Subgraph& subgraph_selected, in SetSubgraphInput()
205 tflite::Subgraph& subgraph_selected) const { in CopyTFLiteSubgraphResult()
/external/tensorflow/tensorflow/lite/tools/serialization/
Dwriter_lib.h49 flatbuffers::FlatBufferBuilder* fbb, Subgraph* subgraph, int node_index,
58 explicit ModelWriter(const std::vector<Subgraph*>& subgraphs);
61 void Init(const std::vector<Subgraph*>& subgraphs);
111 flatbuffers::FlatBufferBuilder* fbb, Subgraph* subgraph, int node_index,
117 explicit SubgraphWriter(Subgraph* subgraph) in SubgraphWriter()
149 Subgraph* subgraph, in SubgraphWriter()
215 Subgraph* subgraph_;
/external/tensorflow/tensorflow/compiler/mlir/lite/experimental/tac/transforms/
Draise_target_subgraphs.cc61 struct Subgraph { struct
112 void ExtractSubgraphToFunc(Subgraph* subgraph, OpBuilder* builder,
115 func::FuncOp BuildFuncOp(Subgraph* subgraph, OpBuilder* builder,
187 void GetFunctionName(const Subgraph& subgrpah, std::string* function_name, in GetFunctionName()
196 Subgraph* subgraph, OpBuilder* builder, ModuleOp module_op, in BuildFuncOp()
284 void RaiseTargetSubgraphsPass::ExtractSubgraphToFunc(Subgraph* subgraph, in ExtractSubgraphToFunc()
341 llvm::DenseMap<int, Subgraph> all_subgraphs; in RaiseTargetSubgraphsForBlock()
351 Subgraph new_subgraph; in RaiseTargetSubgraphsForBlock()
Dpick_subgraphs.cc96 struct Subgraph { struct
174 llvm::DenseMap<Operation*, Subgraph> subgraphs_;
223 Subgraph& current_subgraph = subgraphs_.find(current_graph_call)->second; in ProcessSubgraph()
225 std::vector<Subgraph*> input_subgraphs; in ProcessSubgraph()
236 Subgraph& input_subgraph = subgraphs_.find(input_call)->second; in ProcessSubgraph()
250 for (Subgraph* input_subgraph : input_subgraphs) { in ProcessSubgraph()
319 Subgraph subgraph; in BuildSubgraphs()
377 const Subgraph& subgraph = subgraphs_.find(output)->second; in MakeDecisions()
401 const Subgraph& input_subgraph = subgraphs_.find(input)->second; in MakeDecisions()
/external/tensorflow/tensorflow/compiler/jit/
Dencapsulate_subgraphs_pass.cc170 class Subgraph { class in tensorflow::__anon018d25a70111::Encapsulator
360 std::unordered_map<string, Subgraph> subgraphs_;
416 Node* Encapsulator::Subgraph::GetCallNode() const { return call_node_; } in GetCallNode()
418 int Encapsulator::Subgraph::GetArgIndexForEdge(const Edge* edge) const { in GetArgIndexForEdge()
422 int Encapsulator::Subgraph::GetResultIndexForEdge(const Edge* edge) const { in GetResultIndexForEdge()
426 Node* Encapsulator::Subgraph::MakeNodeImage(const Graph* graph_in, Node* node) { in MakeNodeImage()
447 Graph* Encapsulator::Subgraph::GetGraph() const { return graph_.get(); } in GetGraph()
449 Status Encapsulator::Subgraph::RecordArg( in RecordArg()
482 Status Encapsulator::Subgraph::RecordControlResult( in RecordControlResult()
491 Status Encapsulator::Subgraph::RecordResult( in RecordResult()
[all …]

123