cann: Fix error when running a non-exist op (#9424)

This commit is contained in:
Xinpeng Dou 2024-09-12 09:02:35 +08:00 committed by GitHub
parent 449ccfb6f5
commit df4b7945ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1942,7 +1942,7 @@ GGML_CALL ggml_backend_t ggml_backend_cann_init(int32_t device) {
GGML_CANN_LOG_ERROR("%s: error: failed to allocate context\n", __func__);
return nullptr;
}
ggml_cann_set_device(ctx->device);
ggml_backend_t cann_backend =
new ggml_backend{/* .guid = */ ggml_backend_cann_guid(),
/* .interface = */ ggml_backend_cann_interface,