File tree Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Expand file tree Collapse file tree 6 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -1776,14 +1776,14 @@ ET_NODISCARD Error XNNCompiler::compileModel(
17761776 subgraph.get (),
17771777 /* weight_cache=*/ nullptr , // TODO - support weight cache
17781778 workspace,
1779- torch ::executorch::threadpool::get_pthreadpool (),
1779+ ::executorch::extension ::threadpool::get_pthreadpool (),
17801780 runtime_flags,
17811781 &runtime_ptr);
17821782#else
17831783 status = xnn_create_runtime_v3 (
17841784 subgraph.get (),
17851785 /* weight_cache=*/ nullptr , // TODO - support weight cache
1786- torch ::executorch::threadpool::get_pthreadpool (),
1786+ ::executorch::extension ::threadpool::get_pthreadpool (),
17871787 runtime_flags,
17881788 &runtime_ptr);
17891789#endif
Original file line number Diff line number Diff line change @@ -59,13 +59,13 @@ int32_t main(int32_t argc, char** argv) {
5959
6060#if defined(ET_USE_THREADPOOL)
6161 uint32_t num_performant_cores = cpu_threads == -1
62- ? torch ::executorch::cpuinfo::get_num_performant_cores ()
62+ ? ::executorch::extension ::cpuinfo::get_num_performant_cores ()
6363 : static_cast <uint32_t >(cpu_threads);
6464 ET_LOG (
6565 Info, " Resetting threadpool with num threads = %d" , num_performant_cores);
6666 if (num_performant_cores > 0 ) {
67- torch ::executorch::threadpool::get_threadpool ()-> _unsafe_reset_threadpool (
68- num_performant_cores);
67+ ::executorch::extension:: threadpool::get_threadpool ()
68+ ->_unsafe_reset_threadpool( num_performant_cores);
6969 }
7070#endif
7171 // create llama runner
Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ int32_t main(int32_t argc, char** argv) {
7272
7373#if defined(ET_USE_THREADPOOL)
7474 uint32_t num_performant_cores = cpu_threads == -1
75- ? torch ::executorch::cpuinfo::get_num_performant_cores ()
75+ ? ::executorch::extension ::cpuinfo::get_num_performant_cores ()
7676 : static_cast <uint32_t >(cpu_threads);
7777 ET_LOG (
7878 Info, " Resetting threadpool with num threads = %d" , num_performant_cores);
7979 if (num_performant_cores > 0 ) {
80- torch ::executorch::threadpool::get_threadpool ()-> _unsafe_reset_threadpool (
81- num_performant_cores);
80+ ::executorch::extension:: threadpool::get_threadpool ()
81+ ->_unsafe_reset_threadpool( num_performant_cores);
8282 }
8383#endif
8484 // create llama runner
Original file line number Diff line number Diff line change @@ -95,11 +95,11 @@ class ExecuTorchLlamaJni
9595#if defined(ET_USE_THREADPOOL)
9696 // Reserve 1 thread for the main thread.
9797 uint32_t num_performant_cores =
98- torch ::executorch::cpuinfo::get_num_performant_cores () - 1 ;
98+ ::executorch::extension ::cpuinfo::get_num_performant_cores () - 1;
9999 if (num_performant_cores > 0 ) {
100100 ET_LOG (Info, " Resetting threadpool to %d threads" , num_performant_cores);
101- torch ::executorch::threadpool::get_threadpool ()-> _unsafe_reset_threadpool (
102- num_performant_cores);
101+ ::executorch::extension:: threadpool::get_threadpool ()
102+ ->_unsafe_reset_threadpool( num_performant_cores);
103103 }
104104#endif
105105
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ void cpu_flash_attention(
367367 int64_t qSlice = (qSize - 1 ) / qSplitSize + 1 ;
368368#ifdef ET_USE_THREADPOOL
369369 int64_t num_thread =
370- torch ::executorch::threadpool::get_threadpool ()->get_thread_count ();
370+ ::executorch::extension ::threadpool::get_threadpool ()->get_thread_count();
371371#else
372372 int64_t num_thread = 1 ;
373373#endif
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ namespace {
2020thread_local int64_t thread_num_ = 0 ;
2121}
2222
23- using namespace torch ::executorch::threadpool;
23+ using namespace ::executorch::extension ::threadpool;
2424
2525inline int64_t divup (int64_t x, int64_t y) {
2626 return (x + y - 1 ) / y;
You can’t perform that action at this time.
0 commit comments