Skip to content

Commit df4b794

Browse files
authored
cann: Fix error when running a non-exist op (ggml-org#9424)
1 parent 449ccfb commit df4b794

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cann.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,7 @@ GGML_CALL ggml_backend_t ggml_backend_cann_init(int32_t device) {
19421942
GGML_CANN_LOG_ERROR("%s: error: failed to allocate context\n", __func__);
19431943
return nullptr;
19441944
}
1945-
1945+
ggml_cann_set_device(ctx->device);
19461946
ggml_backend_t cann_backend =
19471947
new ggml_backend{/* .guid = */ ggml_backend_cann_guid(),
19481948
/* .interface = */ ggml_backend_cann_interface,

0 commit comments

Comments
 (0)