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

Function ggml_view_2d

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

Source from the content-addressed store, hash-verified

3635// ggml_view_2d
3636
3637struct ggml_tensor * ggml_view_2d(
3638 struct ggml_context * ctx,
3639 struct ggml_tensor * a,
3640 int64_t ne0,
3641 int64_t ne1,
3642 size_t nb1,
3643 size_t offset) {
3644 const int64_t ne[2] = { ne0, ne1 };
3645
3646 struct ggml_tensor * result = ggml_view_impl(ctx, a, 2, ne, offset);
3647
3648 result->nb[1] = nb1;
3649 result->nb[2] = result->nb[1]*ne1;
3650 result->nb[3] = result->nb[2];
3651
3652 return result;
3653}
3654
3655// ggml_view_3d
3656

Callers 15

build_stackMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
build_moe_ffnMethod · 0.85
build_inp_embdMethod · 0.85
llama_kv_cacheMethod · 0.85
cpy_kMethod · 0.85

Calls 1

ggml_view_implFunction · 0.85

Tested by 9

build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
llm_build_kv_storeMethod · 0.68
build_graphMethod · 0.68