From 7d8e1d89f95354487aac4661a672f0bcb4bae6f0 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Fri, 4 Oct 2024 13:44:11 -0700 Subject: [PATCH 01/10] Pin Bump PT 20241002; Pin Bump ET to one using that PT pin --- install/.pins/et-pin.txt | 2 +- install/install_requirements.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/.pins/et-pin.txt b/install/.pins/et-pin.txt index ceb4852bf..0fe05f63d 100644 --- a/install/.pins/et-pin.txt +++ b/install/.pins/et-pin.txt @@ -1 +1 @@ -286799c9c844ce6427b8eca260f9b2f28be03291 +a4fcdcdc22f7f5ea5522199c5653670a65e04e28 diff --git a/install/install_requirements.sh b/install/install_requirements.sh index cd6c302c2..dedf5df4c 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -47,10 +47,10 @@ fi # NOTE: If a newly-fetched version of the executorch repo changes the value of # PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary # package versions. -PYTORCH_NIGHTLY_VERSION=dev20240901 +PYTORCH_NIGHTLY_VERSION=dev20241002 # Nightly version for torchvision -VISION_NIGHTLY_VERSION=dev20240901 +VISION_NIGHTLY_VERSION=dev20241002 # Nightly version for torchtune TUNE_NIGHTLY_VERSION=dev20240928 @@ -73,7 +73,7 @@ fi # pip packages needed by exir. REQUIREMENTS_TO_INSTALL=( - torch=="2.5.0.${PYTORCH_NIGHTLY_VERSION}" + torch=="2.6.0.${PYTORCH_NIGHTLY_VERSION}" torchvision=="0.20.0.${VISION_NIGHTLY_VERSION}" torchtune=="0.3.0.${TUNE_NIGHTLY_VERSION}" ) From 5dd5e425de4acbcaeb6735d81117e248b2002f08 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Mon, 7 Oct 2024 12:23:04 -0700 Subject: [PATCH 02/10] Bump to less broken ET pin --- install/.pins/et-pin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/.pins/et-pin.txt b/install/.pins/et-pin.txt index 0fe05f63d..df9fd3641 100644 --- a/install/.pins/et-pin.txt +++ b/install/.pins/et-pin.txt @@ -1 +1 @@ -a4fcdcdc22f7f5ea5522199c5653670a65e04e28 +478a9b6d42d519fdcd58dde664047fa19aafb487 From 3d8213f2306ff40778a9b5872301a9b4b38507dc Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Mon, 7 Oct 2024 16:04:55 -0700 Subject: [PATCH 03/10] Update threadpool api --- runner/run.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runner/run.cpp b/runner/run.cpp index e161c029e..0293153e5 100644 --- a/runner/run.cpp +++ b/runner/run.cpp @@ -861,9 +861,9 @@ int main(int argc, char* argv[]) { #if defined(ET_USE_ADAPTIVE_THREADS) uint32_t num_performant_cores = - torch::executorch::cpuinfo::get_num_performant_cores(); + ::executorch::extension::cpuinfo::get_num_performant_cores(); if (num_performant_cores > 0) { - torch::executorch::threadpool::get_threadpool()->_unsafe_reset_threadpool( + ::executorch::threadpool::get_threadpool()->_unsafe_reset_threadpool( num_performant_cores); } #endif From 297e5a310678869f92555d2c6f972dbf53959961 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Mon, 7 Oct 2024 16:50:46 -0700 Subject: [PATCH 04/10] undo --- runner/run.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runner/run.cpp b/runner/run.cpp index 0293153e5..e161c029e 100644 --- a/runner/run.cpp +++ b/runner/run.cpp @@ -861,9 +861,9 @@ int main(int argc, char* argv[]) { #if defined(ET_USE_ADAPTIVE_THREADS) uint32_t num_performant_cores = - ::executorch::extension::cpuinfo::get_num_performant_cores(); + torch::executorch::cpuinfo::get_num_performant_cores(); if (num_performant_cores > 0) { - ::executorch::threadpool::get_threadpool()->_unsafe_reset_threadpool( + torch::executorch::threadpool::get_threadpool()->_unsafe_reset_threadpool( num_performant_cores); } #endif From 6f081ce9e845d45f740f368b9ffa8e08855d07cb Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Tue, 8 Oct 2024 20:18:39 -0700 Subject: [PATCH 05/10] Bump ET pin and add microkernels for XNN --- install/.pins/et-pin.txt | 2 +- runner/et.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/install/.pins/et-pin.txt b/install/.pins/et-pin.txt index df9fd3641..98b3ff446 100644 --- a/install/.pins/et-pin.txt +++ b/install/.pins/et-pin.txt @@ -1 +1 @@ -478a9b6d42d519fdcd58dde664047fa19aafb487 +cb12061fc1abe91390d3156ac3c579e94cb6fc00 diff --git a/runner/et.cmake b/runner/et.cmake index 916ce9ea8..df0aa70df 100644 --- a/runner/et.cmake +++ b/runner/et.cmake @@ -94,6 +94,7 @@ if(executorch_FOUND) optimized_native_cpu_ops_lib quantized_ops_lib xnnpack_backend + microkernels-prod XNNPACK pthreadpool cpuinfo From 7fd2e5afe2b3b929733329b09fa1240c3b4ac2b3 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Tue, 8 Oct 2024 20:42:54 -0700 Subject: [PATCH 06/10] Update xnn export pass path --- torchchat/export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchchat/export.py b/torchchat/export.py index c024e9deb..626d4fae3 100644 --- a/torchchat/export.py +++ b/torchchat/export.py @@ -94,7 +94,7 @@ def export_for_server( from executorch.backends.xnnpack.partition.xnnpack_partitioner import ( XnnpackDynamicallyQuantizedPartitioner, ) - from executorch.backends.xnnpack.passes.convert_to_linear import ( + from executorch.backends.xnnpack._passes.convert_to_linear import ( ConvertToLinearPass, ) from executorch.exir import EdgeProgramManager, to_edge From 2cc65b76adf3e1760e7e2e064fbda316a5c43b52 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Wed, 9 Oct 2024 00:21:39 -0700 Subject: [PATCH 07/10] Update ET pin to pick up green CI --- install/.pins/et-pin.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/.pins/et-pin.txt b/install/.pins/et-pin.txt index 98b3ff446..e61fae3a5 100644 --- a/install/.pins/et-pin.txt +++ b/install/.pins/et-pin.txt @@ -1 +1 @@ -cb12061fc1abe91390d3156ac3c579e94cb6fc00 +72b3bb3194c611f7c4861e6f3b24af5de868af72 From 88f8658d75ad9437f902a7ae5ec49af572ce55fd Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Wed, 9 Oct 2024 01:09:57 -0700 Subject: [PATCH 08/10] Use temp AO commit to fix deprecation warnings --- install/install_requirements.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install_requirements.sh b/install/install_requirements.sh index a05e255db..b12205d03 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -91,7 +91,7 @@ REQUIREMENTS_TO_INSTALL=( ( set -x - $PIP_EXECUTABLE install torchao=="0.5.0" + $PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@dfd4cdacb41014b37a2bb6813fbd7a035802bff8 ) if [[ -x "$(command -v nvidia-smi)" ]]; then From 1f5638599d148d7380113957de09097257c4f6c3 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Wed, 9 Oct 2024 09:32:28 -0700 Subject: [PATCH 09/10] Add microkernel to CMAKE --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cc2d3347..61fd4d5a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ add_subdirectory(tokenizer) # include et_run executable include(runner/et.cmake) if(TARGET et_run) - target_link_libraries(et_run PUBLIC tokenizer) + target_link_libraries(et_run PUBLIC tokenizer microkernels-prod) endif() # include aoti_run executable From 464c91df903c1ddb189e0206e37aec4e7a533c46 Mon Sep 17 00:00:00 2001 From: Jack-Khuu Date: Wed, 9 Oct 2024 11:41:18 -0700 Subject: [PATCH 10/10] Udpate AO pins --- install/.pins/torchao-pin.txt | 2 +- install/install_requirements.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/.pins/torchao-pin.txt b/install/.pins/torchao-pin.txt index a6a965960..a7422ea2e 100644 --- a/install/.pins/torchao-pin.txt +++ b/install/.pins/torchao-pin.txt @@ -1 +1 @@ -ae3e7c68eae7085e13241cb3d6b39481868dd162 +49b1fb61c8b8eceda755579a2fd92c756d822de2 diff --git a/install/install_requirements.sh b/install/install_requirements.sh index b12205d03..a05e255db 100755 --- a/install/install_requirements.sh +++ b/install/install_requirements.sh @@ -91,7 +91,7 @@ REQUIREMENTS_TO_INSTALL=( ( set -x - $PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@dfd4cdacb41014b37a2bb6813fbd7a035802bff8 + $PIP_EXECUTABLE install torchao=="0.5.0" ) if [[ -x "$(command -v nvidia-smi)" ]]; then