MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / view_batch_matrix

Function view_batch_matrix

src/framework/modules/conv_modules.cpp:192–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 std::string("DepthwiseConv2dModule does not support weight type with the current ggml depthwise conv path: ") +
191 ggml_type_name(contiguous.type));
192}
193
194int64_t conv1d_output_frames(const Conv1dConfig & config, int64_t input_frames) {
195 return (input_frames + 2 * config.padding - config.dilation * (config.kernel_size - 1) - 1) / config.stride + 1;
196}
197bool is_conv1d_pertap_fast_path_eligible(
198 const core::ModuleBuildContext & ctx,
199 const Conv1dConfig & config,
200 const core::TensorValue & input) noexcept {
201 return ctx.backend_type == core::BackendType::Metal &&
202 config.padding == 0 &&
203 config.stride == 1 &&
204 input.shape.dims[0] == 1 &&
205 input.type == GGML_TYPE_F32 &&
206 input.tensor->ne[0] == input.shape.dims[2] &&
207 input.tensor->ne[1] == config.in_channels &&
208 ggml_is_contiguous(input.tensor);
209}

Callers 1

buildMethod · 0.70

Calls 2

ggml_view_2dFunction · 0.85
wrap_tensorFunction · 0.85

Tested by

no test coverage detected