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

Function ggml_sub_impl

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

Source from the content-addressed store, hash-verified

2122// ggml_sub
2123
2124static struct ggml_tensor * ggml_sub_impl(
2125 struct ggml_context * ctx,
2126 struct ggml_tensor * a,
2127 struct ggml_tensor * b,
2128 bool inplace) {
2129 GGML_ASSERT(ggml_can_repeat(b, a));
2130
2131 struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
2132
2133 result->op = GGML_OP_SUB;
2134 result->src[0] = a;
2135 result->src[1] = b;
2136
2137 return result;
2138}
2139
2140struct ggml_tensor * ggml_sub(
2141 struct ggml_context * ctx,

Callers 3

ggml_subFunction · 0.85
ggml_sub_inplaceFunction · 0.85
ggml_sub_or_setFunction · 0.85

Calls 3

ggml_can_repeatFunction · 0.85
ggml_view_tensorFunction · 0.85
ggml_dup_tensorFunction · 0.85

Tested by

no test coverage detected