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

Function ggml_view_4d

ggml.c:4690–4711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4688// ggml_view_4d
4689
4690struct ggml_tensor * ggml_view_4d(
4691 struct ggml_context * ctx,
4692 struct ggml_tensor * a,
4693 int64_t ne0,
4694 int64_t ne1,
4695 int64_t ne2,
4696 int64_t ne3,
4697 size_t nb1,
4698 size_t nb2,
4699 size_t nb3,
4700 size_t offset) {
4701
4702 const int64_t ne[4] = { ne0, ne1, ne2, ne3 };
4703
4704 struct ggml_tensor * result = ggml_view_impl(ctx, a, 4, ne, offset);
4705
4706 result->nb[1] = nb1;
4707 result->nb[2] = nb2;
4708 result->nb[3] = nb3;
4709
4710 return result;
4711}
4712
4713// ggml_permute
4714

Callers 3

ggml_compute_backwardFunction · 0.70
ggml_graph_importFunction · 0.70
forward_batchFunction · 0.50

Calls 1

ggml_view_implFunction · 0.70

Tested by

no test coverage detected