huajsj commented on a change in pull request #9802:
URL: https://github.com/apache/tvm/pull/9802#discussion_r808719212
##########
File path: src/runtime/threading_backend.cc
##########
@@ -37,11 +35,14 @@
#if defined(__hexagon__)
#include <dlfcn.h>
#endif
+#include <algorithm>
+#include <thread>
+#define CURRENT_THREAD_HANDLE (static_cast<std::thread::native_handle_type>(0))
namespace tvm {
namespace runtime {
namespace threading {
-
+thread_local int max_concurrency_value = 0;
Review comment:
'max_concurrency_value' is cooperating with the 'ParallelLauncher' which
is running the worker thread is a thread_local variable, so we need to make
max_concurrency_value to be a thread_local variable too, then when different
thread run 'ParallelLauncher', the different 'ParallelLauncher' can get
different value of 'max_concurrency_value'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]