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

Function ggml_out_prod

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

Source from the content-addressed store, hash-verified

3251}
3252
3253struct ggml_tensor * ggml_out_prod(
3254 struct ggml_context * ctx,
3255 struct ggml_tensor * a,
3256 struct ggml_tensor * b) {
3257 GGML_ASSERT(ggml_can_out_prod(a, b));
3258 GGML_ASSERT(!ggml_is_transposed(a));
3259
3260 // a is broadcastable to b for ne[2] and ne[3] -> use b->ne[2] and b->ne[3]
3261 const int64_t ne[4] = { a->ne[0], b->ne[0], b->ne[2], b->ne[3] };
3262 struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
3263
3264 result->op = GGML_OP_OUT_PROD;
3265 result->src[0] = a;
3266 result->src[1] = b;
3267
3268 return result;
3269}
3270
3271// ggml_scale
3272

Callers 2

build_graphMethod · 0.85
ggml_compute_backwardFunction · 0.85

Calls 3

ggml_can_out_prodFunction · 0.85
ggml_is_transposedFunction · 0.85
ggml_new_tensorFunction · 0.85

Tested by 1

build_graphMethod · 0.68