mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-04-29 10:51:51 +00:00
ggml : tag ggml_tensor::backend as deprecated (#7290)
This commit is contained in:
10
ggml.c
10
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user