mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Move pt_operator_library to pt_ops.bzl and make it shared with OSS BUCK build This will replace D36912042. I will update all load statements in future diffs. Test Plan: sandcaslte, OSS CI Differential Revision: D37390060 Pull Request resolved: https://github.com/pytorch/pytorch/pull/80170 Approved by: https://github.com/JacobSzwejbka
100 lines
2.5 KiB
YAML
100 lines
2.5 KiB
YAML
name: buck
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -e -l {0}
|
|
|
|
jobs:
|
|
buck-build-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout PyTorch
|
|
uses: pytorch/pytorch/.github/actions/checkout-pytorch@master
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '8'
|
|
distribution: 'temurin'
|
|
|
|
- name: Setup miniconda
|
|
uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
auto-update-conda: true
|
|
python-version: 3.8
|
|
activate-environment: build
|
|
|
|
- name: Install dependencies
|
|
uses: nick-fields/retry@71062288b76e2b6214ebde0e673ce0de1755740a
|
|
with:
|
|
timeout_minutes: 10
|
|
max_attempts: 5
|
|
command: |
|
|
conda install -y \
|
|
cffi \
|
|
cmake \
|
|
mkl \
|
|
mkl-include \
|
|
ninja \
|
|
numpy \
|
|
pyyaml \
|
|
requests \
|
|
setuptools \
|
|
typing_extensions
|
|
|
|
- name: Install Buck
|
|
uses: nick-fields/retry@71062288b76e2b6214ebde0e673ce0de1755740a
|
|
with:
|
|
timeout_minutes: 10
|
|
max_attempts: 5
|
|
command: |
|
|
wget https://github.com/facebook/buck/releases/download/v2021.01.12.01/buck.2021.01.12.01_all.deb
|
|
sudo apt install ./buck.2021.01.12.01_all.deb
|
|
|
|
- name: Download third party libraries and generate wrappers
|
|
uses: nick-fields/retry@71062288b76e2b6214ebde0e673ce0de1755740a
|
|
with:
|
|
timeout_minutes: 10
|
|
max_attempts: 5
|
|
command: |
|
|
sh scripts/buck_setup.sh
|
|
|
|
- name: Build C10
|
|
run: |
|
|
buck build c10:c10
|
|
|
|
- name: Build XNNPACK
|
|
run: |
|
|
buck build third_party:XNNPACK
|
|
|
|
- name: Build QNNPACK
|
|
run: |
|
|
buck build aten/src/ATen/native/quantized/cpu/qnnpack:pytorch_qnnpack
|
|
|
|
- name: Build aten_cpu
|
|
run: |
|
|
buck build :aten_cpu
|
|
|
|
- name: Build torch_mobile_core
|
|
run: |
|
|
buck build :torch_mobile_core
|
|
|
|
- name: Build pt_ops_full
|
|
run: |
|
|
buck build :pt_ops_full
|
|
|
|
- name: Build mobile benchmark
|
|
run: |
|
|
buck build :ptmobile_benchmark
|
|
|
|
- name: Run lite interpreter model
|
|
run: |
|
|
buck run :ptmobile_benchmark -- --model=ios/TestApp/models/mobilenet_v2.ptl --input_dims=1,3,224,224 --input_type=float
|
|
|
|
- name: Build everything
|
|
run: |
|
|
buck build //... --keep-going
|