Skip to content

Commit 80e8895

Browse files
kimishpatelfacebook-github-bot
authored andcommitted
Update comment on deprecation warning to point inernal users to use safer API
Summary: For Meta internal use there is UseNThreadsThreadPoolGuard API to allow users to use a subset of threads. Point users to this API. Created from CodeHub with https://fburl.com/edit-in-codehub Reviewed By: swolchok Differential Revision: D77973302
1 parent bf4acb3 commit 80e8895

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

extension/threadpool/threadpool.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ 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 executorch::extension::threadpool::UseNThreadsThreadPoolGuard
46+
* API that provides a safer way to select a subset of threads, from threadpool,
47+
* to run the model on.
4548
*/
46-
[[deprecated("This API is experimental and may change without notice.")]]
49+
[[deprecated("This API is experimental and may change without notice. Consider using UseNThreadsThreadPoolGuard")]]
4750
bool _unsafe_reset_threadpool(uint32_t num_threads);
4851

4952
/**

0 commit comments

Comments
 (0)