diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8ab4265f..56aeafd3 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.3.0' + default: '2.4.0' cuda-version: required: false default: cpu diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index 06feea5f..057683e4 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -12,9 +12,9 @@ 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, 2.3.0] - torch-version: [2.3.0] - cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] + # torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0] + torch-version: [2.4.0] + cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121', 'cu124'] exclude: - torch-version: 1.12.0 python-version: '3.12' @@ -32,6 +32,8 @@ jobs: cuda-version: 'cu118' - torch-version: 1.12.0 cuda-version: 'cu121' + - torch-version: 1.12.0 + cuda-version: 'cu124' - torch-version: 1.13.0 python-version: '3.11' - torch-version: 1.13.0 @@ -40,30 +42,44 @@ jobs: cuda-version: 'cu118' - torch-version: 1.13.0 cuda-version: 'cu121' + - torch-version: 1.13.0 + cuda-version: 'cu124' - torch-version: 2.0.0 cuda-version: 'cu113' - torch-version: 2.0.0 cuda-version: 'cu116' - - torch-version: 1.13.0 - cuda-version: 'cu121' + - torch-version: 2.0.0 + cuda-version: 'cu124' - torch-version: 2.1.0 cuda-version: 'cu113' - torch-version: 2.1.0 cuda-version: 'cu116' - torch-version: 2.1.0 cuda-version: 'cu117' + - torch-version: 2.1.0 + cuda-version: 'cu124' - torch-version: 2.2.0 cuda-version: 'cu113' - torch-version: 2.2.0 cuda-version: 'cu116' - torch-version: 2.2.0 cuda-version: 'cu117' + - torch-version: 2.2.0 + cuda-version: 'cu124' - torch-version: 2.3.0 cuda-version: 'cu113' - torch-version: 2.3.0 cuda-version: 'cu116' - torch-version: 2.3.0 cuda-version: 'cu117' + - torch-version: 2.3.0 + cuda-version: 'cu124' + - torch-version: 2.4.0 + cuda-version: 'cu113' + - torch-version: 2.4.0 + cuda-version: 'cu116' + - torch-version: 2.4.0 + cuda-version: 'cu117' - os: macos-14 cuda-version: 'cu113' - os: macos-14 @@ -75,12 +91,7 @@ jobs: - os: macos-14 cuda-version: 'cu121' - os: macos-14 - python-version: '3.8' - - os: macos-14 - python-version: '3.9' - - os: windows-2019 - torch-version: 2.0.0 - cuda-version: 'cu121' + cuda-version: 'cu124' steps: - name: Checkout repository diff --git a/.github/workflows/cuda/Linux-env.sh b/.github/workflows/cuda/Linux-env.sh index 788b156a..f519b347 100755 --- a/.github/workflows/cuda/Linux-env.sh +++ b/.github/workflows/cuda/Linux-env.sh @@ -1,6 +1,11 @@ #!/bin/bash case ${1} in + cu124) + export FORCE_CUDA=1 + export PATH=/usr/local/cuda-12.4/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="5.0+PTX;6.0;7.0;7.5;8.0;8.6;9.0" + ;; cu121) export FORCE_CUDA=1 export PATH=/usr/local/cuda-12.1/bin:${PATH} diff --git a/.github/workflows/cuda/Linux.sh b/.github/workflows/cuda/Linux.sh index c16c5a1b..5296d0b0 100755 --- a/.github/workflows/cuda/Linux.sh +++ b/.github/workflows/cuda/Linux.sh @@ -3,6 +3,12 @@ OS=ubuntu2004 case ${1} in + cu124) + CUDA=12.4 + APT_KEY=${OS}-${CUDA/./-}-local + FILENAME=cuda-repo-${APT_KEY}_${CUDA}.1-550.54.15-1_amd64.deb + URL=https://developer.download.nvidia.com/compute/cuda/${CUDA}.1/local_installers + ;; cu121) CUDA=12.1 APT_KEY=${OS}-${CUDA/./-}-local diff --git a/.github/workflows/cuda/Windows-env.sh b/.github/workflows/cuda/Windows-env.sh index e79f52e1..2a4ddcf5 100755 --- a/.github/workflows/cuda/Windows-env.sh +++ b/.github/workflows/cuda/Windows-env.sh @@ -1,6 +1,10 @@ #!/bin/bash case ${1} in + cu124) + export FORCE_CUDA=1 + export PATH=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.4/bin:${PATH} + ;; cu121) export FORCE_CUDA=1 export PATH=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.1/bin:${PATH} diff --git a/.github/workflows/cuda/Windows.sh b/.github/workflows/cuda/Windows.sh index 582541da..52e8ae18 100644 --- a/.github/workflows/cuda/Windows.sh +++ b/.github/workflows/cuda/Windows.sh @@ -1,6 +1,11 @@ #!/bin/bash case ${1} in + cu124) + CUDA_SHORT=12.4 + CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers + CUDA_FILE=cuda_${CUDA_SHORT}.1_551.78_windows.exe + ;; cu121) CUDA_SHORT=12.1 CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e73de473..d66deb3b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,8 +16,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, 2.3.0] - cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] + torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0] + cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121', 'cu124'] exclude: - torch-version: 1.12.0 python-version: '3.12' @@ -35,6 +35,8 @@ jobs: cuda-version: 'cu118' - torch-version: 1.12.0 cuda-version: 'cu121' + - torch-version: 1.12.0 + cuda-version: 'cu124' - torch-version: 1.13.0 python-version: '3.11' - torch-version: 1.13.0 @@ -43,30 +45,44 @@ jobs: cuda-version: 'cu118' - torch-version: 1.13.0 cuda-version: 'cu121' + - torch-version: 1.13.0 + cuda-version: 'cu124' - torch-version: 2.0.0 cuda-version: 'cu113' - torch-version: 2.0.0 cuda-version: 'cu116' - - torch-version: 1.13.0 - cuda-version: 'cu121' + - torch-version: 2.0.0 + cuda-version: 'cu124' - torch-version: 2.1.0 cuda-version: 'cu113' - torch-version: 2.1.0 cuda-version: 'cu116' - torch-version: 2.1.0 cuda-version: 'cu117' + - torch-version: 2.1.0 + cuda-version: 'cu124' - torch-version: 2.2.0 cuda-version: 'cu113' - torch-version: 2.2.0 cuda-version: 'cu116' - torch-version: 2.2.0 cuda-version: 'cu117' + - torch-version: 2.2.0 + cuda-version: 'cu124' - torch-version: 2.3.0 cuda-version: 'cu113' - torch-version: 2.3.0 cuda-version: 'cu116' - torch-version: 2.3.0 cuda-version: 'cu117' + - torch-version: 2.3.0 + cuda-version: 'cu124' + - torch-version: 2.4.0 + cuda-version: 'cu113' + - torch-version: 2.4.0 + cuda-version: 'cu116' + - torch-version: 2.4.0 + cuda-version: 'cu117' - os: macos-14 cuda-version: 'cu113' - os: macos-14 @@ -78,12 +94,7 @@ jobs: - os: macos-14 cuda-version: 'cu121' - os: macos-14 - python-version: '3.8' - - os: macos-14 - python-version: '3.9' - - os: windows-2019 - torch-version: 2.0.0 - cuda-version: 'cu121' + cuda-version: 'cu124' steps: - name: Checkout repository diff --git a/CHANGELOG.md b/CHANGELOG.md index d6788a59..84628754 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.4 support ([#337](https://github.com/pyg-team/pyg-lib/pull/337)) - 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)) diff --git a/README.md b/README.md index 69da69e5..e9a9b88c 100644 --- a/README.md +++ b/README.md @@ -29,45 +29,51 @@ 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`, `2.2.0`, or `2.3.0` +* `${TORCH}` should be replaced by either `1.12.0`, `1.13.0`, `2.0.0`, `2.1.0`, `2.2.0`, `2.3.0`, or `2.4.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` | +| PyTorch 2.4 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | |--------------|-------|---------|---------|---------|---------|---------|---------| -| **Linux** | ✅ | | | | | ✅ | ✅ | -| **Windows** | ✅ | | | | | ✅ | ✅ | +| **Linux** | ✅ | | | | ✅ | ✅ | ✅ | +| **Windows** | ✅ | | | | ✅ | ✅ | ✅ | | **macOS** | ✅ | | | | | | | -| PyTorch 2.2 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | +| PyTorch 2.3 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | |--------------|-------|---------|---------|---------|---------|---------|---------| -| **Linux** | ✅ | | | | | ✅ | ✅ | -| **Windows** | ✅ | | | | | ✅ | ✅ | +| **Linux** | ✅ | | | | ✅ | ✅ | | +| **Windows** | ✅ | | | | ✅ | ✅ | | | **macOS** | ✅ | | | | | | | -| PyTorch 2.1 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | +| PyTorch 2.2 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | |--------------|-------|---------|---------|---------|---------|---------|---------| -| **Linux** | ✅ | | | | | ✅ | ✅ | -| **Windows** | ✅ | | | | | ✅ | ✅ | +| **Linux** | ✅ | | | | ✅ | ✅ | | +| **Windows** | ✅ | | | | ✅ | ✅ | | | **macOS** | ✅ | | | | | | | - -| PyTorch 2.0 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | + c +| PyTorch 2.1 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | |--------------|-------|---------|---------|---------|---------|---------|---------| -| **Linux** | ✅ | | | | ✅ | ✅ | ✅ | +| **Linux** | ✅ | | | | ✅ | ✅ | | | **Windows** | ✅ | | | | ✅ | ✅ | | | **macOS** | ✅ | | | | | | | -| PyTorch 1.13 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | +| PyTorch 2.0 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | |--------------|-------|---------|---------|---------|---------|---------|---------| -| **Linux** | ✅ | | | ✅ | ✅ | | | +| **Linux** | ✅ | | | ✅ | ✅ | ✅ | | | **Windows** | ✅ | | | ✅ | ✅ | | | | **macOS** | ✅ | | | | | | | -| PyTorch 1.12 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | -|--------------|-------|---------|---------|---------|---------|---------| --------| -| **Linux** | ✅ | ✅ | ✅ | ✅ | | | | -| **Windows** | ✅ | ✅ | ✅ | ✅ | | | | +| PyTorch 1.13 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | +|--------------|-------|---------|---------|---------|---------|---------|---------| +| **Linux** | ✅ | | ✅ | ✅ | | | | +| **Windows** | ✅ | | ✅ | ✅ | | | | +| **macOS** | ✅ | | | | | | | + c +| PyTorch 1.12 | `cpu` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | `cu124` | +|--------------|-------|---------|---------|---------|---------| --------|---------| +| **Linux** | ✅ | ✅ | ✅ | | | | | +| **Windows** | ✅ | ✅ | ✅ | | | | | | **macOS** | ✅ | | | | | | | ### Form nightly