| 178 | } |
| 179 | |
| 180 | core::TensorValue view_batch_matrix( |
| 181 | core::ModuleBuildContext & ctx, |
| 182 | const core::TensorValue & input, |
| 183 | int64_t batch_index, |
| 184 | int64_t channels, |
| 185 | int64_t frames) { |
| 186 | auto * view = ggml_view_2d( |
| 187 | ctx.ggml, |
| 188 | input.tensor, |
| 189 | frames, |
| 190 | channels, |
| 191 | input.tensor->nb[1], |
| 192 | static_cast<size_t>(batch_index) * input.tensor->nb[2]); |
| 193 | return core::wrap_tensor(view, core::TensorShape::from_dims({channels, frames}), input.type); |
| 194 | } |
| 195 | |
| 196 | core::TensorValue build_snake1d_exact_bct( |
| 197 | core::ModuleBuildContext & ctx, |
no test coverage detected