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

Function ggml_is_contiguous_except_dim_1

ggml.c:2094–2101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2092}
2093
2094static inline bool ggml_is_contiguous_except_dim_1(const struct ggml_tensor * tensor) {
2095 static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
2096
2097 return
2098 tensor->nb[0] == ggml_type_size(tensor->type) &&
2099 tensor->nb[2] == tensor->nb[1]*tensor->ne[1] &&
2100 tensor->nb[3] == tensor->nb[2]*tensor->ne[2];
2101}
2102
2103bool ggml_is_permuted(const struct ggml_tensor * tensor) {
2104 static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");

Calls 1

ggml_type_sizeFunction · 0.70

Tested by

no test coverage detected