MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Apply

Method Apply

tensorflow/lite/delegates/gpu/common/model_transformer.cc:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace gpu {
27
28bool ModelTransformer::Apply(const std::string& name,
29 SequenceTransformation* transformation) {
30 // Seed transformations with starting node. Each node may start a chain of
31 // transformations.
32 for (auto input : graph_->inputs()) {
33 for (auto node : graph_->FindConsumers(input->id)) {
34 AddNodeToProcess(node);
35 }
36 }
37 while (!to_process_.empty()) {
38 auto node = graph_->GetNode(to_process_.front());
39 if (node) {
40 if (!ApplyStartingWithNode(name, transformation, node)) {
41 return false;
42 }
43 }
44 to_process_.pop_front();
45 }
46 processed_.clear();
47 return true;
48}
49
50bool ModelTransformer::Apply(const std::string& name,
51 NodeTransformation* transformation) {

Callers 10

CompileMethod · 0.45
RunGraphTransformsFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 13

to_stringFunction · 0.85
FindConsumersMethod · 0.80
AppliedTransformationMethod · 0.80
inputsMethod · 0.45
emptyMethod · 0.45
GetNodeMethod · 0.45
frontMethod · 0.45
pop_frontMethod · 0.45
clearMethod · 0.45
nodesMethod · 0.45
push_backMethod · 0.45

Tested by 7

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36