Skip to content

Commit 5d84e9c

Browse files
Jack-Khuufacebook-github-bot
authored andcommitted
Allow deprecated declarations what using Parallel ExecuTorch
Summary: With the recent BC/FC work by ExecuTorch, many APIs have been marked as deprecated. While the functionality itself is not broken, this results in some build systems treating deprecatd APIs as a failure case. Specifically `_unsafe_reset_threadpool` This PR add a pragma allowing for the use of deprecatd APIs Differential Revision: D64020498
1 parent 93ff876 commit 5d84e9c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

torchao/experimental/ops/parallel-executorch-impl.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88

99
#include <executorch/extension/threadpool/threadpool.h>
1010

11+
// TODO(T139507292): Remove this once the Executorch API has stabilized. This is
12+
// here to allow the Executorch team to deprecate APIs in one diff and migrate
13+
// clients in a following diff. By default, some builds of this file treat
14+
// deprecated use as an error.
15+
#ifdef __GNUC__
16+
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
17+
#endif
18+
#ifdef __clang__
19+
#pragma clang diagnostic warning "-Wdeprecated-declarations"
20+
#endif
21+
1122
template <typename F>
1223
void torchao::parallel_1d(const int64_t begin, const int64_t end, const F& f) {
1324
torch::executorch::threadpool::get_threadpool()->run(

0 commit comments

Comments
 (0)