CUDA: fix bad asserts for partial offload (llama/13337)

This commit is contained in:
Johannes Gäßler
2025-05-06 13:58:51 +02:00
committed by Georgi Gerganov
parent be55e25cac
commit f9f78a773f
6 changed files with 21 additions and 6 deletions

View File

@@ -1299,6 +1299,10 @@ bool ggml_is_contiguous_2(const struct ggml_tensor * tensor) {
return ggml_is_contiguous_n(tensor, 2);
}
bool ggml_is_contiguously_allocated(const struct ggml_tensor * tensor) {
return ggml_nbytes(tensor) == ggml_nelements(tensor) * ggml_type_size(tensor->type)/ggml_blck_size(tensor->type);
}
bool ggml_is_permuted(const struct ggml_tensor * tensor) {
static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");