Fix crash of test-tokenizer-0 under Debug build
This commit is contained in:
parent
b8c8dda75f
commit
cc06f1171b
1 changed files with 6 additions and 2 deletions
|
@ -165,8 +165,8 @@ struct llama_layer {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct llama_kv_cache {
|
struct llama_kv_cache {
|
||||||
struct ggml_tensor * k;
|
struct ggml_tensor * k = NULL;
|
||||||
struct ggml_tensor * v;
|
struct ggml_tensor * v = NULL;
|
||||||
|
|
||||||
struct ggml_context * ctx = NULL;
|
struct ggml_context * ctx = NULL;
|
||||||
|
|
||||||
|
@ -180,8 +180,12 @@ 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