Skip to content

Commit 4a99538

Browse files
committed
fix bug
1 parent 6b2fb7a commit 4a99538

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cann/ggml-cann.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* @param device The device ID to set.
7676
*/
7777
void ggml_cann_set_device(const int32_t device) {
78-
int current_device;
78+
int current_device = -1;
7979
aclrtGetDevice(&current_device);
8080

8181
if (device == current_device) {

0 commit comments

Comments
 (0)