Skip to content

Commit 56da94e

Browse files
author
pytorchbot
committed
2024-09-18 nightly release (1e4c316)
1 parent ff58e3a commit 56da94e

File tree

94 files changed

+1511
-625
lines changed

Some content is hidden

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

94 files changed

+1511
-625
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
00e3eea170ce5db8ea9c62ce5e48f13886cd6d20
1+
aec9b2ab77389967ef39bb9c10662fd0fe3e185a

.github/workflows/trunk.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ jobs:
223223
strategy:
224224
matrix:
225225
dtype: [fp32]
226-
build-tool: [buck2, cmake]
227226
mode: [portable, xnnpack+kv+custom, mps, coreml]
228227
fail-fast: false
229228
with:
@@ -235,25 +234,12 @@ jobs:
235234
script: |
236235
237236
DTYPE=${{ matrix.dtype }}
238-
BUILD_TOOL=${{ matrix.build-tool }}
239237
MODE=${{ matrix.mode }}
240238
241-
if [[ "${BUILD_TOOL}" == "buck2" ]]; then
242-
# TODO: Will add more modes that don't support buck2
243-
if [[ "${MODE}" == "mps" ]]; then
244-
echo "mps doesn't support buck2."
245-
exit 0
246-
fi
247-
if [[ "${MODE}" == "coreml" ]]; then
248-
echo "coreml doesn't support buck2."
249-
exit 0
250-
fi
251-
fi
252-
253239
bash .ci/scripts/setup-conda.sh
254240
255241
# Setup executorch
256-
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh "${BUILD_TOOL}"
242+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh cmake
257243
258244
if [[ "${MODE}" == "mps" ]]; then
259245
# Install mps delegate
@@ -268,7 +254,7 @@ jobs:
268254
# Install requirements for export_llama
269255
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash examples/models/llama2/install_requirements.sh
270256
# Test llama2
271-
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_llama.sh stories110M "${BUILD_TOOL}" "${DTYPE}" "${MODE}"
257+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_llama.sh stories110M cmake "${DTYPE}" "${MODE}"
272258
273259
# # TODO(jackzhxng): Runner consistently runs out of memory before test finishes. Try to find a more powerful runner.
274260
# test-llava-runner-macos:
@@ -406,6 +392,10 @@ jobs:
406392
echo "::endgroup::"
407393
408394
echo "::group::Set up HuggingFace Dependencies"
395+
if [ -z "$SECRET_EXECUTORCH_HF_TOKEN" ]; then
396+
echo "::error::SECRET_EXECUTORCH_HF_TOKEN is empty. For security reason secrets won't be accessible on forked PRs. Please make sure you submit a non-forked PR."
397+
exit 1
398+
fi
409399
pip install -U "huggingface_hub[cli]"
410400
huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
411401
pip install accelerate sentencepiece

backends/apple/coreml/scripts/install_requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ rm -rf "$COREML_DIR_PATH/third-party"
2424
mkdir "$COREML_DIR_PATH/third-party"
2525

2626
echo "${green}ExecuTorch: Cloning coremltools."
27-
git clone --depth 1 --branch 8.0b2 "https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH
27+
git clone --depth 1 --branch 8.0 "https://github.com/apple/coremltools.git" $COREMLTOOLS_DIR_PATH
2828
cd $COREMLTOOLS_DIR_PATH
2929

3030
STATUS=$?

backends/arm/test/models/test_mobilenet_v2_arm.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_mv2_tosa_BI(self):
8484
)
8585

8686
def test_mv2_u55_BI(self):
87-
(
87+
tester = (
8888
ArmTester(
8989
self.mv2,
9090
example_inputs=self.model_inputs,
@@ -96,4 +96,9 @@ def test_mv2_u55_BI(self):
9696
.check(list(self.operators_after_quantization))
9797
.partition()
9898
.to_executorch()
99+
.serialize()
99100
)
101+
if common.is_option_enabled("corstone300"):
102+
tester.run_method_and_compare_outputs(
103+
atol=1.0, qtol=1, inputs=self.model_inputs
104+
)

backends/cadence/aot/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def get_ops_count(graph_module: torch.fx.GraphModule) -> Dict[str, int]:
104104
):
105105
continue
106106
# If the op is already present, increment the count
107-
if get_edge_overload_packet(node.target).__name__ in freq:
108-
freq[get_edge_overload_packet(node.target).__name__] += 1
107+
if node.target._name in freq:
108+
freq[node.target._name] += 1
109109
# else, add a new entry
110110
else:
111-
freq[get_edge_overload_packet(node.target).__name__] = 1
111+
freq[node.target._name] = 1
112112
return freq
113113

114114

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
load("targets.bzl", "define_common_targets")
2+
3+
oncall("odai_jarvis")
4+
5+
define_common_targets()

backends/cadence/hifi/kernels/kernels.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
* LICENSE file in the root directory of this source tree.
77
*/
88

9-
#include <executorch/backends/cadence/reference/kernels/kernels.h>
10-
#include "xa_nnlib_common.h"
11-
#include "xa_nnlib_common_macros.h"
9+
#include <executorch/backends/cadence/hifi/kernels/kernels.h>
10+
#include <xa_nnlib_common.h>
11+
#include <xa_nnlib_common_macros.h>
1212

1313
namespace impl {
1414
namespace HiFi {

backends/cadence/hifi/kernels/kernels.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@
88

99
#pragma once
1010

11-
#include "inttypes.h"
12-
#include "stddef.h"
13-
#include "xa_type_def.h"
14-
15-
/* For NNLIB APIs */
16-
#include "xa_nnlib_kernels_api.h"
11+
#include <inttypes.h>
12+
#include <stddef.h>
13+
#include <xa_type_def.h>
1714

1815
namespace impl {
1916
namespace HiFi {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
load("@fbsource//tools/build_defs:platform_defs.bzl", "CXX")
2+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
3+
4+
def define_common_targets():
5+
runtime.cxx_library(
6+
name = "kernels",
7+
srcs = ["kernels.cpp"],
8+
exported_headers = [
9+
"kernels.h",
10+
],
11+
visibility = [
12+
"//executorch/backends/cadence/...",
13+
],
14+
exported_deps = [
15+
"fbsource//third-party/nnlib-hifi4/xa_nnlib:libxa_nnlib_common",
16+
],
17+
platforms = CXX,
18+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
load("targets.bzl", "define_common_targets")
2+
3+
oncall("odai_jarvis")
4+
5+
define_common_targets()

0 commit comments

Comments
 (0)