| 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 | { |
nothing calls this directly
no test coverage detected