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

Function ggml_map_custom1_impl

external/ggml/src/ggml.c:6011–6033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6009}
6010
6011void ggml_conv_2d_direct_set_cudnn_bias(struct ggml_tensor * tensor, struct ggml_tensor * bias) {
6012 GGML_ASSERT(tensor && tensor->op == GGML_OP_CONV_2D);
6013 GGML_ASSERT(ggml_get_op_params_i32(tensor, 7) == 1);
6014 GGML_ASSERT(bias && bias->type == GGML_TYPE_F16 && ggml_nelements(bias) == tensor->ne[2]);
6015 tensor->src[2] = bias;
6016}
6017
6018struct ggml_tensor * ggml_sage_attn2(
6019 struct ggml_context * ctx,
6020 struct ggml_tensor * q,
6021 struct ggml_tensor * k,
6022 struct ggml_tensor * v,
6023 float scale,
6024 bool causal) {
6025 GGML_ASSERT(q->type == GGML_TYPE_F16);
6026 GGML_ASSERT(k->type == GGML_TYPE_F16);
6027 GGML_ASSERT(v->type == GGML_TYPE_F16);
6028 GGML_ASSERT(ggml_is_contiguous(q));
6029 GGML_ASSERT(ggml_is_contiguous(k));
6030 GGML_ASSERT(ggml_is_contiguous(v));
6031
6032 GGML_ASSERT(q->ne[0] == k->ne[0]);
6033 GGML_ASSERT(q->ne[0] == v->ne[0]);
6034 GGML_ASSERT(k->ne[1] == v->ne[1]);
6035 GGML_ASSERT(k->ne[2] == v->ne[2]);
6036 GGML_ASSERT(q->ne[3] == k->ne[3]);

Callers 2

ggml_map_custom1Function · 0.85
ggml_map_custom1_inplaceFunction · 0.85

Calls 3

ggml_view_tensorFunction · 0.85
ggml_dup_tensorFunction · 0.85
ggml_set_op_paramsFunction · 0.85

Tested by

no test coverage detected