diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 3388149b0..8ab4265f2 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -6,7 +6,7 @@ inputs: default: '3.8' torch-version: required: false - default: '2.2.0' + default: '2.3.0' cuda-version: required: false default: cpu diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index 6c7f81447..06feea5f7 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -12,7 +12,8 @@ jobs: matrix: os: [ubuntu-20.04, macos-14, windows-2019] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0] + # torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0] + torch-version: [2.3.0] cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] exclude: - torch-version: 1.12.0 @@ -57,6 +58,12 @@ jobs: cuda-version: 'cu116' - torch-version: 2.2.0 cuda-version: 'cu117' + - torch-version: 2.3.0 + cuda-version: 'cu113' + - torch-version: 2.3.0 + cuda-version: 'cu116' + - torch-version: 2.3.0 + cuda-version: 'cu117' - os: macos-14 cuda-version: 'cu113' - os: macos-14 diff --git a/.github/workflows/cpp_testing.yml b/.github/workflows/cpp_testing.yml index 5e5c28f7b..e6ad6b892 100644 --- a/.github/workflows/cpp_testing.yml +++ b/.github/workflows/cpp_testing.yml @@ -23,7 +23,7 @@ jobs: - name: Configure run: | export MKL_VERSION=`python -c 'from tools.mkl_ver import compatible_mkl_ver;print(compatible_mkl_ver())'` - pip install mkl-include==${MKL_VERSION} mkl-static==${MKL_VERSION} + pip install --no-cache-dir mkl-include==${MKL_VERSION} mkl-static==${MKL_VERSION} export _BLAS_INCLUDE_DIR=`python -c 'import os;import sysconfig;data=sysconfig.get_path("data");print(f"{data}{os.sep}include")'` export MKL_DIR=`python -c 'import os;import sysconfig;data=sysconfig.get_path("data");print(f"{data}{os.sep}lib{os.sep}cmake{os.sep}mkl")'` diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d3653b719..e73de4737 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,7 +16,7 @@ jobs: matrix: os: [ubuntu-20.04, macos-14, windows-2019] python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0] + torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0] cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] exclude: - torch-version: 1.12.0 @@ -61,6 +61,12 @@ jobs: cuda-version: 'cu116' - torch-version: 2.2.0 cuda-version: 'cu117' + - torch-version: 2.3.0 + cuda-version: 'cu113' + - torch-version: 2.3.0 + cuda-version: 'cu116' + - torch-version: 2.3.0 + cuda-version: 'cu117' - os: macos-14 cuda-version: 'cu113' - os: macos-14 diff --git a/CHANGELOG.md b/CHANGELOG.md index c069e6c2a..d6788a59d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ## [0.5.0] - 2023-MM-DD ### Added +- Added PyTorch 2.3 support ([#322](https://github.com/pyg-team/pyg-lib/pull/322)) - Added Windows support ([#315](https://github.com/pyg-team/pyg-lib/pull/315)) - Added macOS Apple Silicon support ([#310](https://github.com/pyg-team/pyg-lib/pull/310)) ### Changed diff --git a/README.md b/README.md index e71c6b79f..69da69e56 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,17 @@ pip install pyg-lib -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.html where -* `${TORCH}` should be replaced by either `1.12.0`, `1.13.0`, `2.0.0`, `2.1.0`, or `2.2.0` +* `${TORCH}` should be replaced by either `1.12.0`, `1.13.0`, `2.0.0`, `2.1.0`, `2.2.0`, or `2.3.0` * `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, `cu116`, `cu117`, `cu118`, or `cu121` The following combinations are supported: +| PyTorch 2.3 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | +|--------------|-------|---------|---------|---------|---------|---------|---------| +| **Linux** | ✅ | | | | | ✅ | ✅ | +| **Windows** | ✅ | | | | | ✅ | ✅ | +| **macOS** | ✅ | | | | | | | + | PyTorch 2.2 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | |--------------|-------|---------|---------|---------|---------|---------|---------| | **Linux** | ✅ | | | | | ✅ | ✅ | diff --git a/benchmark/sampler/subgraph.py b/benchmark/sampler/subgraph.py index a5734baeb..3ace1a779 100644 --- a/benchmark/sampler/subgraph.py +++ b/benchmark/sampler/subgraph.py @@ -16,7 +16,7 @@ def test_subgraph(dataset, **kwargs): t = time.perf_counter() for _ in range(10): pyg_lib.sampler.subgraph(rowptr, col, nodes) - print(f'time={time.perf_counter()-t:.6f} seconds') + print(f'time={time.perf_counter() - t:.6f} seconds') edge_index = to_edge_index(rowptr, col) from torch_geometric.utils import subgraph @@ -24,7 +24,7 @@ def test_subgraph(dataset, **kwargs): t = time.perf_counter() for _ in range(10): subgraph(nodes, edge_index, num_nodes=num_nodes, relabel_nodes=True) - print(f'time={time.perf_counter()-t:.6f} seconds') + print(f'time={time.perf_counter() - t:.6f} seconds') if __name__ == '__main__':