summaryrefslogtreecommitdiff
path: root/ggml.c
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2024-05-15 15:08:48 +0200
committerGitHub <noreply@github.com>2024-05-15 15:08:48 +0200
commit344f9126cc0d15891fde9472fe40b8572628ad7d (patch)
treead9ba84a6bda9581609af5114d684f6668b40532 /ggml.c
parent9a17ab914b0aa7353389c656a3f2a0f086726868 (diff)
ggml : tag ggml_tensor::backend as deprecated (#7290)
Diffstat (limited to 'ggml.c')
-rw-r--r--ggml.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ggml.c b/ggml.c
index f09cc306..67e17a21 100644
--- a/ggml.c
+++ b/ggml.c
@@ -3178,6 +3178,12 @@ static struct ggml_tensor * ggml_new_tensor_impl(
struct ggml_tensor * const result = (struct ggml_tensor *)((char *)ctx->mem_buffer + obj_new->offs);
+#ifdef __clang__
+ // temporary until ggml_tensor::backend is removed
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
*result = (struct ggml_tensor) {
/*.type =*/ type,
/*.backend =*/ GGML_BACKEND_TYPE_CPU,
@@ -3200,6 +3206,10 @@ static struct ggml_tensor * ggml_new_tensor_impl(
/*.padding =*/ { 0 },
};
+#ifdef __clang__
+ #pragma clang diagnostic pop
+#endif
+
// TODO: this should not be needed as long as we don't rely on aligned SIMD loads
//ggml_assert_aligned(result->data);