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

Function ggml_transpose

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

Source from the content-addressed store, hash-verified

3757// ggml_transpose
3758
3759struct ggml_tensor * ggml_transpose(
3760 struct ggml_context * ctx,
3761 struct ggml_tensor * a) {
3762 struct ggml_tensor * result = ggml_view_tensor(ctx, a);
3763 ggml_format_name(result, "%s (transposed)", a->name);
3764
3765 result->ne[0] = a->ne[1];
3766 result->ne[1] = a->ne[0];
3767
3768 result->nb[0] = a->nb[1];
3769 result->nb[1] = a->nb[0];
3770
3771 result->op = GGML_OP_TRANSPOSE;
3772 result->src[0] = a;
3773
3774 return result;
3775}
3776
3777// ggml_get_rows
3778

Callers 15

merge_tensorMethod · 0.85
build_vitMethod · 0.85
build_inpMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
buildMethod · 0.85
build_attn_mhaMethod · 0.85
build_poolingMethod · 0.85
build_shortconv_blockMethod · 0.85
build_mamba_layerMethod · 0.85

Calls 2

ggml_view_tensorFunction · 0.85
ggml_format_nameFunction · 0.85

Tested by 5

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