Add converter for index.Tensor_hacked_twin (#98) #518
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# Also available under a BSD-style license. See LICENSE. | |
name: Bazel Build and Test (mlir-tcp) | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# Ensure that only a single job or workflow using the same | |
# concurrency group will run at a time. This would cancel | |
# any in-progress jobs in the same github workflow and github | |
# ref (e.g. refs/heads/main or refs/pull/<pr_number>/merge). | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ubuntu-build: | |
name: ubuntu-x86_64 / mlir-tcp | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout mlir-tcp | |
uses: actions/checkout@v4 | |
- name: Setup workspace | |
uses: ./.github/actions/setup-build | |
with: | |
cache-prefix: 'mlir-tcp' | |
- name: Build docker image | |
run: | | |
docker build -f docker/Dockerfile \ | |
-t mlir-tcp:ci \ | |
--build-arg GROUP=$(id -gn) \ | |
--build-arg GID=$(id -g) \ | |
--build-arg USER=$(id -un) \ | |
--build-arg UID=$(id -u) \ | |
. | |
- name: Verify clang-format was run (cpp lint) | |
run: | | |
docker run --rm \ | |
-v "$(pwd)":"/opt/src/mlir-tcp" \ | |
-v "${HOME}/.cache/bazel":"${HOME}/.cache/bazel" \ | |
mlir-tcp:ci \ | |
find . -type f -name "*.cpp" -o -name "*.h" | xargs clang-format -i | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Please run 'find . -type f -name "*.cpp" -o -name "*.h" | xargs clang-format -i' and commit changes." | |
exit 1 | |
fi | |
- name: Verify black was run (py lint) | |
run: | | |
docker run --rm \ | |
-v "$(pwd)":"/opt/src/mlir-tcp" \ | |
-v "${HOME}/.cache/bazel":"${HOME}/.cache/bazel" \ | |
mlir-tcp:ci \ | |
black . | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Please run 'black .' and commit changes." | |
exit 1 | |
fi | |
- name: Verify buildifier was run (bazel lint) | |
run: | | |
docker run --rm \ | |
-v "$(pwd)":"/opt/src/mlir-tcp" \ | |
-v "${HOME}/.cache/bazel":"${HOME}/.cache/bazel" \ | |
mlir-tcp:ci \ | |
bazel run //tools/buildifier:buildifier | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Please 'bazel run //tools/buildifier:buildifier' and commit changes." | |
exit 1 | |
fi | |
- name: Bazel build mlir-tcp | |
run: | | |
docker run --rm \ | |
-v "$(pwd)":"/opt/src/mlir-tcp" \ | |
-v "${HOME}/.cache/bazel":"${HOME}/.cache/bazel" \ | |
mlir-tcp:ci \ | |
bazel build //:tcp-opt | |
- name: Bazel test mlir-tcp (lit tests, aot compile tests) | |
run: | | |
docker run --rm \ | |
-v "$(pwd)":"/opt/src/mlir-tcp" \ | |
-v "${HOME}/.cache/bazel":"${HOME}/.cache/bazel" \ | |
mlir-tcp:ci \ | |
bazel test --test_output=errors //... |