Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tenpercent committed Aug 19, 2024
1 parent 6f5d560 commit ac7a7e8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/rocm_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ on:
jobs:
build:
runs-on: self-hosted
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
if: github.repository == 'rocm/xformers' || github.event_name == 'pull_request'
container:
image: 'rocm/pytorch-nightly:latest'
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/rocm_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ 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:
Expand All @@ -24,8 +31,8 @@ jobs:
include = []
for os in ['ubuntu-alola']:
for python in TORCH_VERSIONS:
for torch_version in ['2.4.0']:
for python in PY_VERSIONS:
for torch_version in TORCH_VERSIONS:
for toolkit_type, toolkit_short_versions in {'rocm': ["6.0", "6.1"]}.items():
for toolkit_short_version in toolkit_short_versions:
include.append(dict(
Expand All @@ -43,6 +50,9 @@ jobs:
build:
needs: target_determinator
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.target_determinator.outputs.matrix) }}
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,8 @@ def get_extensions():
"--ptxas-options=-O2",
"--ptxas-options=-allow-expensive-optimizations=true",
]
elif (
(torch.cuda.is_available() and torch.version.hip) or
(os.getenv("FORCE_ROCM", "0") == "1")
elif (torch.cuda.is_available() and torch.version.hip) or (
os.getenv("FORCE_ROCM", "0") == "1"
):
disable_hd256_hip_fmha = os.getenv("DISABLE_HD256_HIP_FMHA", "0")
if disable_hd256_hip_fmha == "1":
Expand Down
9 changes: 6 additions & 3 deletions tests/test_mem_eff_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@
if torch.cuda.is_available():
compute_capability = torch.cuda.get_device_capability("cuda")
sm70_or_better_only = pytest.mark.skipif(
torch.version.cuda is not None and compute_capability < (7, 0), reason="requires sm70+"
torch.version.cuda is not None and compute_capability < (7, 0),
reason="requires sm70+",
)
sm75_or_better_only = pytest.mark.skipif(
torch.version.cuda is not None and compute_capability < (7, 5), reason="requires sm75+"
torch.version.cuda is not None and compute_capability < (7, 5),
reason="requires sm75+",
)
sm80_or_better_only = pytest.mark.skipif(
torch.version.cuda is not None and compute_capability < (8, 0), reason="requires sm80+"
torch.version.cuda is not None and compute_capability < (8, 0),
reason="requires sm80+",
)
skip_if_rocm = pytest.mark.skipif(
torch.version.hip is not None, reason="not supported on ROCm"
Expand Down

0 comments on commit ac7a7e8

Please sign in to comment.