Skip to content

Commit c1980f7

Browse files
committed
➕ dep-add(template): add support for newer version of CUDA
1 parent bb26aa1 commit c1980f7

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

copier.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,16 +298,19 @@ dl_pytorch_deps:
298298
PyTorch (CUDA 11.8): pytorch_cu118
299299
PyTorch (CUDA 12.1): pytorch_cu121
300300
PyTorch (CUDA 12.4): pytorch_cu124
301+
PyTorch (CUDA 12.6): pytorch_cu126
302+
PyTorch (CUDA 12.8): pytorch_cu128
303+
PyTorch (CUDA 12.9): pytorch_cu129
301304
torchvision: torchvision
302305
torchaudio: torchaudio
303306
tensorboard: tensorboard
304307
Lightning (PyTorch Lightning): lightning
305308
torchmetrics: torchmetrics
306309
validator: >-
307-
{% if 'pytorch_cpu' in dl_pytorch_deps and ('pytorch_cu124' in dl_pytorch_deps or 'pytorch_cu118' in dl_pytorch_deps) %}
310+
{% if 'pytorch_cpu' in dl_pytorch_deps and ('pytorch_cu129' in dl_pytorch_deps or 'pytorch_cu128' in dl_pytorch_deps or 'pytorch_cu126' in dl_pytorch_deps or 'pytorch_cu124' in dl_pytorch_deps or 'pytorch_cu121' in dl_pytorch_deps or 'pytorch_cu118' in dl_pytorch_deps) %}
308311
You must choose either a CPU or a GPU backend, not both
309-
{% elif 'pytorch_cu118' in dl_pytorch_deps and 'pytorch_cu124' in dl_pytorch_deps %}
310-
You must choose one version of CUDA not both
312+
{% elif 'pytorch_cu129' in dl_pytorch_deps and 'pytorch_cu128' in dl_pytorch_deps and 'pytorch_cu126' in dl_pytorch_deps and 'pytorch_cu124' in dl_pytorch_deps and 'pytorch_cu121' in dl_pytorch_deps and 'pytorch_cu118' in dl_pytorch_deps %}
313+
You must choose ONLY one version of CUDA not multiple
311314
{% endif %}
312315
default: []
313316

includes/pytorch_indexes.jinja

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% if 'pytorch_cpu' in dl_pytorch_deps or 'pytorch_cu118' in dl_pytorch_deps or 'pytorch_cu121' in dl_pytorch_deps or 'pytorch_cu124' in dl_pytorch_deps %}
1+
{% if 'pytorch_cpu' in dl_pytorch_deps or 'pytorch_cu129' in dl_pytorch_deps or 'pytorch_cu128' in dl_pytorch_deps or 'pytorch_cu126' in dl_pytorch_deps or 'pytorch_cu124' in dl_pytorch_deps or 'pytorch_cu121' in dl_pytorch_deps or 'pytorch_cu118' in dl_pytorch_deps %}
22
[tool.uv.sources]
33
torch = [
44
{%- if 'pytorch_cpu' in dl_pytorch_deps %}
@@ -9,6 +9,12 @@ torch = [
99
{ index = "pytorch-cu121"},
1010
{%- elif 'pytorch_cu124' in dl_pytorch_deps %}
1111
{ index = "pytorch-cu124"},
12+
{%- elif 'pytorch_cu126' in dl_pytorch_deps %}
13+
{ index = "pytorch-cu126"},
14+
{%- elif 'pytorch_cu128' in dl_pytorch_deps %}
15+
{ index = "pytorch-cu128"},
16+
{%- elif 'pytorch_cu129' in dl_pytorch_deps %}
17+
{ index = "pytorch-cu129"},
1218
{%- endif %}
1319
]
1420
{%- if 'torchvision' in dl_pytorch_deps %}
@@ -21,6 +27,12 @@ torchvision = [
2127
{ index = "pytorch-cu121"},
2228
{%- elif 'pytorch_cu124' in dl_pytorch_deps %}
2329
{ index = "pytorch-cu124"},
30+
{%- elif 'pytorch_cu126' in dl_pytorch_deps %}
31+
{ index = "pytorch-cu126"},
32+
{%- elif 'pytorch_cu128' in dl_pytorch_deps %}
33+
{ index = "pytorch-cu128"},
34+
{%- elif 'pytorch_cu129' in dl_pytorch_deps %}
35+
{ index = "pytorch-cu129"},
2436
{%- endif %}
2537
]
2638
{%- endif %}
@@ -34,6 +46,12 @@ torchaudio = [
3446
{ index = "pytorch-cu121"},
3547
{%- elif 'pytorch_cu124' in dl_pytorch_deps %}
3648
{ index = "pytorch-cu124"},
49+
{%- elif 'pytorch_cu126' in dl_pytorch_deps %}
50+
{ index = "pytorch-cu126"},
51+
{%- elif 'pytorch_cu128' in dl_pytorch_deps %}
52+
{ index = "pytorch-cu128"},
53+
{%- elif 'pytorch_cu129' in dl_pytorch_deps %}
54+
{ index = "pytorch-cu129"},
3755
{%- endif %}
3856
]
3957
{%- endif %}
@@ -51,6 +69,15 @@ url = "https://download.pytorch.org/whl/cu121"
5169
{%- elif 'pytorch_cu124' in dl_pytorch_deps %}
5270
name = "pytorch-cu124"
5371
url = "https://download.pytorch.org/whl/cu124"
72+
{%- elif 'pytorch_cu126' in dl_pytorch_deps %}
73+
name = "pytorch-cu126"
74+
url = "https://download.pytorch.org/whl/cu126"
75+
{%- elif 'pytorch_cu128' in dl_pytorch_deps %}
76+
name = "pytorch-cu128"
77+
url = "https://download.pytorch.org/whl/cu128"
78+
{%- elif 'pytorch_cu129' in dl_pytorch_deps %}
79+
name = "pytorch-cu129"
80+
url = "https://download.pytorch.org/whl/cu129"
5481
{%- endif %}
5582
explicit = true
5683
{%- endif %}

0 commit comments

Comments
 (0)