forked from facebookresearch/xformers
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
367274c
commit 58867f1
Showing
3 changed files
with
137 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
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.11'] | ||
include = [] | ||
for os in ['ubuntu-alola']: | ||
for python in PY_VERSIONS: | ||
for torch_version in ['2.4.0']: | ||
for toolkit_type, toolkit_short_versions in {'rocm': ["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 }} | ||
|
||
clean: | ||
runs-on: self-hosted | ||
if: ${{ always() }} | ||
needs: [build] | ||
steps: | ||
- name: Remove dangling Docker images | ||
run: | | ||
docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters