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

Method Prerun

executor/operator/arm32/fc/feature_match.cpp:176–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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