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

Function MergeCLNodes

tensorflow/lite/delegates/gpu/cl/inference_context.cc:76–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void MergeCLNodes(CLNode* src, CLNode* dst) {
77 int offset = dst->inputs.size();
78 for (int j = 0; j < src->inputs.size(); ++j) {
79 if (src->inputs[j] != dst->outputs[0]) {
80 dst->inputs.push_back(src->inputs[j]);
81 }
82 }
83 auto first_range = src->ranges[0];
84 dst->ranges.push_back(
85 int2(first_range.x + offset, first_range.y - 1 + offset));
86 for (int i = 1; i < src->ranges.size(); ++i) {
87 auto range = src->ranges[i];
88 dst->ranges.push_back(int2(range.x + offset, range.y + offset));
89 }
90 dst->outputs[0] = src->outputs[0];
91 for (int i = 0; i < src->operations.size(); ++i) {
92 dst->operations.push_back(std::move(src->operations[i]));
93 }
94 dst->name += " linked : " + src->name;
95}
96
97void AddUsage(ValueId id, int task_index,
98 std::map<ValueId, int2>* usage_records) {

Callers 1

MergeMethod · 0.85

Calls 2

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected