Change per comment
This commit is contained in:
parent
cc06f1171b
commit
a75ddde952
2 changed files with 1 additions and 5 deletions
|
@ -2809,7 +2809,7 @@ void ggml_cuda_transform_tensor(void * data, struct ggml_tensor * tensor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ggml_cuda_free_data(struct ggml_tensor * tensor) {
|
void ggml_cuda_free_data(struct ggml_tensor * tensor) {
|
||||||
if (tensor->backend != GGML_BACKEND_GPU && tensor->backend != GGML_BACKEND_GPU_SPLIT) {
|
if (!tensor || (tensor->backend != GGML_BACKEND_GPU && tensor->backend != GGML_BACKEND_GPU_SPLIT) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,12 +180,8 @@ struct llama_kv_cache {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GGML_USE_CUBLAS
|
#ifdef GGML_USE_CUBLAS
|
||||||
if (k) {
|
|
||||||
ggml_cuda_free_data(k);
|
ggml_cuda_free_data(k);
|
||||||
}
|
|
||||||
if (v) {
|
|
||||||
ggml_cuda_free_data(v);
|
ggml_cuda_free_data(v);
|
||||||
}
|
|
||||||
#endif // GGML_USE_CUBLAS
|
#endif // GGML_USE_CUBLAS
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue