Skip to content

Commit 3d041e6

Browse files
committed
Update base for Update on "[ET-VK] Add support for binary symint ops"
## Changes * Add an implementation for binary operators which add symbolic integers. ## Motivation Support executing llama models with dynamic shapes. This operator shows up when exporting with dynamic shapes. Differential Revision: [D75238029](https://our.internmc.facebook.com/intern/diff/D75238029/) [ghstack-poisoned]
2 parents 6dfd202 + 879eee0 commit 3d041e6

File tree

110 files changed

+2534
-830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+2534
-830
lines changed

.github/scripts/label_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323
LABEL_ERR_MSG_TITLE = "This PR needs a `release notes:` label"
2424
LABEL_ERR_MSG = f"""# {LABEL_ERR_MSG_TITLE}
25-
If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with `release notes:`.
26-
27-
If not, please add the `release notes: none` label.
25+
If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with `release notes:`. This helps us keep track and include your important work in the next release notes.
2826
2927
To add a label, you can comment to pytorchbot, for example
3028
`@pytorchbot label "release notes: none"`

.github/scripts/trymerge.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@
5959
patterns_to_regex,
6060
retries_decorator,
6161
)
62-
from label_utils import (
63-
gh_add_labels,
64-
gh_remove_label,
65-
has_required_labels,
66-
LABEL_ERR_MSG,
67-
)
62+
from label_utils import gh_add_labels, gh_remove_label
6863
from trymerge_explainer import get_revert_message, TryMergeExplainer
6964

7065
# labels
@@ -2116,9 +2111,6 @@ def merge(
21162111
# Check for approvals
21172112
find_matching_merge_rule(pr, repo, skip_mandatory_checks=True)
21182113

2119-
if not has_required_labels(pr):
2120-
raise RuntimeError(LABEL_ERR_MSG.lstrip(" #"))
2121-
21222114
if ignore_current:
21232115
checks = pr.get_checkrun_conclusions()
21242116
_, failing, _ = categorize_checks(

.github/workflows/check-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
PR_NUM: ${{ github.event.number || github.event.inputs.pr_number }}
5252
run: |
5353
set -ex
54-
python3 .github/scripts/check_labels.py --exit-non-zero "${PR_NUM}"
54+
python3 .github/scripts/check_labels.py "${PR_NUM}"

.github/workflows/trunk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ jobs:
305305
# Install requirements
306306
${CONDA_RUN} sh install_requirements.sh
307307
${CONDA_RUN} sh backends/apple/coreml/scripts/install_requirements.sh
308-
${CONDA_RUN} python install_executorch.py --pybind coreml
308+
${CONDA_RUN} python install_executorch.py
309309
${CONDA_RUN} sh examples/models/llama/install_requirements.sh
310310
311311
# Test ANE llama

CMakePresets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/third-party/ios-cmake/ios.toolchain.cmake",
1616
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/macos.cmake",
1717
"PLATFORM": "MAC_ARM64",
18-
"DEPLOYMENT_TARGET": "10.15"
18+
"DEPLOYMENT_TARGET": "12.0"
1919
},
2020
"condition": {
2121
"lhs": "${hostSystemName}",
@@ -77,7 +77,7 @@
7777
"inherits": ["common"],
7878
"cacheVariables": {
7979
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/pybind.cmake",
80-
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15"
80+
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0"
8181
},
8282
"condition": {
8383
"type": "inList",
@@ -93,7 +93,7 @@
9393
],
9494
"cacheVariables": {
9595
"EXECUTORCH_BUILD_PRESET_FILE": "${sourceDir}/tools/cmake/preset/llm.cmake",
96-
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15"
96+
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0"
9797
},
9898
"condition": {
9999
"type": "inList",

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ let package = Package(
120120
name: "executorch",
121121
platforms: [
122122
.iOS(.v17),
123-
.macOS(.v10_15),
123+
.macOS(.v12),
124124
],
125125
products: packageProducts,
126126
targets: packageTargets + [

backends/apple/coreml/runtime/delegate/ETCoreMLDefaultModelExecutor.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ - (instancetype)initWithModel:(ETCoreMLModel *)model {
2727
eventLogger:(const executorchcoreml::ModelEventLogger* _Nullable __unused)eventLogger
2828
error:(NSError * __autoreleasing *)error {
2929
if (self.ignoreOutputBackings) {
30-
if (@available(macOS 11.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
30+
if (@available(iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
3131
predictionOptions.outputBackings = @{};
3232
}
3333
}

backends/apple/coreml/runtime/delegate/ETCoreMLModelManager.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ BOOL is_backed_by_same_buffer(MLMultiArray *array1, MLMultiArray *array2) {
9292
NSOrderedSet<NSString *> *output_names,
9393
NSError * __autoreleasing *error) {
9494
MLPredictionOptions *options = [MLPredictionOptions new];
95-
if (@available(macOS 11.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
95+
if (@available(iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
9696
NSMutableDictionary<NSString *, id> *output_backings = [NSMutableDictionary dictionary];
9797
NSEnumerator<NSString *> *enumerator = [output_names objectEnumerator];
9898
for (MLMultiArray *output in outputs) {
@@ -687,7 +687,7 @@ - (void)addPrewarmedAsset:(ETCoreMLAsset *)asset {
687687
eventLogger:eventLogger
688688
error:&localError];
689689
// Try without output backings.
690-
if (@available(macOS 11.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
690+
if (@available(iOS 16.0, tvOS 16.0, watchOS 9.0, *)) {
691691
if (!modelOutputs && predictionOptions.outputBackings.count > 0) {
692692
executor.ignoreOutputBackings = YES;
693693
localError = nil;

backends/apple/mps/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ I 00:00:00.122615 executorch:mps_executor_runner.mm:501] Model verified successf
9191
### [Optional] Run the generated model directly using pybind
9292
1. Make sure `pybind` MPS support was installed:
9393
```bash
94-
./install_executorch.sh --pybind mps
94+
CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
9595
```
9696
2. Run the `mps_example` script to trace the model and run it directly from python:
9797
```bash

backends/arm/_passes/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .decompose_cosine_similarity_pass import DecomposeCosineSimilarityPass # noqa
2424
from .decompose_div_pass import DecomposeDivPass # noqa
2525
from .decompose_gelu_pass import DecomposeGeluPass # noqa
26+
from .decompose_groupnorm_pass import DecomposeGroupNormPass # noqa
2627
from .decompose_layernorm_pass import DecomposeLayerNormPass # noqa
2728
from .decompose_leaky_relu_pass import DecomposeLeakyReLUPass # noqa
2829
from .decompose_linalg_vector_norm_pass import DecomposeLinearVectorNormPass # noqa

0 commit comments

Comments
 (0)