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

Function ggml_mul_impl

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

Source from the content-addressed store, hash-verified

2154// ggml_mul
2155
2156static struct ggml_tensor * ggml_mul_impl(
2157 struct ggml_context * ctx,
2158 struct ggml_tensor * a,
2159 struct ggml_tensor * b,
2160 bool inplace) {
2161 GGML_ASSERT(ggml_can_repeat(b, a));
2162
2163 struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
2164
2165 result->op = GGML_OP_MUL;
2166 result->src[0] = a;
2167 result->src[1] = b;
2168
2169 return result;
2170}
2171
2172struct ggml_tensor * ggml_mul(
2173 struct ggml_context * ctx,

Callers 2

ggml_mulFunction · 0.85
ggml_mul_inplaceFunction · 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