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 10
10
#include " ggml-backend.h"
11
11
#include " gguf.h"
12
12
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
-
33
13
#define STB_IMAGE_IMPLEMENTATION
34
14
#include " stb_image.h"
35
15
@@ -641,19 +621,11 @@ struct clip_ctx {
641
621
}
642
622
643
623
~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) {
657
629
ggml_backend_free (backend_cpu);
658
630
}
659
631
}
You can’t perform that action at this time.
0 commit comments