We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fbf272 commit 1ab6ec2Copy full SHA for 1ab6ec2
ggml/src/ggml-cann/ggml-cann.cpp
@@ -67,8 +67,8 @@
67
GGML_ABORT("CANN error");
68
}
69
70
-// Global variable to record the current device of this process.
71
-static int g_current_cann_device = -1;
+// Thread-local variable to record the current device of this thread.
+thread_local int g_current_cann_device = -1;
72
73
/**
74
* @brief Set the CANN device to be used.
0 commit comments