MCPcopy Create free account
hub / github.com/OAID/Tengine / Prerun

Method Prerun

executor/operator/arm64/fc/feature_match.cpp:175–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 }
174
175 bool Prerun(Node* node)
176 {
177 Tensor* tensor;
178
179 tensor = node->GetInputTensor(1);
180 int M = tensor->GetShape().Shape(0);
181 int K = tensor->GetShape().Shape(1);
182
183 float* weight = ( float* )get_tensor_mem(tensor);
184
185 float* weight_interleaved = ( float* )std::malloc(sizeof(float) * K * M);
186 interleave_kernel(weight, weight_interleaved, M, K);
187
188 (*node)["weight_interleaved"] = weight_interleaved;
189
190 if(exec_attr->low_mem_mode)
191 {
192 tensor->FreeMem();
193 }
194
195 return true;
196 }
197
198 void Refresh(Node* node)
199 {

Callers

nothing calls this directly

Calls 5

get_tensor_memFunction · 0.85
ShapeMethod · 0.80
interleave_kernelFunction · 0.70
GetInputTensorMethod · 0.45
FreeMemMethod · 0.45

Tested by

no test coverage detected