From e365c5b785f6d18352a0c42e6a1974b0858bae37 Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Thu, 11 Apr 2024 14:46:57 -0700 Subject: [PATCH 1/3] Fix build-framework-ios CI job (#2996) Summary: As titled. `build_apple_frameworks.sh` is copying all the exported headers out and in #2934 `//executorch/schema:program` is being moved to `exported_deps` and causing `build_apple_frameworks.sh` to not able to copy generated headers `program_generated.h` and `scalar_type_generated.h`. This PR fixes it by moving it back to `deps`. Pull Request resolved: https://github.com/pytorch/executorch/pull/2996 Reviewed By: kirklandsign Differential Revision: D56028952 Pulled By: larryliu0820 fbshipit-source-id: 2cd4999154877b0ac7b49cd1f54d518cba34b2f2 --- runtime/executor/targets.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/executor/targets.bzl b/runtime/executor/targets.bzl index 0f451b1a70a..46f997a80ad 100644 --- a/runtime/executor/targets.bzl +++ b/runtime/executor/targets.bzl @@ -84,6 +84,8 @@ def define_common_targets(): "//executorch/runtime/kernel:operator_registry", "//executorch/runtime/platform:platform", "//executorch/schema:extended_header", + ], + deps = [ "//executorch/schema:program", ], visibility = [ From 4120df4e0b78ee8e13e00236233096da56dce407 Mon Sep 17 00:00:00 2001 From: Mengwei Liu Date: Fri, 12 Apr 2024 00:22:12 -0700 Subject: [PATCH 2/3] Fix 3 CI jobs (#3006) Summary: * Apple / build-frameworks-ios / macos-job We removed libcustom_ops_lib.a in https://github.com/pytorch/executorch/issues/2916 so need to remove it from `build_apple_frameworks.sh`. * Lint / lintrunner / linux-job Remove extra line in backends/qualcomm/quantizer/utils.py * pull / unittest / macos (buck2) / macos-job Fix it by using `executorch_no_prim_ops` instead of `executorch` in MPS and CoreML. Pull Request resolved: https://github.com/pytorch/executorch/pull/3006 Reviewed By: lucylq Differential Revision: D56048430 Pulled By: larryliu0820 fbshipit-source-id: 9dcb476eea446ea3aba566d595167c691fb00eec --- CMakeLists.txt | 4 ++++ build/build_apple_frameworks.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 75de1e01ae6..fa19d5bcf2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -527,6 +527,10 @@ if(EXECUTORCH_BUILD_PYBIND) find_library(TORCH_PYTHON_LIBRARY torch_python PATHS "${TORCH_INSTALL_PREFIX}/lib") + # TODO(larryliu): Fix macOS 2 dylibs having 2 sets of static variables issue + if(EXECUTORCH_BUILD_CUSTOM_OPS_AOT AND NOT APPLE) + list(APPEND _dep_libs custom_ops_aot_lib) + endif() # compile options for pybind set(_pybind_compile_options -Wno-deprecated-declarations -fPIC -frtti diff --git a/build/build_apple_frameworks.sh b/build/build_apple_frameworks.sh index cbaa903ecda..0b6adae0a7f 100755 --- a/build/build_apple_frameworks.sh +++ b/build/build_apple_frameworks.sh @@ -27,7 +27,7 @@ XNNPACK=OFF HEADERS_PATH="include" EXECUTORCH_FRAMEWORK="executorch:libexecutorch.a,libexecutorch_no_prim_ops.a,libextension_apple.a,libextension_data_loader.a,libextension_module.a:$HEADERS_PATH" COREML_FRAMEWORK="coreml_backend:libcoremldelegate.a:" -CUSTOM_FRAMEWORK="custom_backend:libcustom_ops.a,libcustom_ops_lib.a:" +CUSTOM_FRAMEWORK="custom_backend:libcustom_ops.a:" MPS_FRAMEWORK="mps_backend:libmpsdelegate.a:" OPTIMIZED_FRAMEWORK="optimized_backend:liboptimized_kernels.a,liboptimized_ops_lib.a:" PORTABLE_FRAMEWORK="portable_backend:libportable_kernels.a,libportable_ops_lib.a:" From c75f7c788a89b28d4f1873d4e0fb43055aaab6e1 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 22 Apr 2024 12:21:49 -0700 Subject: [PATCH 3/3] Revert "Fix build-framework-ios CI job (#2996)" This reverts commit e365c5b785f6d18352a0c42e6a1974b0858bae37. --- runtime/executor/targets.bzl | 2 -- 1 file changed, 2 deletions(-) diff --git a/runtime/executor/targets.bzl b/runtime/executor/targets.bzl index 46f997a80ad..0f451b1a70a 100644 --- a/runtime/executor/targets.bzl +++ b/runtime/executor/targets.bzl @@ -84,8 +84,6 @@ def define_common_targets(): "//executorch/runtime/kernel:operator_registry", "//executorch/runtime/platform:platform", "//executorch/schema:extended_header", - ], - deps = [ "//executorch/schema:program", ], visibility = [