MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_cont_4d

Function ggml_cont_4d

ggml.c:4452–4471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4450}
4451
4452struct ggml_tensor * ggml_cont_4d(
4453 struct ggml_context * ctx,
4454 struct ggml_tensor * a,
4455 int64_t ne0,
4456 int64_t ne1,
4457 int64_t ne2,
4458 int64_t ne3) {
4459 GGML_ASSERT(ggml_nelements(a) == (ne0*ne1*ne2*ne3));
4460
4461 bool is_node = false;
4462
4463 struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
4464 ggml_format_name(result, "%s (cont)", a->name);
4465
4466 result->op = GGML_OP_CONT;
4467 result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
4468 result->src[0] = a;
4469
4470 return result;
4471}
4472
4473// ggml_reshape
4474

Callers 3

ggml_cont_1dFunction · 0.70
ggml_cont_2dFunction · 0.70
ggml_cont_3dFunction · 0.70

Calls 4

ggml_nelementsFunction · 0.70
ggml_new_tensor_4dFunction · 0.70
ggml_format_nameFunction · 0.70
ggml_dup_tensorFunction · 0.70

Tested by

no test coverage detected