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 288f70e
Showing
5 changed files
with
165 additions
and
29 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
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,73 @@ | ||
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 | ||
|
||
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.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 }} | ||
artifact_tag: ${{ github.run_id }} | ||
|
||
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
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