File tree Expand file tree Collapse file tree 4 files changed +100
-12
lines changed Expand file tree Collapse file tree 4 files changed +100
-12
lines changed Original file line number Diff line number Diff line change 1
1
mpmath==1.3.0
2
+ numpy==1.25.2
2
3
PyYAML==6.0.1
3
4
ruamel.yaml==0.17.32
4
5
sympy==1.12
6
+ zstd==1.5.5.1
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ # All rights reserved.
4
+ #
5
+ # This source code is licensed under the BSD-style license found in the
6
+ # LICENSE file in the root directory of this source tree.
7
+
8
+ set -ex
9
+
10
+ install_buck () {
11
+ if ! command -v zstd & > /dev/null; then
12
+ brew install zstd
13
+ fi
14
+
15
+ if ! command -v wget & > /dev/null; then
16
+ brew install wget
17
+ fi
18
+
19
+ if ! command -v buck2 & > /dev/null; then
20
+ wget -q https://github.com/facebook/buck2/releases/download/2023-07-18/buck2-x86_64-apple-darwin.zst
21
+ zstd -d buck2-x86_64-apple-darwin.zst -o buck2
22
+
23
+ chmod +x buck2
24
+ mv buck2 /opt/homebrew/bin
25
+
26
+ rm buck2-x86_64-apple-darwin.zst
27
+ fi
28
+ }
29
+
30
+ install_conda () {
31
+ pushd .ci/docker
32
+ # Install conda dependencies like flatbuffer
33
+ const install --file conda-env-ci.txt
34
+ popd
35
+ }
36
+
37
+ install_pip_dependencies () {
38
+ pushd .ci/docker
39
+ # Install all Python dependencies, including PyTorch
40
+ pip install --progress-bar off -r requirements-ci.txt
41
+
42
+ TORCH_VERSION=2.1.0.dev20230731
43
+ pip install --progress-bar off --pre torch==" ${TORCH_VERSION} " --index-url https://download.pytorch.org/whl/nightly/cpu
44
+ popd
45
+ }
46
+
47
+ install_buck
48
+ install_conda
49
+ install_pip_dependencies
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ # All rights reserved.
4
+ #
5
+ # This source code is licensed under the BSD-style license found in the
6
+ # LICENSE file in the root directory of this source tree.
7
+
8
+ set -ex
9
+
10
+ install_executorch () {
11
+ # Install executorch, this assumes that Executorch is checked out in the
12
+ # current directory
13
+ pip3 install .
14
+ # Just print out the list of packages for debugging
15
+ pip3 list
16
+ }
17
+
18
+ build_and_test_executorch () {
19
+ # Build executorch runtime
20
+ buck2 build //examples/executor_runner:executor_runner
21
+ # Export a test model
22
+ python3 -m examples.export.export_example --model_name=" linear"
23
+ # Run test model
24
+ buck2 run //examples/executor_runner:executor_runner -- --model_path ./linear.ff
25
+ }
26
+
27
+ install_executorch
28
+ build_and_test_executorch
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ concurrency:
12
12
cancel-in-progress : true
13
13
14
14
jobs :
15
- buck-build-test :
16
- name : buck-build-test
15
+ buck-build-test-linux :
16
+ name : buck-build-test-linux
17
17
uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
18
18
with :
19
19
runner : linux.2xlarge
@@ -27,14 +27,23 @@ jobs:
27
27
# here, as it's there in the container
28
28
export PATH="/opt/conda/envs/py_${PYTHON_VERSION}/bin:${PATH}"
29
29
30
- # Install executorch
31
- pip3 install .
32
- # Just print out the list of packages for debugging
33
- pip3 list
30
+ # Build and test Executorch
31
+ bash .ci/scripts/test.sh
34
32
35
- # Build executorch runtime
36
- buck2 build //examples/executor_runner:executor_runner
37
- # Export a test model
38
- python3 -m examples.export.export_example --model_name="linear"
39
- # Run test model
40
- buck2 run //examples/executor_runner:executor_runner -- --model_path ./linear.ff
33
+ buck-build-test-macos :
34
+ name : buck-build-test-macos
35
+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
36
+ with :
37
+ runner : macos-m1-12
38
+ submodules : ' true'
39
+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
40
+ script : |
41
+ WORKSPACE=$(pwd)
42
+
43
+ pushd "${WORKSPACE}/pytorch/executorch"
44
+ # Setup MacOS dependencies as there is no Docker support on MacOS atm
45
+ bash .ci/scripts/setup-macos.sh
46
+
47
+ # Build and test Executorch
48
+ bash .ci/scripts/test.sh
49
+ popd
You can’t perform that action at this time.
0 commit comments