Skip to content

Commit

Permalink
cann: fix crash when llama-bench is running on multiple cann devices (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
Dou-Git authored Sep 25, 2024
1 parent 70392f1 commit 904837e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ggml/src/ggml-cann/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ struct ggml_backend_cann_context {
* @brief Destructor for cleaning up resources.
*/
~ggml_backend_cann_context() {
ggml_cann_set_device(device);
if (copy_event != nullptr) {
ACL_CHECK(aclrtDestroyEvent(copy_event));
}
Expand Down

0 comments on commit 904837e

Please sign in to comment.