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

Method Prerun

executor/operator/arm64/fc/fully_connected_fast.cpp:174–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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