clip : disable GPU support (#10896)

ggml-ci
This commit is contained in:
Georgi Gerganov 2024-12-19 18:47:15 +02:00 committed by GitHub
parent 5cab3e4aaa
commit d408bb9268
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,25 +8,25 @@
#include "ggml-alloc.h" #include "ggml-alloc.h"
#include "ggml-backend.h" #include "ggml-backend.h"
#ifdef GGML_USE_CUDA //#ifdef GGML_USE_CUDA
#include "ggml-cuda.h" //#include "ggml-cuda.h"
#endif //#endif
//
#ifdef GGML_USE_SYCL //#ifdef GGML_USE_SYCL
#include "ggml-sycl.h" //#include "ggml-sycl.h"
#endif //#endif
//
#ifdef GGML_USE_METAL //#ifdef GGML_USE_METAL
#include "ggml-metal.h" //#include "ggml-metal.h"
#endif //#endif
//
#ifdef GGML_USE_CANN //#ifdef GGML_USE_CANN
#include "ggml-cann.h" //#include "ggml-cann.h"
#endif //#endif
//
#ifdef GGML_USE_VULKAN //#ifdef GGML_USE_VULKAN
#include "ggml-vulkan.h" //#include "ggml-vulkan.h"
#endif //#endif
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h" #include "stb_image.h"
@ -1222,30 +1222,30 @@ struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {
} }
} }
#ifdef GGML_USE_CUDA //#ifdef GGML_USE_CUDA
new_clip->backend = ggml_backend_cuda_init(0); // new_clip->backend = ggml_backend_cuda_init(0);
LOG_INF("%s: CLIP using CUDA backend\n", __func__); // LOG_INF("%s: CLIP using CUDA backend\n", __func__);
#endif //#endif
//
#ifdef GGML_USE_METAL //#ifdef GGML_USE_METAL
new_clip->backend = ggml_backend_metal_init(); // new_clip->backend = ggml_backend_metal_init();
LOG_INF("%s: CLIP using Metal backend\n", __func__); // LOG_INF("%s: CLIP using Metal backend\n", __func__);
#endif //#endif
//
#ifdef GGML_USE_CANN //#ifdef GGML_USE_CANN
new_clip->backend = ggml_backend_cann_init(0); // new_clip->backend = ggml_backend_cann_init(0);
LOG_INF("%s: CLIP using CANN backend\n", __func__); // LOG_INF("%s: CLIP using CANN backend\n", __func__);
#endif //#endif
//
#ifdef GGML_USE_VULKAN //#ifdef GGML_USE_VULKAN
new_clip->backend = ggml_backend_vk_init(0); // new_clip->backend = ggml_backend_vk_init(0);
LOG_INF("%s: CLIP using Vulkan backend\n", __func__); // LOG_INF("%s: CLIP using Vulkan backend\n", __func__);
#endif //#endif
//
#ifdef GGML_USE_SYCL //#ifdef GGML_USE_SYCL
new_clip->backend = ggml_backend_sycl_init(0); // new_clip->backend = ggml_backend_sycl_init(0);
LOG_INF("%s: CLIP using SYCL backend\n", __func__); // LOG_INF("%s: CLIP using SYCL backend\n", __func__);
#endif //#endif
if (!new_clip->backend) { if (!new_clip->backend) {
new_clip->backend = ggml_backend_cpu_init(); new_clip->backend = ggml_backend_cpu_init();