-
Notifications
You must be signed in to change notification settings - Fork 229
126 lines (118 loc) · 4.27 KB
/
build_legion.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
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
name: "build"
on:
pull_request:
paths:
- "include/**"
- "cmake/**"
- "config/**"
- "deps/**"
- "python/**"
- "src/**"
- ".github/workflows/helpers/install_dependencies.sh"
- ".github/workflows/build.yml"
push:
branches:
- "master"
paths:
- "include/**"
- "cmake/**"
- "config/**"
- "deps/**"
- "python/**"
- "src/**"
- ".github/workflows/helpers/install_dependencies.sh"
- ".github/workflows/build.yml"
workflow_dispatch:
concurrency:
group: build-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
prebuild-legion:
name: Prebuild Legion with CMake
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0} # required to use an activated conda environment
strategy:
matrix:
gpu_backend: ["cuda", "hip_rocm"]
cuda_version: ["11.1", "11.2", "11.3", "11.5", "11.6", "11.7", "11.8"]
python_version: ["3.8", "3.9", "3.10", "3.11", "latest"]
# The CUDA version doesn't matter when building for hip_rocm, so we just pick one arbitrarily (11.8) to avoid building for hip_rocm once per number of CUDA version supported
exclude:
- gpu_backend: "hip_rocm"
cuda_version: "11.1"
- gpu_backend: "hip_rocm"
cuda_version: "11.2"
- gpu_backend: "hip_rocm"
cuda_version: "11.3"
- gpu_backend: "hip_rocm"
cuda_version: "11.5"
- gpu_backend: "hip_rocm"
cuda_version: "11.6"
- gpu_backend: "hip_rocm"
cuda_version: "11.7"
fail-fast: false
steps:
- name: Checkout Git Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Free additional space on runner
run: .github/workflows/helpers/free_space_on_runner.sh
- name: Install CUDA
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: "11.8.0"
# Disable caching of the CUDA binaries, since it does not give us any significant performance improvement
use-github-cache: "false"
- name: Install system dependencies
run: FF_GPU_BACKEND=${{ matrix.gpu_backend }} .github/workflows/helpers/install_dependencies.sh
- name: Install conda and FlexFlow dependencies
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: flexflow
environment-file: conda/environment.yml
auto-activate-base: false
- name: Build Legion
env:
FF_GPU_BACKEND: ${{ matrix.gpu_backend }}
run: |
bash launch_prebuilding.sh
- name: Archive compiled Legion library (CUDA)
env:
FF_GPU_BACKEND: ${{ matrix.gpu_backend }}
uses: actions/upload-artifact@v3
with:
name: legion_ubuntu-20.04_${{ matrix.gpu_backend }}
path: build/export/legion_ubuntu-20.04-${{ matrix.cuda_version }}-${{ matrix.gpu_backend }}-${{ matrix.python_version }}.tar.gz #how to incororate the cuda version + how to deal with python version
create-release:
name: Create new release
runs-on: ubuntu-20.04
needs: prebuild-legion
steps:
- name: Checkout Git Repository
uses: actions/checkout@v3
- name: Free additional space on runner
run: .github/workflows/helpers/free_space_on_runner.sh
- name: Create folder for artifacts
run: mkdir artifacts unwrapped_artifacts
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: ./artifacts
- name: Display structure of downloaded files
working-directory: ./artifacts
run: ls -R
- name: Unwrap all artifacts
working-directory: ./artifacts
run: find . -maxdepth 2 -mindepth 2 -type f -name "*.tar.gz" -exec mv {} ../unwrapped_artifacts/ \;
- name: Get datetime
run: echo "RELEASE_DATETIME=$(date '+%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV
- name: Release
env:
NAME: ${{ env.RELEASE_DATETIME }}
TAG_NAME: ${{ env.RELEASE_DATETIME }}
GITHUB_TOKEN: ${{ secrets.FLEXFLOW_TOKEN }}
run: gh release create $TAG_NAME ./unwrapped_artifacts/*.tar.gz --repo flexflow/flexflow-third-party