File tree Expand file tree Collapse file tree 1 file changed +5
-33
lines changed Expand file tree Collapse file tree 1 file changed +5
-33
lines changed Original file line number Diff line number Diff line change 1010#include " ggml-backend.h"
1111#include " gguf.h"
1212
13- #ifdef GGML_USE_CUDA
14- #include " ggml-cuda.h"
15- #endif
16-
17- #ifdef GGML_USE_SYCL
18- #include " ggml-sycl.h"
19- #endif
20-
21- #ifdef GGML_USE_METAL
22- #include " ggml-metal.h"
23- #endif
24-
25- #ifdef GGML_USE_CANN
26- #include " ggml-cann.h"
27- #endif
28-
29- #ifdef GGML_USE_VULKAN
30- #include " ggml-vulkan.h"
31- #endif
32-
3313#define STB_IMAGE_IMPLEMENTATION
3414#include " stb_image.h"
3515
@@ -641,19 +621,11 @@ struct clip_ctx {
641621 }
642622
643623 ~clip_ctx () {
644- if (ctx_data) {
645- ggml_free (ctx_data);
646- }
647- if (ctx_gguf) {
648- gguf_free (ctx_gguf);
649- }
650- if (buf) {
651- ggml_backend_buffer_free (buf);
652- }
653- if (backend) {
654- ggml_backend_free (backend);
655- }
656- if (backend_cpu && backend_cpu != backend) {
624+ ggml_free (ctx_data);
625+ gguf_free (ctx_gguf);
626+ ggml_backend_buffer_free (buf);
627+ ggml_backend_free (backend);
628+ if (backend_cpu != backend) {
657629 ggml_backend_free (backend_cpu);
658630 }
659631 }
You can’t perform that action at this time.
0 commit comments