summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
authorRobert Sung-wook Shin <edp1096@users.noreply.github.com>2023-06-10 01:24:40 +0900
committerGitHub <noreply@github.com>2023-06-09 18:24:40 +0200
commit98ed16557432d7a5179c57eddcc3a08a7ae6d54d (patch)
tree9e173f77687b5d72f4ef1123d5d7499b52811684 /llama.cpp
parentae9663f1887513e152839e91f61c513075a19422 (diff)
OpenCL: Add release memory (#1741)
* Add opencl release memory * Rename function name
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llama.cpp b/llama.cpp
index 16d6f6ef..f40c5afa 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -210,7 +210,11 @@ struct llama_model {
for (size_t i = 0; i < tensors_by_name.size(); ++i) {
ggml_cuda_free_data(tensors_by_name[i].second);
}
-#endif // GGML_USE_CUBLAS
+#elif defined(GGML_USE_CLBLAST)
+ for (size_t i = 0; i < tensors_by_name.size(); ++i) {
+ ggml_cl_free_data(tensors_by_name[i].second);
+ }
+#endif
}
};