MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_conv_1d_dw

Function ggml_conv_1d_dw

subprojects/llama.cpp/ggml/src/ggml.c:4441–4457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4439// ggml_conv_1d_dw
4440
4441struct ggml_tensor * ggml_conv_1d_dw(
4442 struct ggml_context * ctx,
4443 struct ggml_tensor * a,
4444 struct ggml_tensor * b,
4445 int s0,
4446 int p0,
4447 int d0) {
4448 struct ggml_tensor * new_b = ggml_reshape_4d(ctx, b, b->ne[0], 1, b->ne[1], b->ne[2]);
4449
4450 struct ggml_tensor * im2col = ggml_im2col(ctx, a, new_b, s0, 0, p0, 0, d0, 0, false, GGML_TYPE_F16);
4451
4452 struct ggml_tensor * result = ggml_mul_mat(ctx, im2col, a);
4453
4454 result = ggml_reshape_3d(ctx, result, result->ne[0], result->ne[2], 1);
4455
4456 return result;
4457}
4458
4459// ggml_conv_1d_dw_ph
4460

Callers 1

ggml_conv_1d_dw_phFunction · 0.85

Calls 4

ggml_reshape_4dFunction · 0.85
ggml_im2colFunction · 0.85
ggml_mul_matFunction · 0.85
ggml_reshape_3dFunction · 0.85

Tested by

no test coverage detected