Skip to content

Commit 3a10f18

Browse files
committed
cann: use thread local var
1 parent 0fbf272 commit 3a10f18

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
@@ -68,7 +68,7 @@
6868
}
6969

7070
// Global variable to record the current device of this process.
71-
static int g_current_cann_device = -1;
71+
thread_local int g_current_cann_device = -1;
7272

7373
/**
7474
* @brief Set the CANN device to be used.

0 commit comments

Comments
 (0)