pytorch/caffe2/utils/threadpool
Nikita Shulga 310e3060b7 [Caffe2] Handle cpuinfo_initialize() failure (#114011)
It can fail on ARM platform if `/sys` folder is not accessible.
In that case, call `std:🧵:hardware_concurrency()`, which is
aligned with the thread_pool initialization logic of `c10::TaskThreadPoolBase:defaultNumThreads()`

Further addresses issue raised in https://github.com/pytorch/pytorch/issues/113568
Pull Request resolved: https://github.com/pytorch/pytorch/pull/114011
Approved by: https://github.com/kit1980
ghstack dependencies: #113771
2023-11-18 03:20:22 +00:00
..
pthreadpool-cpp.cc
pthreadpool-cpp.h
pthreadpool.cc
pthreadpool.h
pthreadpool_impl.cc
thread_pool_guard.cpp
thread_pool_guard.h
ThreadPool.cc [Caffe2] Handle cpuinfo_initialize() failure (#114011) 2023-11-18 03:20:22 +00:00
ThreadPool.h
ThreadPoolCommon.h
WorkersPool.h