MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / transpose_last_two_axes

Function transpose_last_two_axes

src/models/ace_step/diffusion.cpp:64–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64core::TensorValue reshape_heads(
65 core::ModuleBuildContext & ctx,
66 const core::TensorValue & input,
67 int64_t heads,
68 int64_t dim) {
69 auto contiguous = ensure_contiguous(ctx, input);
70 return core::reshape_tensor(
71 ctx,
72 contiguous,
73 core::TensorShape::from_dims({input.shape.dims[0], input.shape.dims[1], heads, dim}));
74}

Callers 2

matmul_f32Function · 0.70
attention_from_headsFunction · 0.70

Calls 1

swapFunction · 0.50

Tested by

no test coverage detected