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

Function ggml_view_3d

ggml.c:4667–4686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4665// ggml_view_3d
4666
4667struct ggml_tensor * ggml_view_3d(
4668 struct ggml_context * ctx,
4669 struct ggml_tensor * a,
4670 int64_t ne0,
4671 int64_t ne1,
4672 int64_t ne2,
4673 size_t nb1,
4674 size_t nb2,
4675 size_t offset) {
4676
4677 const int64_t ne[3] = { ne0, ne1, ne2 };
4678
4679 struct ggml_tensor * result = ggml_view_impl(ctx, a, 3, ne, offset);
4680
4681 result->nb[1] = nb1;
4682 result->nb[2] = nb2;
4683 result->nb[3] = result->nb[2]*ne2;
4684
4685 return result;
4686}
4687
4688// ggml_view_4d
4689

Callers 10

llm_build_k_shiftFunction · 0.70
llm_build_kqvFunction · 0.70
build_persimmonMethod · 0.70
build_stablelmMethod · 0.70
llama_set_state_dataFunction · 0.70
mainFunction · 0.50
forwardFunction · 0.50
forward_batchFunction · 0.50
forward_loraFunction · 0.50

Calls 1

ggml_view_implFunction · 0.70

Tested by 1

mainFunction · 0.40