| 160 | const size_t src_index = static_cast<size_t>((in * out_channels + out_channel) * kernel + k); |
| 161 | const size_t dst_index = static_cast<size_t>((out_channel * kernel + k) * in_channels + in); |
| 162 | out[dst_index] = weight[src_index]; |
| 163 | } |
| 164 | } |
| 165 | } |
| 166 | return out; |
| 167 | } |
| 168 | |
| 169 | core::TensorValue view_batch_matrix( |
| 170 | core::ModuleBuildContext & ctx, |
| 171 | const core::TensorValue & input, |
| 172 | int64_t batch_index, |
| 173 | int64_t channels, |
| 174 | int64_t frames) { |
| 175 | auto * view = ggml_view_2d( |
| 176 | ctx.ggml, |
| 177 | input.tensor, |
| 178 | frames, |
| 179 | channels, |
| 180 | input.tensor->nb[1], |
| 181 | static_cast<size_t>(batch_index) * input.tensor->nb[2]); |
no outgoing calls
no test coverage detected