* Fix crash of test-tokenizer-0 under Debug build
* Change per comment
}
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;
}
};
struct llama_kv_cache {
- struct ggml_tensor * k;
- struct ggml_tensor * v;
+ struct ggml_tensor * k = NULL;
+ struct ggml_tensor * v = NULL;
struct ggml_context * ctx = NULL;