mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-06 09:46:50 +00:00
ggml : add ggml_is_contiguous_rows
This commit is contained in:
@@ -1353,6 +1353,12 @@ bool ggml_is_contiguous_channels(const struct ggml_tensor * tensor) {
|
||||
tensor->nb[2] == ggml_type_size(tensor->type);
|
||||
}
|
||||
|
||||
bool ggml_is_contiguous_rows(const struct ggml_tensor * tensor) {
|
||||
return
|
||||
tensor->ne[0] == ggml_blck_size(tensor->type) ||
|
||||
tensor->nb[0] == ggml_type_size(tensor->type);
|
||||
}
|
||||
|
||||
static inline bool ggml_is_padded_1d(const struct ggml_tensor * tensor) {
|
||||
static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user