Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pytorch binary for macos-arm64 workflow #1215

Merged
merged 1 commit into from
Aug 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
# Provisioned Jobs:
# ubuntu - x86_64 - llvm in-tree - pytorch binary - build+test # most used dev flow and fastest signal
# ubuntu - x86_64 - llvm out-of-tree - pytorch source - build+test # most elaborate build
# macos - arm64 - llvm in-tree - pytorch source - build only # cross compile, can't test arm64
# macos - arm64 - llvm in-tree - pytorch binary - build only # cross compile, can't test arm64


jobs:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
with:
cache-suffix: ubuntu-x86_64-${{ matrix.llvm-build }}-${{ matrix.torch-binary }}

- name: Configure llvm-build='in-tree' torch-binary='${{ matrix.torch-binary}}'
- name: Configure llvm-build='in-tree' torch-binary='${{ matrix.torch-binary }}'
# Fastest build, most used dev flow
if: matrix.llvm-build == 'in-tree'
run: |
Expand All @@ -64,7 +64,7 @@ jobs:
-DPython3_EXECUTABLE="$(which python)" \
$GITHUB_WORKSPACE/externals/llvm-project/llvm

- name: Configure llvm-build='out-of-tree' torch-binary='${{ matrix.torch-binary}}'
- name: Configure llvm-build='out-of-tree' torch-binary='${{ matrix.torch-binary }}'
# Most elaborate build, but cached
# A cache invalidation occurs when the committed LLVM version is changed.
if: matrix.llvm-build == 'out-of-tree'
Expand All @@ -91,12 +91,11 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_LINKER=lld \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/llvm/" \
-DMLIR_DIR="$GITHUB_WORKSPACE/llvm-build/lib/cmake/mlir/" \
-DMLIR_ENABLE_BINDINGS_PYTHON=OFF \
-DTORCH_MLIR_ENABLE_MHLO=ON \
-DTORCH_MLIR_USE_INSTALLED_PYTORCH=${{ matrix.torch-binary }} \
-DTORCH_MLIR_USE_INSTALLED_PYTORCH="${{ matrix.torch-binary }}" \
-DTORCH_MLIR_ENABLE_LTC=OFF \
-DPython3_EXECUTABLE="$(which python)" \
$GITHUB_WORKSPACE
Expand All @@ -107,7 +106,6 @@ jobs:

- name: Run torch-mlir unit tests
run: |
export PYTHONPATH="$GITHUB_WORKSPACE/build/tools/torch-mlir/python_packages/torch_mlir"
cmake --build build --target check-torch-mlir-all

- name: Run refbackend e2e integration tests
Expand Down Expand Up @@ -144,9 +142,9 @@ jobs:
llvm-build: [in-tree, out-of-tree]
torch-binary: [ON, OFF]
exclude:
# Exclude llvm in-tree and pytorch binary
# Exclude llvm in-tree and pytorch source
- llvm-build: in-tree
torch-binary: ON
torch-binary: OFF
# Exclude llvm out-of-tree altogether
- llvm-build: out-of-tree

Expand All @@ -161,7 +159,7 @@ jobs:
with:
cache-suffix: macos-arm64-${{ matrix.llvm-build }}-${{ matrix.torch-binary }}

- name: Configure llvm-build='in-tree' torch-binary='${{ matrix.torch-binary}}'
- name: Configure llvm-build='in-tree' torch-binary='${{ matrix.torch-binary }}'
# libzstd on GH Runners are only x86_64 to remove them.
run: |
cmake -GNinja -Bbuild_arm64 \
Expand Down