Skip to content

IREE Runtime Template #10

IREE Runtime Template

IREE Runtime Template #10

Workflow file for this run

# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: IREE Runtime Template
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build_linux:
name: Build and Test (Linux)
runs-on: ubuntu-20.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake clang ninja-build
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install IREE compiler
run: |
python -m pip install iree-compiler
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize submodules
run : |
git \
-c submodule."third_party/llvm-project".update=none \
-c submodule."third_party/stablehlo".update=none \
-c submodule."third_party/torch-mlir".update=none \
submodule update --init --recursive
- name: Build sample
run: |
cmake -B build/ -G Ninja \
-DCMAKE_C_COMPILER=clang-10 \
-DCMAKE_CXX_COMPILER=clang++-10
cmake --build build/ --target hello_world
- name: Compile sample module
run: |
iree-compile \
--iree-hal-target-backends=llvm-cpu \
simple_mul.mlir \
-o build/simple_mul.vmfb
- name: Test execution
run: |
./build/hello_world local-sync build/simple_mul.vmfb
# TODO(scotttodd): fold into build matrix with build_linux
# TODO(scotttodd): test multiple compilers
build_windows:
name: Build and Test (Windows)
runs-on: windows-2022
defaults:
run:
shell: bash
steps:
# - name: Install dependencies
# run: |
# sudo apt update
# sudo apt install cmake clang ninja-build
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: "Configuring MSVC"
uses: ilammy/[email protected]
- name: Install IREE compiler
run: |
python -m pip install iree-compiler
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize submodules
run : |
git \
-c submodule."third_party/llvm-project".update=none \
-c submodule."third_party/stablehlo".update=none \
-c submodule."third_party/torch-mlir".update=none \
submodule update --init --recursive
- name: Build sample
run: |
cmake -B build/ -G Ninja
cmake --build build/ --target hello_world
- name: Compile sample module
run: |
iree-compile \
--iree-hal-target-backends=llvm-cpu \
simple_mul.mlir \
-o build/simple_mul.vmfb
- name: Test execution
run: |
./build/hello_world local-sync build/simple_mul.vmfb