mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-27 22:59:24 +01:00
cann: fix crash when llama-bench is running on multiple cann devices (#9627)
This commit is contained in:
parent
70392f1f81
commit
904837e0cb
@ -227,6 +227,7 @@ struct ggml_backend_cann_context {
|
|||||||
* @brief Destructor for cleaning up resources.
|
* @brief Destructor for cleaning up resources.
|
||||||
*/
|
*/
|
||||||
~ggml_backend_cann_context() {
|
~ggml_backend_cann_context() {
|
||||||
|
ggml_cann_set_device(device);
|
||||||
if (copy_event != nullptr) {
|
if (copy_event != nullptr) {
|
||||||
ACL_CHECK(aclrtDestroyEvent(copy_event));
|
ACL_CHECK(aclrtDestroyEvent(copy_event));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user