Skip to content
Closed
Show file tree
Hide file tree
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
37 changes: 19 additions & 18 deletions .github/actions/build-wheel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ runs:
path: ai-ml-sdk-model-converter
ref: ${{ inputs.model-converter-ref }}

- name: Restore LLVM build cache
id: cache-llvm-restore
uses: actions/cache/restore@v4
with:
path: |
llvm-project/build/bin/mlir-translate
llvm-project/build/tools/mlir/python_packages/mlir_core
key: ${{ inputs.runner }}-${{ inputs.arch }}-python-${{ inputs.python-version }}-llvm-${{ inputs.llvm-ref }}-model-converter-${{ inputs.model-converter-ref }}
# - name: Restore LLVM build cache
# id: cache-llvm-restore
# uses: actions/cache/restore@v4
# with:
# path: |
# llvm-project/build/bin/mlir-translate
# llvm-project/build/tools/mlir/python_packages/mlir_core
# key: ${{ inputs.runner }}-${{ inputs.arch }}-python-${{ inputs.python-version }}-llvm-${{ inputs.llvm-ref }}-model-converter-${{ inputs.model-converter-ref }}

- name: Checkout LLVM repo
if: ${{ steps.cache-llvm-restore.outputs.cache-hit != 'true' }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -110,7 +111,7 @@ runs:
-DLLVM_ENABLE_TERMINFO=OFF \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DPython3_EXECUTABLE=$(which python)
cmake --build . --target check-mlir
cmake --build . --target mlir-translate --target MLIRPythonModules --parallel $(nproc)
deactivate

- name: Strip mlir-translate
Expand All @@ -128,15 +129,15 @@ runs:
python scripts/replace_symlinks_in_llvm_python_package.py $GITHUB_WORKSPACE/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir --yes
rm $GITHUB_WORKSPACE/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonCAPI.so

- name: Save LLVM build cache
if: ${{ steps.cache-llvm-restore.outputs.cache-hit != 'true' }}
id: cache-llvm-save
uses: actions/cache/save@v4
with:
path: |
llvm-project/build/bin/mlir-translate
llvm-project/build/tools/mlir/python_packages/mlir_core
key: ${{ steps.cache-llvm-restore.outputs.cache-primary-key }}
# - name: Save LLVM build cache
# if: ${{ steps.cache-llvm-restore.outputs.cache-hit != 'true' }}
# id: cache-llvm-save
# uses: actions/cache/save@v4
# with:
# path: |
# llvm-project/build/bin/mlir-translate
# llvm-project/build/tools/mlir/python_packages/mlir_core
# key: ${{ steps.cache-llvm-restore.outputs.cache-primary-key }}

- name: Add mlir-translate to PATH
shell: bash
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -43,30 +43,30 @@ jobs:
me-repo-access-app-id: ${{ env.ME_REPO_ACCESS_APP_ID }}
me-repo-access-private-key: ${{ env.ME_REPO_ACCESS_PRIVATE_KEY }}

build-arm64:
if: ${{ !github.event.repository.private }}
name: Build (arm64)
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/build-wheel
with:
runner: ubuntu-22.04-arm
python-version: ${{ matrix.python-version }}
platform: manylinux_2_35_aarch64
arch: arm64
llvm-ref: ${{ env.LLVM_REF }}
flatbuffers-ref: ${{ env.FLATBUFFERS_REF }}
argparse-ref: ${{ env.ARGPARSE_REF }}
json-ref: ${{ env.JSON_REF }}
vgf-lib-ref: ${{ env.VGF_LIB_REF }}
model-converter-ref: ${{ env.MODEL_CONVERTER_REF }}
me-repo-access-app-id: ${{ env.ME_REPO_ACCESS_APP_ID }}
me-repo-access-private-key: ${{ env.ME_REPO_ACCESS_PRIVATE_KEY }}
# build-arm64:
# if: ${{ !github.event.repository.private }}
# name: Build (arm64)
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.10", "3.11", "3.12"]
# runs-on: ubuntu-22.04-arm
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# - uses: ./.github/actions/build-wheel
# with:
# runner: ubuntu-22.04-arm
# python-version: ${{ matrix.python-version }}
# platform: manylinux_2_35_aarch64
# arch: arm64
# llvm-ref: ${{ env.LLVM_REF }}
# flatbuffers-ref: ${{ env.FLATBUFFERS_REF }}
# argparse-ref: ${{ env.ARGPARSE_REF }}
# json-ref: ${{ env.JSON_REF }}
# vgf-lib-ref: ${{ env.VGF_LIB_REF }}
# model-converter-ref: ${{ env.MODEL_CONVERTER_REF }}
# me-repo-access-app-id: ${{ env.ME_REPO_ACCESS_APP_ID }}
# me-repo-access-private-key: ${{ env.ME_REPO_ACCESS_PRIVATE_KEY }}

release:
name: Release
Expand Down