Skip to content

Commit 4db5e01

Browse files
committed
Update threadpool.cpp
1 parent 54598a9 commit 4db5e01

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extension/threadpool/threadpool.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ size_t ThreadPool::get_thread_count() const {
6262
}
6363

6464
bool ThreadPool::_unsafe_reset_threadpool(uint32_t new_thread_count) {
65+
ET_LOG(Info, "Resetting threadpool to %u threads.", new_thread_count);
66+
6567
// No need to do anything if the count is same or 0
6668
if (new_thread_count == get_thread_count() || new_thread_count == 0) {
6769
return true;
@@ -126,8 +128,7 @@ ThreadPool* get_threadpool() {
126128
auto result = cpuinfo_get_processors_count();
127129
#else
128130
// Set threads equal to the number of performance cores.
129-
auto result =
130-
::executorch::extension::cpuinfo::get_num_performant_cores();
131+
auto result = ::executorch::extension::cpuinfo::get_num_performant_cores();
131132
#endif
132133

133134
/*
@@ -138,7 +139,7 @@ ThreadPool* get_threadpool() {
138139
* tricky to detect if we are running under tsan, for now capping the
139140
* default threadcount to the tsan limit unconditionally.
140141
*/
141-
constexpr int tsan_thread_limit = 63;
142+
constexpr unsigned int tsan_thread_limit = 63;
142143
return std::min(result, tsan_thread_limit);
143144
})();
144145

0 commit comments

Comments
 (0)