forked from facebookresearch/xformers
-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (62 loc) · 1.99 KB
/
rocm_wheels.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
name: rocm-wheels
on:
push:
branches:
- develop
pull_request:
paths:
- "packaging/compute_wheel_version.sh"
- ".github/workflows/wheel*"
- ".github/actions/setup-windows-runner/action.yml"
- "setup.py"
- "requirements*.txt"
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
default: 'warning'
jobs:
target_determinator:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
shell: python
run: |
import os
import json
environ = os.environ
PY_VERSIONS = ['3.9', '3.10', '3.11', '3.12']
include = []
for os in ['8-core-ubuntu']:
for python in PY_VERSIONS:
for torch_version in ['2.4.0']:
for toolkit_type, toolkit_short_versions in {'rocm': ["6.0", "6.1"]}.items():
for toolkit_short_version in toolkit_short_versions:
include.append(dict(
os=os,
python=python,
torch_version=torch_version,
toolkit_type=toolkit_type,
toolkit_short_version=toolkit_short_version,
))
print(include[-1])
matrix = {'include': include}
print(json.dumps(matrix))
with open(environ["GITHUB_OUTPUT"], "a") as fd:
fd.write("matrix="+json.dumps(matrix))
build:
needs: target_determinator
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.target_determinator.outputs.matrix) }}
uses: ./.github/workflows/wheels_build.yml
if: github.repository == 'rocm/xformers' || github.event_name == 'pull_request'
with:
os: ${{ matrix.os }}
python: ${{ matrix.python }}
torch_version: ${{ matrix.torch_version }}
toolkit_type: ${{ matrix.toolkit_type }}
toolkit_short_version: ${{ matrix.toolkit_short_version }}