Skip to content

Commit a1696a0

Browse files
authored
Merge branch 'main' into gh/trivedivivek/79/head
2 parents 5eb160d + 9f5988e commit a1696a0

31 files changed

+311
-307
lines changed

.github/workflows/doc-build.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@ on:
1414
- cron: '0 0 * * *'
1515

1616
jobs:
17-
check-urls:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@v3
21-
- name: Check URLs
22-
run: bash ./scripts/check_urls.sh
23-
24-
check-xrefs:
25-
runs-on: ubuntu-latest
26-
steps:
27-
- uses: actions/checkout@v3
28-
- name: Check Links
29-
run: bash ./scripts/check_xrefs.sh
30-
3117
build:
3218
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
3319
permissions:

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,30 @@ jobs:
6464
6565
exit $RC
6666
67+
lint-urls:
68+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
69+
with:
70+
runner: linux.2xlarge
71+
docker-image: executorch-ubuntu-22.04-linter
72+
submodules: 'none'
73+
fetch-depth: 0
74+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
75+
timeout: 90
76+
script: |
77+
./scripts/lint_urls.sh
78+
79+
lint-xrefs:
80+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
81+
with:
82+
runner: linux.2xlarge
83+
docker-image: executorch-ubuntu-22.04-linter
84+
submodules: 'none'
85+
fetch-depth: 0
86+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
87+
timeout: 90
88+
script: |
89+
./scripts/lint_xrefs.sh
90+
6791
android-java-format:
6892
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
6993
permissions:

.lintrunner.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exclude_patterns = [
1010
'exir/serde/**',
1111
]
1212
command = [
13-
'python',
13+
'python3',
1414
'-m',
1515
'lintrunner_adapters',
1616
'run',
@@ -19,7 +19,7 @@ command = [
1919
'@{{PATHSFILE}}'
2020
]
2121
init_command = [
22-
'python',
22+
'python3',
2323
'-m',
2424
'lintrunner_adapters',
2525
'run',
@@ -41,7 +41,7 @@ exclude_patterns = [
4141
'exir/serde/**',
4242
]
4343
command = [
44-
'python',
44+
'python3',
4545
'-m',
4646
'lintrunner_adapters',
4747
'run',
@@ -50,7 +50,7 @@ command = [
5050
'@{{PATHSFILE}}'
5151
]
5252
init_command = [
53-
'python',
53+
'python3',
5454
'-m',
5555
'lintrunner_adapters',
5656
'run',
@@ -83,7 +83,7 @@ exclude_patterns = [
8383
'runtime/core/portable_type/c10/**',
8484
]
8585
command = [
86-
'python',
86+
'python3',
8787
'-m',
8888
'lintrunner_adapters',
8989
'run',
@@ -94,7 +94,7 @@ command = [
9494
'@{{PATHSFILE}}'
9595
]
9696
init_command = [
97-
'python',
97+
'python3',
9898
'-m',
9999
'lintrunner_adapters',
100100
'run',
@@ -116,7 +116,7 @@ exclude_patterns = [
116116
'**/third-party/**',
117117
]
118118
command = [
119-
'python',
119+
'python3',
120120
'-m',
121121
'lintrunner_adapters',
122122
'run',
@@ -126,7 +126,7 @@ command = [
126126
'@{{PATHSFILE}}',
127127
]
128128
init_command = [
129-
'python',
129+
'python3',
130130
'-m',
131131
'lintrunner_adapters',
132132
'run',
@@ -150,7 +150,7 @@ exclude_patterns = [
150150
'**/third-party/**',
151151
]
152152
command = [
153-
'python',
153+
'python3',
154154
'-m',
155155
'lintrunner_adapters',
156156
'run',
@@ -191,7 +191,7 @@ exclude_patterns = [
191191
'extension/llm/custom_ops/spinquant/test/fast_hadamard_transform_special_unstrided_cpu.h',
192192
]
193193
command = [
194-
'python',
194+
'python3',
195195
'-m',
196196
'lintrunner_adapters',
197197
'run',
@@ -226,7 +226,7 @@ exclude_patterns = [
226226
'util/**',
227227
]
228228
command = [
229-
'python',
229+
'python3',
230230
'-m',
231231
'lintrunner_adapters',
232232
'run',
@@ -275,7 +275,7 @@ exclude_patterns = [
275275
'util/**',
276276
]
277277
command = [
278-
'python',
278+
'python3',
279279
'-m',
280280
'lintrunner_adapters',
281281
'run',
@@ -325,7 +325,7 @@ exclude_patterns = [
325325
'backends/arm/test/**',
326326
]
327327
command = [
328-
'python',
328+
'python3',
329329
'-m',
330330
'lintrunner_adapters',
331331
'run',
@@ -337,7 +337,7 @@ command = [
337337
'@{{PATHSFILE}}'
338338
]
339339
init_command = [
340-
'python',
340+
'python3',
341341
'-m',
342342
'lintrunner_adapters',
343343
'run',
@@ -356,7 +356,7 @@ exclude_patterns = [
356356
'.lintrunner.toml',
357357
]
358358
command = [
359-
'python',
359+
'python3',
360360
'-m',
361361
'lintrunner_adapters',
362362
'run',

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Key value propositions of ExecuTorch are:
4949
## Getting Started
5050
To get started you can:
5151

52-
- Visit the [Step by Step Tutorial](https://pytorch.org/executorch/main/index) to get things running locally and deploy a model to a device
53-
- Use this [Colab Notebook](https://pytorch.org/executorch/main/getting-started-setup#quick-setup-colab-jupyter-notebook-prototype) to start playing around right away
52+
- Visit the [Step by Step Tutorial](https://pytorch.org/executorch/stable/getting-started.html) to get things running locally and deploy a model to a device
53+
- Use this [Colab Notebook](https://colab.research.google.com/drive/1qpxrXC3YdJQzly3mRg-4ayYiOjC6rue3?usp=sharing) to start playing around right away
5454
- Jump straight into LLM use cases by following specific instructions for [Llama](examples/models/llama/README.md) and [Llava](examples/models/llava/README.md)
5555

5656
## Feedback and Engagement

backends/arm/quantizer/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@
1313

1414
# Used in tests
1515
from .arm_quantizer_utils import is_annotated # noqa
16+
17+
# Load quantized ops library.
18+
try:
19+
import executorch.extension.pybindings.portable_lib
20+
import executorch.kernels.quantized # noqa
21+
except:
22+
import logging
23+
24+
logging.info(
25+
"Failed to load portable_lib and quantized_aot_lib. To run quantized kernels AOT, either build "
26+
"Executorch with pybindings, or load your own custom built op library using torch.ops.load_library."
27+
)
28+
del logging

backends/arm/scripts/build_quantized_ops_aot_lib.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

backends/arm/scripts/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ VERBS="Add|Fix|Update|Refactor|Improve|Remove|Change|Implement|Create|Modify|"\
2727
"Handle|Ignore|Interpret|Instantiate|Invoke|Limit|Load|Modify|Permit|Print|"\
2828
"Profile|Recalculate|Reconstruct|Redefine|Redesign|Reevaluate|Relocate|Remap|"\
2929
"Render|Reposition|Request|Revert|Sanitize|Specify|Strengthen|Stub|Substitute|"\
30-
"Tag|Tweak|Unify|Unlock|Unset|Use|Validate|Verify"
30+
"Tag|Tweak|Unify|Unlock|Unset|Use|Validate|Verify|Rename"
3131

3232
# Remote branch
3333
REMOTE=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)

backends/arm/test/conftest.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55

66
import logging
77
import os
8-
import platform
98
import random
109
import shutil
11-
import subprocess
1210
import sys
1311
from typing import Any
1412

@@ -81,8 +79,7 @@ def try_addoption(*args, **kwargs):
8179

8280

8381
def pytest_sessionstart(session):
84-
if not session.config.option.collectonly:
85-
_load_libquantized_ops_aot_lib()
82+
pass
8683

8784

8885
def pytest_sessionfinish(session, exitstatus):
@@ -172,32 +169,3 @@ def get_option(option: str) -> Any | None:
172169
if option in pytest._test_options: # type: ignore[attr-defined]
173170
return pytest._test_options[option] # type: ignore[attr-defined]
174171
return None
175-
176-
177-
def _load_libquantized_ops_aot_lib():
178-
"""
179-
Find and load the libquantized_ops_aot_lib shared library.
180-
"""
181-
so_ext = {
182-
"Darwin": "dylib",
183-
"Linux": "so",
184-
"Windows": "dll",
185-
}.get(platform.system(), None)
186-
187-
find_lib_cmd = [
188-
"find",
189-
"cmake-out-aot-lib",
190-
"-name",
191-
f"libquantized_ops_aot_lib.{so_ext}",
192-
]
193-
194-
res = subprocess.run(find_lib_cmd, capture_output=True)
195-
if res.returncode == 0:
196-
library_path = res.stdout.decode().strip()
197-
import torch
198-
199-
torch.ops.load_library(library_path)
200-
else:
201-
raise RuntimeError(
202-
f"Did not find libquantized_ops_aot_lib.{so_ext} in cmake-out-aot-lib. Did you build it?"
203-
)

backends/arm/test/setup_testing.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ function build_semihosting_executorch_runner() {
5252
find ${build_test_dir} -name "arm_executor_runner"
5353
}
5454

55-
cd $et_root_dir && backends/arm/scripts/build_quantized_ops_aot_lib.sh
56-
5755
# Use most optimal system_configs for testing
5856
build_semihosting_executorch_runner corstone-300 Ethos_U55_High_End_Embedded
5957

0 commit comments

Comments
 (0)