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