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

Function ggml_view_4d

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

Source from the content-addressed store, hash-verified

3677// ggml_view_4d
3678
3679struct ggml_tensor * ggml_view_4d(
3680 struct ggml_context * ctx,
3681 struct ggml_tensor * a,
3682 int64_t ne0,
3683 int64_t ne1,
3684 int64_t ne2,
3685 int64_t ne3,
3686 size_t nb1,
3687 size_t nb2,
3688 size_t nb3,
3689 size_t offset) {
3690 const int64_t ne[4] = { ne0, ne1, ne2, ne3 };
3691
3692 struct ggml_tensor * result = ggml_view_impl(ctx, a, 4, ne, offset);
3693
3694 result->nb[1] = nb1;
3695 result->nb[2] = nb2;
3696 result->nb[3] = nb3;
3697
3698 return result;
3699}
3700
3701// ggml_permute
3702

Callers 15

build_attn_mhaMethod · 0.85
build_attnMethod · 0.85
get_kMethod · 0.85
get_vMethod · 0.85
create_tensor_as_viewMethod · 0.85
build_mamba_layerMethod · 0.85
build_mamba2_layerMethod · 0.85
get_slice_2dFunction · 0.85
build_layer_attnMethod · 0.85
build_qkvzMethod · 0.85

Calls 1

ggml_view_implFunction · 0.85

Tested by 15

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
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68
build_graphMethod · 0.68