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

Function ggml_diag_mask_zero_impl

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

Source from the content-addressed store, hash-verified

3901// ggml_diag_mask_zero
3902
3903static struct ggml_tensor * ggml_diag_mask_zero_impl(
3904 struct ggml_context * ctx,
3905 struct ggml_tensor * a,
3906 int n_past,
3907 bool inplace) {
3908 struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
3909
3910 int32_t params[] = { n_past };
3911 ggml_set_op_params(result, params, sizeof(params));
3912
3913 result->op = GGML_OP_DIAG_MASK_ZERO;
3914 result->src[0] = a;
3915
3916 return result;
3917}
3918
3919struct ggml_tensor * ggml_diag_mask_zero(
3920 struct ggml_context * ctx,

Callers 3

ggml_diag_mask_zeroFunction · 0.85
ggml_compute_backwardFunction · 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