Skip to content

Commit 87d979d

Browse files
bachelor-douggerganov
authored andcommitted
cann: Fix error when running a non-exist op (llama/9424)
1 parent 66e69f6 commit 87d979d

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
@@ -1943,7 +1943,7 @@ GGML_CALL ggml_backend_t ggml_backend_cann_init(int32_t device) {
19431943
GGML_CANN_LOG_ERROR("%s: error: failed to allocate context\n", __func__);
19441944
return nullptr;
19451945
}
1946-
1946+
ggml_cann_set_device(ctx->device);
19471947
ggml_backend_t cann_backend =
19481948
new ggml_backend{/* .guid = */ ggml_backend_cann_guid(),
19491949
/* .interface = */ ggml_backend_cann_interface,

0 commit comments

Comments
 (0)