blob: 339c8a9cf8e71563012cb2ae0db9e684e24a21d5 [file]
# Copyright 2024 The IREE Authors
#
# 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: CI - Linux x64 clang
on:
workflow_call:
workflow_dispatch:
jobs:
linux_x64_clang:
runs-on: azure-linux-scale
container:
# Ubuntu 24.04 supplies Mesa with RDNA4 support.
image: ubuntu:24.04@sha256:a4453623f2f8319cfff65c43da9be80fe83b1a7ce689579b475867d69495b782
defaults:
run:
shell: bash
env:
BUILD_DIR: build
CC: clang
CXX: clang++
SCCACHE_AZURE_CONNECTION_STRING: "${{ secrets.AZURE_CCACHE_CONNECTION_STRING }}"
SCCACHE_AZURE_BLOB_CONTAINER: ccache-container
SCCACHE_CACHE_ZSTD_LEVEL: 10
SCCACHE_AZURE_KEY_PREFIX: "ci_linux_x64_clang"
steps:
- name: Install build and Vulkan dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential ca-certificates clang clang-tools lld cmake ninja-build \
python3-dev python3-venv git curl libssl-dev libzstd-dev zlib1g-dev \
pkg-config ccache sccache mesa-vulkan-drivers libvulkan1 libdrm-amdgpu1 \
vulkan-validationlayers
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' mesa-vulkan-drivers)" ge 25.0.7
dpkg-query -W mesa-vulkan-drivers libvulkan1 libdrm-amdgpu1 \
vulkan-validationlayers
- name: Checking out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
- name: Install Python requirements and TheRock SDK
run: |
sdk_venv="${BUILD_DIR}/rocjitsu/therock-venv"
python3 -m venv "${sdk_venv}"
"${sdk_venv}/bin/python" -m pip install \
-r ./runtime/bindings/python/iree/runtime/build_requirements.txt \
-r ./build_tools/github_actions/ci_requirements.txt
"${sdk_venv}/bin/python" -m pip install --pre \
--index-url https://nightly.repo.amd.com/rocm/whl-next/ \
"rocm[libraries,devel]==10.2.0a20261006"
"${sdk_venv}/bin/rocm-sdk" init
"${sdk_venv}/bin/rocm-sdk" version
realpath "${sdk_venv}/bin" >> "${GITHUB_PATH}"
rocm_root="$("${sdk_venv}/bin/rocm-sdk" path --root)"
{
echo "ROCM_ROOT=${rocm_root}"
echo "ROCJITSU_BIN=${rocm_root}/bin/mirage"
} >> "${GITHUB_ENV}"
- name: Build IREE
id: build_iree
run: |
source ./build_tools/cmake/setup_sccache.sh
./build_tools/cmake/build_all.sh "${BUILD_DIR}"
env:
# Build the first rocjitsu target's test deps along with everything else.
IREE_ROCM_TEST_TARGET_CHIP: gfx942
- name: Run CTest
run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"
env:
CTEST_PARALLEL_LEVEL: 32
- name: Run ROCm e2e tests under rocjitsu
if: ${{ !cancelled() && steps.build_iree.outcome == 'success' }}
timeout-minutes: 120
run: |
./build_tools/cmake/test_rocm_targets_with_rocjitsu.sh \
"${BUILD_DIR}" gfx942 gfx950 gfx1100 gfx1151 gfx1201 gfx1250
env:
IREE_ROCJITSU_RUN_ID: ci
CTEST_PARALLEL_LEVEL: 8
- name: Run Vulkan e2e and HAL CTS tests under rocjitsu
if: ${{ !cancelled() && steps.build_iree.outcome == 'success' }}
timeout-minutes: 60
run: |
./build_tools/cmake/test_vulkan_targets_with_rocjitsu.sh \
"${BUILD_DIR}" gfx1100 gfx1201
env:
IREE_ROCJITSU_RUN_ID: ci
CTEST_PARALLEL_LEVEL: 8
- name: Upload rocjitsu test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: rocjitsu-linux-x64-clang
path: ${{ env.BUILD_DIR }}/rocjitsu/logs/ci/
if-no-files-found: ignore
# Alerting on failure is the responsibility of the calling job.