Skip to content

Commit 73c124c

Browse files
authored
Update comment on deprecation warning to point inernal users to use safer API
Differential Revision: D77973302 Pull Request resolved: pytorch#12318
1 parent a0618c8 commit 73c124c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extension/threadpool/threadpool.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ class ThreadPool final {
4242
* is a private API, which will later be replaced by something that allows
4343
* creating of threadpool with requested size and use such a threadpool with
4444
* backend delegates, custom ops or optimized lib.
45+
* For Meta internal use, there is
46+
* executorch::extension::threadpool::UseNThreadsThreadPoolGuard API that
47+
* provides a safer way to select a subset of threads, from threadpool, to run
48+
* the model on.
4549
*/
46-
[[deprecated("This API is experimental and may change without notice.")]]
50+
[[deprecated(
51+
"This API is experimental and may change without notice. Consider using UseNThreadsThreadPoolGuard")]]
4752
bool _unsafe_reset_threadpool(uint32_t num_threads);
4853

4954
/**

0 commit comments

Comments
 (0)