xref: /aosp_15_r20/external/executorch/extension/threadpool/cpuinfo_utils.h (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <cpuinfo.h>
12 
13 namespace executorch::extension::cpuinfo {
14 
15 uint32_t get_num_performant_cores();
16 
17 } // namespace executorch::extension::cpuinfo
18 
19 namespace torch::executorch::cpuinfo { // DEPRECATED
20 // TODO(T197294990): Remove these deprecated aliases once all users have moved
21 // to the new `::executorch` namespaces. Note that threadpool incorrectly used
22 // the namespace `torch::executorch` instead of `torch::executor`.
23 using ::executorch::extension::cpuinfo::get_num_performant_cores; // DEPRECATED
24 } // namespace torch::executorch::cpuinfo
25