-
Notifications
You must be signed in to change notification settings - Fork 35
97 lines (91 loc) · 3.41 KB
/
test_iree.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright 2024 Advanced Micro Devices, Inc.
#
# 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 Test Suite
on:
pull_request:
paths:
# This file itself.
- ".github/workflows/test_iree.yml"
# The iree_tests subproject.
- "iree_tests/**"
workflow_dispatch:
schedule:
# Runs at 3:00 PM UTC, which is 8:00 AM PST
- cron: "0 15 * * *"
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit). The workflow name is prepended to avoid conflicts between
# different workflows.
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
models:
name: "Models :: ${{ matrix.name }} :: ${{ matrix.runs-on }}"
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- name: cpu_llvm_task
runs-on: nodai-amdgpu-mi250-x86-64
models-config-file: models_cpu_llvm_task.json
- name: gpu_mi250_rocm
runs-on: nodai-amdgpu-mi250-x86-64
models-config-file: models_gpu_rocm_gfx90a.json
env:
VENV_DIR: ${{ github.workspace }}/.venv
ROCM_CHIP: gfx90a
IREE_TEST_FILES: /groups/aig_sharks/iree-tests-cache-nod
IREE_TEST_PATH_EXTENSION: ${{ github.workspace }}/iree_tests/specs
MODELS_CONFIG_FILE_PATH: iree_tests/configs/${{ matrix.models-config-file }}
TEST_SUITE_REPO_ROOT: ${{ github.workspace }}
steps:
- name: "Checking out repository"
uses: actions/checkout@v4
with:
submodules: false
lfs: true
# Install Python packages.
# Note: skipping actions/setup-python since these self-hosted runners already have Python.
- name: "Setup Python venv"
run: python3 -m venv ${VENV_DIR}
- name: "Installing IREE nightly release Python packages"
run: |
source ${VENV_DIR}/bin/activate
python3 -m pip install \
--find-links https://iree.dev/pip-release-links.html \
--upgrade \
--pre \
iree-base-compiler \
iree-base-runtime
- name: "Installing Python test requirements"
run: |
source ${VENV_DIR}/bin/activate
python3 -m pip install -r iree_tests/requirements.txt
pip install --no-compile --pre --upgrade -e common_tools
# Download remote files.
- name: "Downloading remote files for real weight model tests"
run: |
source ${VENV_DIR}/bin/activate
python3 iree_tests/download_remote_files.py --root-dir iree_tests/pytorch/models
python3 iree_tests/download_remote_files.py --root-dir iree_tests/sharktank
- name: "Running real weight model tests"
if: "matrix.models-config-file != '' && !cancelled()"
run: |
source ${VENV_DIR}/bin/activate
pytest \
iree_tests/pytorch/models \
iree_tests/sharktank \
-n 4 \
-rA \
-k real_weights \
--no-skip-tests-missing-files \
--capture=no \
--log-cli-level=info \
--timeout=1200 \
--durations=0 \
--config-files=${MODELS_CONFIG_FILE_PATH}