Skip to content

Commit fb44ee4

Browse files
authored
Add PyTorch 2.9/2.10 and cu130 support (#10634)
1 parent b783d59 commit fb44ee4

File tree

8 files changed

+55
-69
lines changed

8 files changed

+55
-69
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
default: '3.10'
77
torch-version:
88
required: false
9-
default: '2.8.0'
9+
default: '2.10.0'
1010
cuda-version:
1111
required: false
1212
default: cpu

.github/workflows/testing.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ jobs:
6464
test-matrix: |
6565
{ include: [
6666
{ "os": "ubuntu-22.04", "python-version": "3.10", "torch-version": "nightly", "cuda-version": "cpu" },
67+
{ "os": "ubuntu-22.04", "python-version": "3.10", "torch-version": "2.10.0", "cuda-version": "cpu" },
68+
{ "os": "ubuntu-22.04", "python-version": "3.10", "torch-version": "2.9.0", "cuda-version": "cpu" },
6769
{ "os": "ubuntu-22.04", "python-version": "3.10", "torch-version": "2.8.0", "cuda-version": "cpu" },
68-
{ "os": "ubuntu-22.04", "python-version": "3.10", "torch-version": "2.7.0", "cuda-version": "cpu" },
69-
{ "os": "ubuntu-22.04", "python-version": "3.10", "torch-version": "2.6.0", "cuda-version": "cpu" },
70-
{ "os": "macos-14", "python-version": "3.10", "torch-version": "2.8.0", "cuda-version": "cpu" },
71-
{ "os": "windows-2022", "python-version": "3.10", "torch-version": "2.8.0", "cuda-version": "cpu" }
70+
{ "os": "macos-14", "python-version": "3.10", "torch-version": "2.10.0", "cuda-version": "cpu" },
71+
{ "os": "windows-2022", "python-version": "3.10", "torch-version": "2.10.0", "cuda-version": "cpu" }
7272
]}
7373
7474
pytest-full:
@@ -80,7 +80,7 @@ jobs:
8080
{
8181
"os": ["ubuntu-22.04", "macos-14", "windows-2022"],
8282
"python-version": ["3.10"],
83-
"torch-version": ["2.6.0", "2.7.0", "2.8.0", "nightly"],
83+
"torch-version": ["2.8.0", "2.9.0", "2.10.0", "nightly"],
8484
"cuda-version": ["cpu"],
8585
"full-test": "1"
8686
}

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ These approaches have been implemented in PyG, and can benefit from the above GN
341341

342342
## Installation
343343

344-
PyG is available for Python 3.10 to Python 3.13.
344+
PyG is available for Python 3.10 to Python 3.14.
345345

346346
From **PyG 2.3** onwards, you can install and use PyG **without any external library** required except for PyTorch.
347347
For this, simply run
@@ -366,55 +366,55 @@ We recommend to start with a minimal installation, and install additional depend
366366

367367
For ease of installation of these extensions, we provide `pip` wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).
368368

369-
#### PyTorch 2.8
369+
#### PyTorch 2.10
370370

371-
To install the binaries for PyTorch 2.8.0, simply run
371+
To install the binaries for PyTorch 2.10, simply run
372372

373373
```
374-
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.8.0+${CUDA}.html
374+
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.10.0+${CUDA}.html
375375
```
376376

377-
where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu129` depending on your PyTorch installation.
377+
where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation.
378378

379-
| | `cpu` | `cu126` | `cu128` | `cu129` |
379+
| | `cpu` | `cu126` | `cu128` | `cu130` |
380380
| ----------- | ----- | ------- | ------- | ------- |
381381
| **Linux** |||||
382382
| **Windows** |||||
383383
| **macOS** || | | |
384384

385-
#### PyTorch 2.7
385+
#### PyTorch 2.9
386386

387-
To install the binaries for PyTorch 2.7.0, simply run
387+
To install the binaries for PyTorch 2.9, simply run
388388

389389
```
390-
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.7.0+${CUDA}.html
390+
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.9.0+${CUDA}.html
391391
```
392392

393-
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu126`, or `cu128` depending on your PyTorch installation.
393+
where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation.
394394

395395
| | `cpu` | `cu118` | `cu126` | `cu128` |
396396
| ----------- | ----- | ------- | ------- | ------- |
397397
| **Linux** |||||
398398
| **Windows** |||||
399399
| **macOS** || | | |
400400

401-
#### PyTorch 2.6
401+
#### PyTorch 2.8
402402

403-
To install the binaries for PyTorch 2.6.0, simply run
403+
To install the binaries for PyTorch 2.8, simply run
404404

405405
```
406-
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.6.0+${CUDA}.html
406+
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.8.0+${CUDA}.html
407407
```
408408

409-
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu124`, or `cu126` depending on your PyTorch installation.
409+
where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu129` depending on your PyTorch installation.
410410

411-
| | `cpu` | `cu118` | `cu124` | `cu126` |
411+
| | `cpu` | `cu126` | `cu128` | `cu129` |
412412
| ----------- | ----- | ------- | ------- | ------- |
413413
| **Linux** |||||
414414
| **Windows** |||||
415415
| **macOS** || | | |
416416

417-
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, PyTorch 2.2.0/2.2.1/2.2.2, PyTorch 2.3.0/2.3.1, PyTorch 2.4.0/2.4.1, and PyTorch 2.5.0/2.5.1 (following the same procedure).
417+
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, PyTorch 2.2.0/2.2.1/2.2.2, PyTorch 2.3.0/2.3.1, PyTorch 2.4.0/2.4.1, PyTorch 2.5.0/2.5.1, PyTorch 2.6.0, and PyTorch 2.7.0/2.7.1 (following the same procedure).
418418
**For older versions, you might need to explicitly specify the latest supported version number** or install via `pip install --no-index` in order to prevent a manual installation from source.
419419
You can look up the latest supported version number [here](https://data.pyg.org/whl).
420420

docs/source/install/installation.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Installation
22
============
33

4-
:pyg:`PyG` is available for :python:`Python 3.10` to :python:`Python 3.13`.
4+
:pyg:`PyG` is available for :python:`Python 3.10` to :python:`Python 3.14`.
55

66
.. note::
77
We do not recommend installation as a root user on your system :python:`Python`.
@@ -48,14 +48,14 @@ For ease of installation of these extensions, we provide :obj:`pip` wheels for t
4848
.. code-block:: none
4949
5050
python -c "import torch; print(torch.__version__)"
51-
>>> 2.6.0
51+
>>> 2.10.0
5252
5353
#. Find the CUDA version :pytorch:`PyTorch` was installed with:
5454

5555
.. code-block:: none
5656
5757
python -c "import torch; print(torch.version.cuda)"
58-
>>> 12.6
58+
>>> 12.8
5959
6060
#. Install the relevant packages:
6161

@@ -65,6 +65,8 @@ For ease of installation of these extensions, we provide :obj:`pip` wheels for t
6565
6666
where :obj:`${TORCH}` and :obj:`${CUDA}` should be replaced by the specific :pytorch:`PyTorch` and CUDA versions, respectively:
6767

68+
* :pytorch:`PyTorch` 2.10.*: :obj:`${TORCH}=2.10.0` and :obj:`${CUDA}=cpu|cu126|cu128|cu130`
69+
* :pytorch:`PyTorch` 2.9.*: :obj:`${TORCH}=2.9.0` and :obj:`${CUDA}=cpu|cu126|cu128|cu130`
6870
* :pytorch:`PyTorch` 2.8.*: :obj:`${TORCH}=2.8.0` and :obj:`${CUDA}=cpu|cu126|cu128|cu129`
6971
* :pytorch:`PyTorch` 2.7.*: :obj:`${TORCH}=2.7.0` and :obj:`${CUDA}=cpu|cu118|cu126|cu128`
7072
* :pytorch:`PyTorch` 2.6.*: :obj:`${TORCH}=2.6.0` and :obj:`${CUDA}=cpu|cu118|cu124|cu126`
@@ -76,19 +78,19 @@ For ease of installation of these extensions, we provide :obj:`pip` wheels for t
7678
* :pytorch:`PyTorch` 2.0.*: :obj:`${TORCH}=2.0.0` and :obj:`${CUDA}=cpu|cu117|cu118`
7779
* :pytorch:`PyTorch` 1.13.*: :obj:`${TORCH}=1.13.0` and :obj:`${CUDA}=cpu|cu116|cu117`
7880

79-
For example, for :pytorch:`PyTorch` 2.8.* and CUDA 12.9, type:
81+
For example, for :pytorch:`PyTorch` 2.10.* and CUDA 13.0, type:
8082

8183
.. code-block:: none
8284
83-
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.8.0+cu129.html
85+
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.10.0+cu130.html
8486
85-
For example, for :pytorch:`PyTorch` 2.6.* and CUDA 12.6, type:
87+
For example, for :pytorch:`PyTorch` 2.9.* and CUDA 12.8, type:
8688

8789
.. code-block:: none
8890
89-
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.6.0+cu126.html
91+
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.9.0+cu128.html
9092
91-
**Note:** Binaries of older versions are also provided for :pytorch:`PyTorch` 1.4.0, 1.5.0, 1.6.0, 1.7.0/1.7.1, 1.8.0/1.8.1, 1.9.0, 1.10.0/1.10.1/1.10.2, 1.11.0, 1.12.0/1.12.1, 1.13.0/1.13.1, 2.0.0/2.0.1, 2.1.0/2.1.1/2.1.2, 2.2.0/2.2.1/2.2.2, 2.3.0/2.3.1, 2.4.0/2.4.1, and 2.5.0/2.5.1 (following the same procedure).
93+
**Note:** Binaries of older versions are also provided for :pytorch:`PyTorch` 1.4.0, 1.5.0, 1.6.0, 1.7.0/1.7.1, 1.8.0/1.8.1, 1.9.0, 1.10.0/1.10.1/1.10.2, 1.11.0, 1.12.0/1.12.1, 1.13.0/1.13.1, 2.0.0/2.0.1, 2.1.0/2.1.1/2.1.2, 2.2.0/2.2.1/2.2.2, 2.3.0/2.3.1, 2.4.0/2.4.1, 2.5.0/2.5.1, 2.6.0, and 2.7.0/2.7.1 (following the same procedure).
9294
**For older versions, you need to explicitly specify the latest supported version number** or install via :obj:`pip install --no-index` in order to prevent a manual installation from source.
9395
You can look up the latest supported version number `here <https://data.pyg.org/whl>`__.
9496

docs/source/install/quick-start.html

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575

7676
<script>
7777
var torchList = [
78+
['torch-2.10.0', 'PyTorch 2.10.*'],
79+
['torch-2.9.0', 'PyTorch 2.9.*'],
7880
['torch-2.8.0', 'PyTorch 2.8.*'],
79-
['torch-2.7.0', 'PyTorch 2.7.*'],
80-
['torch-2.6.0', 'PyTorch 2.6.*'],
8181
];
8282

8383
var osList = [
@@ -92,12 +92,10 @@
9292
];
9393

9494
var cudaList = [
95-
['cu118', '11.8'],
96-
['cu121', '12.1'],
97-
['cu124', '12.4'],
9895
['cu126', '12.6'],
9996
['cu128', '12.8'],
10097
['cu129', '12.9'],
98+
['cu130', '13.0'],
10199
['cpu', 'CPU'],
102100
];
103101

@@ -116,32 +114,16 @@
116114
$("#command pre").text('# macOS binaries do not support CUDA');
117115
}
118116

119-
else if (torch == "torch-2.6.0" && cuda == "cu121") {
120-
$("#command pre").text('# PyTorch version does not support CUDA 12.1');
117+
else if (torch == "torch-2.8.0" && cuda == "cu130") {
118+
$("#command pre").text('# PyTorch version does not support CUDA 13.0');
121119
}
122120

123-
else if (torch == "torch-2.6.0" && cuda == "cu128") {
124-
$("#command pre").text('# PyTorch version does not support CUDA 12.8');
121+
else if (torch == "torch-2.9.0" && cuda == "cu129") {
122+
$("#command pre").text('# PyTorch version does not support CUDA 12.9');
125123
}
126124

127-
else if (torch == "torch-2.7.0" && cuda == "cu121") {
128-
$("#command pre").text('# PyTorch version does not support CUDA 12.1');
129-
}
130-
131-
else if (torch == "torch-2.7.0" && cuda == "cu124") {
132-
$("#command pre").text('# PyTorch version does not support CUDA 12.4');
133-
}
134-
135-
else if (torch == "torch-2.8.0" && cuda == "cu118") {
136-
$("#command pre").text('# PyTorch version does not support CUDA 11.8');
137-
}
138-
139-
else if (torch == "torch-2.8.0" && cuda == "cu121") {
140-
$("#command pre").text('# PyTorch version does not support CUDA 11.8');
141-
}
142-
143-
else if (torch == "torch-2.8.0" && cuda == "cu124") {
144-
$("#command pre").text('# PyTorch version does not support CUDA 12.4');
125+
else if (torch == "torch-2.10.0" && cuda == "cu129") {
126+
$("#command pre").text('# PyTorch version does not support CUDA 12.9');
145127
}
146128

147129
else if (package == "conda") {

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ classifiers=[
2727
"Programming Language :: Python :: 3.11",
2828
"Programming Language :: Python :: 3.12",
2929
"Programming Language :: Python :: 3.13",
30+
"Programming Language :: Python :: 3.14",
3031
"Programming Language :: Python :: 3 :: Only",
3132
]
3233
dependencies=[

test/nn/test_model_summary.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,19 @@ def test_summary_with_to_hetero_model():
198198

199199
expected = """
200200
+---------------------------+---------------------+----------------+----------+
201-
| Layer | Input Shape | Output Shape | #Param |
201+
| Layer | Input Shape | Output Shape | #Param |
202202
|---------------------------+---------------------+----------------+----------|
203-
| GraphModule | | | 5,824 |
204-
| ├─(lin1)ModuleDict | -- | -- | 544 |
205-
| │ └─(p)Linear | [100, 16] | [100, 16] | 272 |
206-
| │ └─(a)Linear | [100, 16] | [100, 16] | 272 |
207-
| ├─(conv1)ModuleDict | -- | -- | 3,168 |
208-
| │ └─(p__to__p)SAGEConv | [100, 16], [2, 200] | [100, 32] | 1,056 |
209-
| │ └─(p__to__a)SAGEConv | [2, 200] | [100, 32] | 1,056 |
210-
| │ └─(a__to__p)SAGEConv | [2, 200] | [100, 32] | 1,056 |
211-
| ├─(lin2)ModuleDict | -- | -- | 2,112 |
212-
| │ └─(p)Linear | [100, 32] | [100, 32] | 1,056 |
213-
| │ └─(a)Linear | [100, 32] | [100, 32] | 1,056 |
203+
| GraphModule | | | 5,824 |
204+
| ├─(lin1)ModuleDict | -- | -- | 544 |
205+
| │ └─(p)Linear | [100, 16] | [100, 16] | 272 |
206+
| │ └─(a)Linear | [100, 16] | [100, 16] | 272 |
207+
| ├─(conv1)ModuleDict | -- | -- | 3,168 |
208+
| │ └─(p__to__p)SAGEConv | [100, 16], [2, 200] | [100, 32] | 1,056 |
209+
| │ └─(p__to__a)SAGEConv | [2, 200] | [100, 32] | 1,056 |
210+
| │ └─(a__to__p)SAGEConv | [2, 200] | [100, 32] | 1,056 |
211+
| ├─(lin2)ModuleDict | -- | -- | 2,112 |
212+
| │ └─(p)Linear | [100, 32] | [100, 32] | 1,056 |
213+
| │ └─(a)Linear | [100, 32] | [100, 32] | 1,056 |
214214
+---------------------------+---------------------+----------------+----------+
215215
"""
216216
assert summary(model, x_dict, edge_index_dict) == expected[1:-1]

torch_geometric/transforms/add_metapaths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def _sample(
197197
edge_index: EdgeIndex,
198198
edge_weight: Optional[Tensor],
199199
) -> Tuple[EdgeIndex, Optional[Tensor]]:
200+
assert self.max_sample is not None
200201

201202
deg = degree(edge_index[0], num_nodes=edge_index.get_sparse_size(0))
202203
prob = (self.max_sample * (1. / deg))[edge_index[0]]

0 commit comments

Comments
 (0)