forked from ROCm/rocm-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (153 loc) · 6.29 KB
/
Copy pathcomponent-ci-miopen.yml
File metadata and controls
171 lines (153 loc) · 6.29 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# TheRock CI builds and tests MIOpen in a single configuration (HIP backend,
# optional CK, against TheRock's full ROCm stack). This workflow covers the
# additional build configurations that MIOpen must support but TheRock CI does
# not exercise: the HIPNOGPU backend (used for offline kernel tuning without
# GPU hardware), the Tuna Fin subproject (offline tuning infrastructure), a
# no-CK UBSan debug build, and gtest binary naming convention validation.
name: "Component CI: MIOpen"
on:
workflow_call:
permissions:
contents: read
env:
LLVM_PATH: /opt/rocm/llvm
jobs:
miopen-build:
name: ${{ matrix.name }}
container:
image: rocm/miopen-dev:latest
options: -v /runner/config:/home/awsconfig/
strategy:
fail-fast: false
matrix:
include:
- name: MIOpen Hip Debug NOCK Build-Only
job_id: no-ck-build
cmake_extra_flags: >-
-DCMAKE_BUILD_TYPE=debug
-DCMAKE_CXX_FLAGS_DEBUG='-g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=undefined -Wno-option-ignored '
-DBUILD_DEV=OFF
-DMIOPEN_USE_MLIR=OFF
-DMIOPEN_GPU_SYNC=OFF
-DMIOPEN_USE_COMPOSABLEKERNEL=OFF
-DCMAKE_INSTALL_PREFIX=$(pwd)/projects/miopen/install
-DCMAKE_PREFIX_PATH=/opt/rocm
-DGPU_TARGETS="gfx942"
build_target: --target install
# Builds the HIP package and runs miopen_gtest_check via rocjitsu KMD interposer
# to validate the gtest binary and test naming conventions without a physical GPU.
- name: MIOpen Build Hip Package
job_id: hip-package-build
cmake_extra_flags: >-
-DCMAKE_BUILD_TYPE=release
-DBUILD_DEV=OFF
-DMIOPEN_TEST_DISCRETE=OFF
-DMIOPEN_USE_MLIR=ON
-DMIOPEN_GPU_SYNC=OFF
-DCMAKE_PREFIX_PATH=/opt/rocm
-DGPU_TARGETS="gfx942"
build_target: --target miopen_gtest --target package
- name: MIOpen HipNoGPU Debug Build-Only
job_id: no-gpu-debug-build
cmake_extra_flags: >-
-DCMAKE_BUILD_TYPE=debug
-DCMAKE_CXX_FLAGS_DEBUG='-g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize-recover=undefined -Wno-option-ignored '
-DBUILD_DEV=ON
-DMIOPEN_USE_MLIR=OFF
-DMIOPEN_GPU_SYNC=OFF
-DMIOPEN_BACKEND=HIPNOGPU
-DMIOPEN_INSTALL_CXX_HEADERS=ON
-DCMAKE_PREFIX_PATH=/opt/rocm
build_target: ""
- name: MIOpen Tuna Fin Build-Only
job_id: tuna-fin-build
cmake_extra_flags: >-
-DCMAKE_BUILD_TYPE=release
-DBUILD_DEV=OFF
-DMIOPEN_INSTALL_CXX_HEADERS=ON
-DCMAKE_INSTALL_PREFIX=$(pwd)/projects/miopen/install
-DMIOPEN_USE_MLIR=ON
-DMIOPEN_GPU_SYNC=OFF
-DMIOPEN_BACKEND=HIPNOGPU
-DCMAKE_PREFIX_PATH=/opt/rocm
-DGPU_TARGETS="gfx942"
build_target: --target install --target all
runs-on: azure-linux-scale-rocm
steps:
- name: Runner health status
run: |
echo "=== OS ==="
head -2 /etc/os-release
echo "=== CPU ==="
lscpu | grep -E 'Model name|^CPU\(s\)'
echo "=== Memory ==="
free -h | grep Mem
echo "=== Disk ==="
df -h /
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
sparse-checkout: |
.dvc
.github
cmake
projects/miopen
shared/ctest
- name: Pull DVC files for rocm-libraries # LOGNAME details here https://github.com/ROCm/rocm-libraries/pull/1617
run: |
if command -v dvc &> /dev/null; then
echo "dvc detected"
else
echo "Warning, dvc not detected!"
fi
LOGNAME=github-runner dvc pull -v
- name: Checkout rocjitsu
if: matrix.job_id == 'hip-package-build'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ROCm/rocm-systems
ref: 481982dfe23e181a302006747c561e7cf43e35ba # 2026-06-04
path: rocm-systems
sparse-checkout: |
emulation/rocjitsu
- name: Build rocjitsu KMD
if: matrix.job_id == 'hip-package-build'
run: |
apt-get update && apt-get install -y libdrm-dev
cmake -S rocm-systems/emulation/rocjitsu -B rocjitsu-build \
-DCMAKE_BUILD_TYPE=Release
cmake --build rocjitsu-build --target rocjitsu_kmd_shim -j$(nproc)
- name: Configure build
run: |
export PATH=/opt/rocm/bin:/opt/rocm/llvm/bin:$PATH
export CXX=/opt/rocm/llvm/bin/clang++
export CXXFLAGS=-Werror
rm -rf projects/miopen/install
mkdir projects/miopen/install
cmake -S projects/miopen -B build \
-DMIOPEN_TEST_FLAGS=' --disable-verification-cache ' \
${{ matrix.cmake_extra_flags }}
- name: Build
run: cmake --build build ${{ matrix.build_target }} -j$(nproc)
- name: Configure Tuna Fin
if: matrix.job_id == 'tuna-fin-build'
run: |
export CXX=/opt/rocm/llvm/bin/clang++
cmake -S projects/miopen/fin -B build-fin \
-DCMAKE_PREFIX_PATH=$(pwd)/projects/miopen/install \
-DCMAKE_INSTALL_PREFIX=$(pwd)/projects/miopen/install \
-DCMAKE_BUILD_TYPE=release
- name: Build Tuna Fin
if: matrix.job_id == 'tuna-fin-build'
run: cmake --build build-fin --target install -j$(nproc)
- name: Run miopen_gtest_check (rocjitsu)
if: matrix.job_id == 'hip-package-build'
run: |
export RJ_CONFIG=$(pwd)/rocm-systems/emulation/rocjitsu/configs/amdgpu_cdna3_kmd.json
LD_PRELOAD=$(pwd)/rocjitsu-build/lib/rocjitsu/src/rocjitsu/kmd/librocjitsu_kmd.so \
./build/bin/miopen_gtest --gtest_list_tests > test_list
python3 projects/miopen/test/gtest/check_names.py --list test_list