Skip to content

Commit 33397cb

Browse files
add support for newer pip and CUDA computation versions (#151)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 19e77b7 commit 33397cb

16 files changed

+73
-48
lines changed

.github/actions/setup-dev-env/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: "Setup development environment"
33

44
inputs:
55
python-version:
6-
default: "3.7"
6+
default: "3.9"
77

88
runs:
99
using: composite

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/" # Location of package manifests
5+
schedule:
6+
interval: "weekly"

.github/workflows/check-pytorch-package-indices.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- .github/workflows/check-available-pytorch-dists.yml
88
- scripts/check_pytorch_package_indices.py
99

10+
workflow_dispatch:
11+
1012
schedule:
1113
- cron: "20 4 * * *"
1214

@@ -16,7 +18,7 @@ jobs:
1618

1719
steps:
1820
- name: Checkout repository
19-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2022
with:
2123
fetch-depth: 0
2224

.github/workflows/install.yml

+15-10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: install
33
on:
44
pull_request:
55

6+
workflow_dispatch:
7+
68
jobs:
79
channel:
810
strategy:
@@ -12,10 +14,10 @@ jobs:
1214
- windows-latest
1315
- macos-latest
1416
python-version:
15-
- "3.8"
1617
- "3.9"
1718
- "3.10"
1819
- "3.11"
20+
- "3.12"
1921
pytorch-channel:
2022
- stable
2123
- test
@@ -26,7 +28,7 @@ jobs:
2628

2729
steps:
2830
- name: Checkout repository
29-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
3032
with:
3133
fetch-depth: 0
3234

@@ -65,29 +67,32 @@ jobs:
6567
- windows-latest
6668
- macos-latest
6769
python-version:
68-
- "3.8"
6970
- "3.9"
7071
- "3.10"
7172
- "3.11"
73+
- "3.12"
7274
pytorch-computation-backend:
7375
- cpu
74-
- cu117
7576
- cu118
77+
- cu121
78+
- cu124
7679
exclude:
77-
- os: macos-latest
78-
pytorch-computation-backend: cu117
7980
- os: macos-latest
8081
pytorch-computation-backend: cu118
82+
- os: macos-latest
83+
pytorch-computation-backend: cu121
84+
- os: macos-latest
85+
pytorch-computation-backend: cu124
8186
# TODO: find a way to test this
8287
# - os: ubuntu-latest
83-
# pytorch-computation-backend: rocm5.4.2
88+
# pytorch-computation-backend: rocm6.2
8489
fail-fast: false
8590

8691
runs-on: ${{ matrix.os }}
8792

8893
steps:
8994
- name: Checkout repository
90-
uses: actions/checkout@v3
95+
uses: actions/checkout@v4
9196
with:
9297
fetch-depth: 0
9398

@@ -102,7 +107,7 @@ jobs:
102107
- name: Install torch
103108
run:
104109
ltt install --pytorch-computation-backend=${{
105-
matrix.pytorch-computation-backend }} torch==2.0.0
110+
matrix.pytorch-computation-backend }} torch==2.5.1
106111

107112
- name: Check computation backend
108113
shell: python
@@ -140,7 +145,7 @@ jobs:
140145

141146
steps:
142147
- name: Checkout repository
143-
uses: actions/checkout@v3
148+
uses: actions/checkout@v4
144149
with:
145150
fetch-depth: 0
146151

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414

1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020

2121
- name: Setup development environment
2222
uses: ./.github/actions/setup-dev-env
2323

2424
- name: Restore pre-commit cache
25-
uses: actions/cache@v2
25+
uses: actions/cache@v4
2626
with:
2727
path: ~/.cache/pre-commit
2828
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/linux-nightly-install.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- .github/issue-templates/linux-nightly-uninstallable.md
77
- .github/workflows/linux-nightly-install.yml
88

9+
workflow_dispatch:
10+
911
schedule:
1012
- cron: "40 4 * * *"
1113

@@ -14,17 +16,17 @@ jobs:
1416
strategy:
1517
matrix:
1618
python-version:
17-
- "3.8"
1819
- "3.9"
1920
- "3.10"
2021
- "3.11"
22+
- "3.12"
2123
max-parallel: 1
2224

2325
runs-on: ubuntu-latest
2426

2527
steps:
2628
- name: Checkout repository
27-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
2830
with:
2931
fetch-depth: 0
3032

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

.github/workflows/publishable.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ on:
2020
- "README.rst"
2121
- "requirements-dev.txt"
2222

23+
workflow_dispatch:
24+
2325
jobs:
2426
pypi:
2527
runs-on: ubuntu-latest
2628

2729
steps:
2830
- name: Checkout repository
29-
uses: actions/checkout@v3
31+
uses: actions/checkout@v4
3032
with:
3133
fetch-depth: 0
3234

.github/workflows/tests-pip-latest.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- .github/issue-templates/pip-latest-success.md
88
- .github/workflows/tests-pip-latest.yml
99

10+
workflow_dispatch:
11+
1012
schedule:
1113
- cron: "0 4 * * *"
1214

@@ -23,7 +25,7 @@ jobs:
2325

2426
steps:
2527
- name: Checkout repository
26-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2729
with:
2830
fetch-depth: 0
2931

.github/workflows/tests.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ on:
1919
- "pytest.ini"
2020
- "requirements-dev.txt"
2121

22+
workflow_dispatch:
23+
2224
schedule:
2325
- cron: "0 4 * * *"
2426

@@ -31,10 +33,10 @@ jobs:
3133
- windows-latest
3234
- macos-latest
3335
python-version:
34-
- "3.7"
35-
- "3.8"
3636
- "3.9"
3737
- "3.10"
38+
- "3.11"
39+
- "3.12"
3840

3941
runs-on: ${{ matrix.os }}
4042
env:
@@ -43,7 +45,7 @@ jobs:
4345

4446
steps:
4547
- name: Checkout repository
46-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4749
with:
4850
fetch-depth: 0
4951

@@ -56,7 +58,7 @@ jobs:
5658
run: doit test
5759

5860
- name: Upload coverage
59-
uses: codecov/codecov-action@v3
61+
uses: codecov/codecov-action@v5
6062
with:
6163
flags: unit
6264
env_vars: OS,PYTHON_VERSION

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.1.0
3+
rev: v5.0.0
44
hooks:
55
- id: trailing-whitespace
66
- id: mixed-line-ending
@@ -9,7 +9,7 @@ repos:
99
- id: end-of-file-fixer
1010

1111
- repo: https://github.com/pre-commit/mirrors-prettier
12-
rev: v2.5.1
12+
rev: v3.1.0
1313
hooks:
1414
- id: prettier
1515
types_or:
@@ -18,9 +18,9 @@ repos:
1818
- yaml
1919

2020
- repo: https://github.com/omnilib/ufmt
21-
rev: v1.3.2
21+
rev: v2.8.0
2222
hooks:
2323
- id: ufmt
2424
additional_dependencies:
25-
- black == 22.1.0
26-
- usort == 1.0.2
25+
- black == 24.10.0
26+
- usort == 1.0.8

light_the_torch/_cb.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ def _detect_nvidia_driver_version() -> Optional[Version]:
151151
"Linux": {
152152
# Table 2 from
153153
# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
154+
Version("12.6"): Version("525.60.13"),
155+
Version("12.5"): Version("525.60.13"),
156+
Version("12.4"): Version("525.60.13"),
157+
Version("12.3"): Version("525.60.13"),
158+
Version("12.2"): Version("525.60.13"),
159+
Version("12.1"): Version("525.60.13"),
154160
Version("12.0"): Version("525.60.13"),
155161
# Table 2 from
156162
# https://docs.nvidia.com/cuda/archive/11.8.0/cuda-toolkit-release-notes/index.html
@@ -176,7 +182,13 @@ def _detect_nvidia_driver_version() -> Optional[Version]:
176182
"Windows": {
177183
# Table 2 from
178184
# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
179-
Version("12.0"): Version("527.41"),
185+
Version("12.6"): Version("528.33"),
186+
Version("12.5"): Version("528.33"),
187+
Version("12.4"): Version("528.33"),
188+
Version("12.3"): Version("528.33"),
189+
Version("12.2"): Version("528.33"),
190+
Version("12.1"): Version("528.33"),
191+
Version("12.0"): Version("528.33"),
180192
# Table 2 from
181193
# https://docs.nvidia.com/cuda/archive/11.8.0/cuda-toolkit-release-notes/index.html
182194
Version("11.8"): Version("452.39"),

light_the_torch/_compat.py

-8
This file was deleted.

light_the_torch/_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import contextlib
22
import functools
33
import importlib
4+
5+
import importlib.metadata as importlib_metadata
46
import inspect
57
import itertools
68

79
from unittest import mock
810

911
from pip._vendor.packaging.requirements import Requirement
1012

11-
from ._compat import importlib_metadata
12-
1313

1414
class UnexpectedInternalError(Exception):
1515
def __init__(self, msg) -> None:

pyproject.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,16 @@ classifiers = [
2626
"Environment :: GPU :: NVIDIA CUDA",
2727
"Intended Audience :: Developers",
2828
"License :: OSI Approved :: BSD License",
29-
"Programming Language :: Python :: 3.7",
30-
"Programming Language :: Python :: 3.8",
3129
"Programming Language :: Python :: 3.9",
3230
"Programming Language :: Python :: 3.10",
3331
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
3433
"Topic :: System :: Installation/Setup",
3534
"Topic :: Utilities",
3635
]
37-
requires-python = ">= 3.7"
36+
requires-python = ">= 3.9"
3837
dependencies = [
39-
"pip >=22.3, <23.3",
40-
"importlib_metadata ; python_version < '3.8'",
38+
"pip >=22.3, <24.4",
4139
]
4240
dynamic = ["version"]
4341

@@ -66,7 +64,7 @@ local_scheme = "node-and-timestamp"
6664
# https://github.com/psf/black#configuration-format
6765

6866
line-length = 88
69-
target-version = ['py37']
67+
target-version = ['py39']
7068
exclude = '''
7169
/(
7270
\.git

scripts/collect_env.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,11 @@ def detect_pytorch_or_dependent_packages():
8383
name in PYTORCH_DISTRIBUTIONS
8484
for name in itertools.chain(
8585
[dist.name],
86-
[Requirement(req_str).name for req_str in dist.requires]
87-
if dist.requires
88-
else [],
86+
(
87+
[Requirement(req_str).name for req_str in dist.requires]
88+
if dist.requires
89+
else []
90+
),
8991
)
9092
)
9193
}

0 commit comments

Comments
 (0)