From f065a98e08f324edf6460de6267da2736a64531b Mon Sep 17 00:00:00 2001 From: lucylq Date: Wed, 27 Aug 2025 14:04:06 -0700 Subject: [PATCH] Enable xnnpack weight sharing in ios and android --- tools/cmake/preset/android.cmake | 1 + tools/cmake/preset/apple_common.cmake | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/cmake/preset/android.cmake b/tools/cmake/preset/android.cmake index a89f5425e0b..d794e8fcef3 100644 --- a/tools/cmake/preset/android.cmake +++ b/tools/cmake/preset/android.cmake @@ -15,6 +15,7 @@ set_overridable_option(EXECUTORCH_LOG_LEVEL Info) set_overridable_option(EXECUTORCH_BUILD_DEVTOOLS ON) set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON) +set_overridable_option(EXECUTORCH_XNNPACK_ENABLE_WEIGHT_CACHE ON) set_overridable_option(EXECUTORCH_XNNPACK_SHARED_WORKSPACE ON) set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON) diff --git a/tools/cmake/preset/apple_common.cmake b/tools/cmake/preset/apple_common.cmake index 5f6d65be42c..7b4ec420996 100644 --- a/tools/cmake/preset/apple_common.cmake +++ b/tools/cmake/preset/apple_common.cmake @@ -19,6 +19,7 @@ set_overridable_option(BUILD_TESTING OFF) set_overridable_option(EXECUTORCH_BUILD_XNNPACK ON) set_overridable_option(EXECUTORCH_BUILD_COREML ON) set_overridable_option(EXECUTORCH_BUILD_MPS ON) +set_overridable_option(EXECUTORCH_XNNPACK_ENABLE_WEIGHT_CACHE ON) set_overridable_option(EXECUTORCH_XNNPACK_SHARED_WORKSPACE ON) set_overridable_option(EXECUTORCH_BUILD_EXTENSION_APPLE ON) set_overridable_option(EXECUTORCH_BUILD_EXTENSION_DATA_LOADER ON)