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

Function ggml_can_repeat

ggml.c:2129–2137  ·  view source on GitHub ↗

check if t1 can be represented as a repeatition of t0

Source from the content-addressed store, hash-verified

2127
2128// check if t1 can be represented as a repeatition of t0
2129static inline bool ggml_can_repeat(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
2130 static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
2131
2132 return
2133 (t1->ne[0]%t0->ne[0] == 0) &&
2134 (t1->ne[1]%t0->ne[1] == 0) &&
2135 (t1->ne[2]%t0->ne[2] == 0) &&
2136 (t1->ne[3]%t0->ne[3] == 0);
2137}
2138
2139static inline bool ggml_can_repeat_rows(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
2140 static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");

Callers 6

ggml_can_repeat_rowsFunction · 0.70
ggml_repeatFunction · 0.70
ggml_repeat_backFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected