/usr/local/lib64/python3.6/site-packages/torch/include/caffe2/utils/threadpool
NameSizeModeActions
pthreadpool-cpp.h14170644editdlrm
pthreadpool.h63380644editdlrm
ThreadPool.h19270644editdlrm
ThreadPoolCommon.h6770644editdlrm
thread_pool_guard.h5670644editdlrm
WorkersPool.h115520644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/caffe2/utils/threadpool/thread_pool_guard.h (567B)
#pragma once #include namespace caffe2 { // A RAII, thread local (!) guard that enables or disables grad mode upon // construction, and sets it back to the original value upon destruction. struct TORCH_API _NoPThreadPoolGuard { static bool is_enabled(); static void set_enabled(bool enabled); _NoPThreadPoolGuard(): prev_mode_(_NoPThreadPoolGuard::is_enabled()) { _NoPThreadPoolGuard::set_enabled(true); } ~_NoPThreadPoolGuard() { _NoPThreadPoolGuard::set_enabled(prev_mode_); } private: bool prev_mode_; }; }