From 2d0586ecb0bdd786cf25e561e4a2805b245ac084 Mon Sep 17 00:00:00 2001 From: Adam Treat Date: Tue, 13 Feb 2024 16:42:44 -0500 Subject: [PATCH] Since we do the early return in the generic backend now no reason to do so here as well. Signed-off-by: Adam Treat --- ggml-kompute.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ggml-kompute.cpp b/ggml-kompute.cpp index f5e90da51..51c5af8ec 100644 --- a/ggml-kompute.cpp +++ b/ggml-kompute.cpp @@ -1805,10 +1805,6 @@ static void * ggml_backend_kompute_buffer_get_base(ggml_backend_buffer_t buffer) static void ggml_backend_kompute_buffer_set_tensor(ggml_backend_buffer_t buffer, ggml_tensor * tensor, const void * data, size_t offset, size_t size) { GGML_UNUSED(buffer); - if (!size) { - return; - } - const auto res = ggml_vk_get_tensor(tensor); GGML_ASSERT(res); @@ -1820,9 +1816,6 @@ static void ggml_backend_kompute_buffer_set_tensor(ggml_backend_buffer_t buffer, static void ggml_backend_kompute_buffer_get_tensor(ggml_backend_buffer_t buffer, const ggml_tensor * tensor, void * data, size_t offset, size_t size) { GGML_UNUSED(buffer); - if (!size) { - return; - } const auto res = ggml_vk_get_tensor(tensor); GGML_ASSERT(res);