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

Function ggml_view_2d

ggml.c:4646–4663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4644// ggml_view_2d
4645
4646struct ggml_tensor * ggml_view_2d(
4647 struct ggml_context * ctx,
4648 struct ggml_tensor * a,
4649 int64_t ne0,
4650 int64_t ne1,
4651 size_t nb1,
4652 size_t offset) {
4653
4654 const int64_t ne[2] = { ne0, ne1 };
4655
4656 struct ggml_tensor * result = ggml_view_impl(ctx, a, 2, ne, offset);
4657
4658 result->nb[1] = nb1;
4659 result->nb[2] = result->nb[1]*ne1;
4660 result->nb[3] = result->nb[2];
4661
4662 return result;
4663}
4664
4665// ggml_view_3d
4666

Callers 8

llm_build_kv_storeFunction · 0.70
build_falconMethod · 0.70
build_starcoderMethod · 0.70
build_bloomMethod · 0.70
build_mptMethod · 0.70
mainFunction · 0.50
sample_softmax_batchFunction · 0.50

Calls 1

ggml_view_implFunction · 0.70

Tested by 1

mainFunction · 0.40