From a86f783dd6fa58d4e7b91c3b2f1756d51b1b35b6 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 06:43:39 +0000 Subject: [PATCH 1/9] update --- .github/actions/setup/action.yml | 2 +- .github/workflows/building.yml | 28 +++++++++++++-------------- .github/workflows/cuda/Linux-env.sh | 4 ++++ .github/workflows/cuda/Linux.sh | 8 +++++++- .github/workflows/cuda/Windows-env.sh | 4 ++++ .github/workflows/cuda/Windows.sh | 5 +++++ .github/workflows/install.yml | 2 +- .github/workflows/nightly.yml | 28 +++++++++++++-------------- CHANGELOG.md | 1 + README.md | 16 +++++++-------- 10 files changed, 57 insertions(+), 41 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f3e54d34e..fc2dc521a 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.0.0' + default: '2.1.0' cuda-version: required: false default: cpu diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index bd78c0aca..c0ce39df5 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -12,39 +12,37 @@ jobs: matrix: os: [ubuntu-20.04, macos-10.15] # windows-2019 python-version: ['3.8', '3.9', '3.10', '3.11'] - torch-version: [1.11.0, 1.12.0, 1.13.0, 2.0.0] - cuda-version: ['cpu', 'cu113', 'cu115', 'cu116', 'cu117', 'cu118'] + torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0] + cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] exclude: - - torch-version: 1.11.0 - python-version: '3.11' - - torch-version: 1.11.0 - cuda-version: 'cu116' - - torch-version: 1.11.0 - cuda-version: 'cu117' - - torch-version: 1.11.0 - cuda-version: 'cu118' - torch-version: 1.12.0 python-version: '3.11' - - torch-version: 1.12.0 - cuda-version: 'cu115' - torch-version: 1.12.0 cuda-version: 'cu117' - torch-version: 1.12.0 cuda-version: 'cu118' + - torch-version: 1.12.0 + cuda-version: 'cu121' - torch-version: 1.13.0 python-version: '3.11' - torch-version: 1.13.0 cuda-version: 'cu113' - - torch-version: 1.13.0 - cuda-version: 'cu115' - torch-version: 1.13.0 cuda-version: 'cu118' + - torch-version: 1.13.0 + cuda-version: 'cu121' - torch-version: 2.0.0 cuda-version: 'cu113' - torch-version: 2.0.0 - cuda-version: 'cu115' + cuda-version: 'cu116' + - torch-version: 1.13.0 + cuda-version: 'cu121' + - torch-version: 2.1.0 + cuda-version: 'cu113' - torch-version: 2.0.0 cuda-version: 'cu116' + - torch-version: 1.13.0 + cuda-version: 'cu117' - os: macos-10.15 cuda-version: 'cu113' - os: macos-10.15 diff --git a/.github/workflows/cuda/Linux-env.sh b/.github/workflows/cuda/Linux-env.sh index 81c6ce89e..13504a7cc 100755 --- a/.github/workflows/cuda/Linux-env.sh +++ b/.github/workflows/cuda/Linux-env.sh @@ -1,6 +1,10 @@ #!/bin/bash case ${1} in + cu121) + export FORCE_CUDA=1 + export PATH=/usr/local/cuda-12.1/bin:${PATH} + ;; cu118) export FORCE_CUDA=1 export PATH=/usr/local/cuda-11.8/bin:${PATH} diff --git a/.github/workflows/cuda/Linux.sh b/.github/workflows/cuda/Linux.sh index 100a1b2ee..3ff090c18 100755 --- a/.github/workflows/cuda/Linux.sh +++ b/.github/workflows/cuda/Linux.sh @@ -3,6 +3,12 @@ OS=ubuntu2004 case ${1} in + cu121) + CUDA=12.1 + APT_KEY=${OS}-${CUDA/./-}-local + FILENAME=cuda-repo-${APT_KEY}_${CUDA}.1-530.30.02-1_amd64.deb + URL=https://developer.download.nvidia.com/compute/cuda/${CUDA}.1/local_installers + ;; cu118) CUDA=11.8 APT_KEY=${OS}-${CUDA/./-}-local @@ -50,7 +56,7 @@ sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget -nv ${URL}/${FILENAME} sudo dpkg -i ${FILENAME} -if [ "${1}" = "cu117" ] || [ "${1}" = "cu118" ]; then +if [ "${1}" = "cu117" ] || [ "${1}" = "cu118" || [ "${1}" = "cu121" ] ]; then sudo cp /var/cuda-repo-${APT_KEY}/cuda-*-keyring.gpg /usr/share/keyrings/ else sudo apt-key add /var/cuda-repo-${APT_KEY}/7fa2af80.pub diff --git a/.github/workflows/cuda/Windows-env.sh b/.github/workflows/cuda/Windows-env.sh index 68b45591d..e79f52e10 100755 --- a/.github/workflows/cuda/Windows-env.sh +++ b/.github/workflows/cuda/Windows-env.sh @@ -1,6 +1,10 @@ #!/bin/bash case ${1} in + cu121) + export FORCE_CUDA=1 + export PATH=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.1/bin:${PATH} + ;; cu118) export FORCE_CUDA=1 export PATH=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.8/bin:${PATH} diff --git a/.github/workflows/cuda/Windows.sh b/.github/workflows/cuda/Windows.sh index f8b06f08a..3c737ec93 100644 --- a/.github/workflows/cuda/Windows.sh +++ b/.github/workflows/cuda/Windows.sh @@ -6,6 +6,11 @@ curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq 7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32" case ${1} in + cu121) + CUDA_SHORT=11.8 + CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers + CUDA_FILE=cuda_${CUDA_SHORT}.1_531.14_windows.exe + ;; cu118) CUDA_SHORT=11.8 CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 18e9b15a4..1c9478ab0 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - cuda-version: ['cpu', 'cu117'] + cuda-version: ['cpu', 'cu121'] steps: - name: Checkout repository diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 685b4ca1a..d7cac2aa0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,39 +16,37 @@ jobs: matrix: os: [ubuntu-20.04] python-version: ['3.8', '3.9', '3.10', '3.11'] - torch-version: [1.11.0, 1.12.0, 1.13.0, 2.0.0] - cuda-version: ['cpu', 'cu113', 'cu115', 'cu116', 'cu117', 'cu118'] + torch-version: [1.12.0, 1.13.0, 2.0.0, 2.1.0] + cuda-version: ['cpu', 'cu113', 'cu116', 'cu117', 'cu118', 'cu121'] exclude: - - torch-version: 1.11.0 - python-version: '3.11' - - torch-version: 1.11.0 - cuda-version: 'cu116' - - torch-version: 1.11.0 - cuda-version: 'cu117' - - torch-version: 1.11.0 - cuda-version: 'cu118' - torch-version: 1.12.0 python-version: '3.11' - - torch-version: 1.12.0 - cuda-version: 'cu115' - torch-version: 1.12.0 cuda-version: 'cu117' - torch-version: 1.12.0 cuda-version: 'cu118' + - torch-version: 1.12.0 + cuda-version: 'cu121' - torch-version: 1.13.0 python-version: '3.11' - torch-version: 1.13.0 cuda-version: 'cu113' - - torch-version: 1.13.0 - cuda-version: 'cu115' - torch-version: 1.13.0 cuda-version: 'cu118' + - torch-version: 1.13.0 + cuda-version: 'cu121' - torch-version: 2.0.0 cuda-version: 'cu113' - torch-version: 2.0.0 - cuda-version: 'cu115' + cuda-version: 'cu116' + - torch-version: 1.13.0 + cuda-version: 'cu121' + - torch-version: 2.1.0 + cuda-version: 'cu113' - torch-version: 2.0.0 cuda-version: 'cu116' + - torch-version: 1.13.0 + cuda-version: 'cu117' steps: - name: Checkout repository diff --git a/CHANGELOG.md b/CHANGELOG.md index 6da10983f..0b13fd31f 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.3.0] - 2023-MM-DD ### Added +- Added PyTorch 2.1 support () - Added low-level support for distributed neighborhood sampling ([#246](https://github.com/pyg-team/pyg-lib/pull/246), [#252](https://github.com/pyg-team/pyg-lib/pull/252), [#253](https://github.com/pyg-team/pyg-lib/pull/253), [#254](https://github.com/pyg-team/pyg-lib/pull/254)) - Added support for homogeneous and heterogeneous biased neighborhood sampling ([#247](https://github.com/pyg-team/pyg-lib/pull/247), [#251](https://github.com/pyg-team/pyg-lib/pull/251)) - Added dispatch for XPU device in `index_sort` ([#243](https://github.com/pyg-team/pyg-lib/pull/243)) diff --git a/README.md b/README.md index 12084ca5b..86bd93f49 100644 --- a/README.md +++ b/README.md @@ -26,31 +26,31 @@ pip install pyg-lib -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.html where -* `${TORCH}` should be replaced by either `1.11.0`, `1.12.0`, `1.13.0` or `2.0.0` -* `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, `cu115`, `cu116`, `cu117` or `cu118` +* `${TORCH}` should be replaced by either `1.12.0`, `1.13.0`, `2.0.0` or `2.1.0` +* `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, `cu116`, `cu117`, `cu118` or `cu121` The following combinations are supported: -| PyTorch 2.0 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` | +| PyTorch 2.1 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | |--------------|-------|---------|---------|---------|---------|---------|---------| | **Linux** | ✅ | | | | | ✅ | ✅ | | **Windows** | | | | | | | | | **macOS** | ✅ | | | | | | | -| PyTorch 1.13 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` | +| PyTorch 2.0 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | |--------------|-------|---------|---------|---------|---------|---------|---------| | **Linux** | ✅ | | | | ✅ | ✅ | | | **Windows** | | | | | | | | | **macOS** | ✅ | | | | | | | -| PyTorch 1.12 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` | +| PyTorch 1.13 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | |--------------|-------|---------|---------|---------|---------|---------|---------| -| **Linux** | ✅ | ✅ | ✅ | | ✅ | | | +| **Linux** | ✅ | | | ✅ | ✅ | | | | **Windows** | | | | | | | | | **macOS** | ✅ | | | | | | | -| PyTorch 1.11 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` | -|--------------|-------|---------|---------|---------|---------|---------|---------| +| PyTorch 1.12 | `cpu` | `cu102` | `cu113` | `cu116` | `cu117` | `cu118` | `cu121` | +|--------------|-------|---------|---------|---------|---------|---------| --------| | **Linux** | ✅ | ✅ | ✅ | ✅ | | | | | **Windows** | | | | | | | | | **macOS** | ✅ | | | | | | | From 76bbda1beb20d0e3f7c817e23cf86968a2b89ae5 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 06:44:23 +0000 Subject: [PATCH 2/9] update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b13fd31f..eb04af990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ## [0.3.0] - 2023-MM-DD ### Added -- Added PyTorch 2.1 support () +- Added PyTorch 2.1 support ([#256](https://github.com/pyg-team/pyg-lib/pull/256)) - Added low-level support for distributed neighborhood sampling ([#246](https://github.com/pyg-team/pyg-lib/pull/246), [#252](https://github.com/pyg-team/pyg-lib/pull/252), [#253](https://github.com/pyg-team/pyg-lib/pull/253), [#254](https://github.com/pyg-team/pyg-lib/pull/254)) - Added support for homogeneous and heterogeneous biased neighborhood sampling ([#247](https://github.com/pyg-team/pyg-lib/pull/247), [#251](https://github.com/pyg-team/pyg-lib/pull/251)) - Added dispatch for XPU device in `index_sort` ([#243](https://github.com/pyg-team/pyg-lib/pull/243)) From c6f87e6c93491aab332cf713b833e2816baa7b52 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 06:58:34 +0000 Subject: [PATCH 3/9] update --- .github/workflows/cuda/Linux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cuda/Linux.sh b/.github/workflows/cuda/Linux.sh index 3ff090c18..c16c5a1bd 100755 --- a/.github/workflows/cuda/Linux.sh +++ b/.github/workflows/cuda/Linux.sh @@ -56,7 +56,7 @@ sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget -nv ${URL}/${FILENAME} sudo dpkg -i ${FILENAME} -if [ "${1}" = "cu117" ] || [ "${1}" = "cu118" || [ "${1}" = "cu121" ] ]; then +if [ "${1}" = "cu117" ] || [ "${1}" = "cu118" ] || [ "${1}" = "cu121" ]; then sudo cp /var/cuda-repo-${APT_KEY}/cuda-*-keyring.gpg /usr/share/keyrings/ else sudo apt-key add /var/cuda-repo-${APT_KEY}/7fa2af80.pub From 915e8f749ee536f59b62baf89bad9e991bfbf70b Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 08:00:49 +0000 Subject: [PATCH 4/9] update --- .github/workflows/cuda/Linux-env.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/cuda/Linux-env.sh b/.github/workflows/cuda/Linux-env.sh index 13504a7cc..788b156a4 100755 --- a/.github/workflows/cuda/Linux-env.sh +++ b/.github/workflows/cuda/Linux-env.sh @@ -4,30 +4,37 @@ case ${1} in cu121) export FORCE_CUDA=1 export PATH=/usr/local/cuda-12.1/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="5.0+PTX;6.0;7.0;7.5;8.0;8.6;9.0" ;; cu118) export FORCE_CUDA=1 export PATH=/usr/local/cuda-11.8/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6;9.0" ;; cu117) export FORCE_CUDA=1 export PATH=/usr/local/cuda-11.7/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" ;; cu116) export FORCE_CUDA=1 export PATH=/usr/local/cuda-11.6/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" ;; cu115) export FORCE_CUDA=1 export PATH=/usr/local/cuda-11.5/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" ;; cu113) export FORCE_CUDA=1 export PATH=/usr/local/cuda-11.3/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6" ;; cu102) export FORCE_CUDA=1 export PATH=/usr/local/cuda-10.2/bin:${PATH} + export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5" ;; *) ;; From 8b30c44c0d8a8f810b784a59ebcac878934b89c7 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 08:11:28 +0000 Subject: [PATCH 5/9] update --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 43b898020..fe5fc2539 100644 --- a/setup.py +++ b/setup.py @@ -64,6 +64,10 @@ def build_extension(self, ext): f'-DCMAKE_PREFIX_PATH={torch.utils.cmake_prefix_path}', ] + arch_list = os.environ.get('TORCH_CUDA_ARCH_LIST') + if WITH_CUDA and arch_list is not None: + cmake_args.append(f'-DCMAKE_CUDA_ARCHITECTURES={arch_list}') + if CMakeBuild.check_env_flag('USE_MKL_BLAS'): include_dir = f"{sysconfig.get_path('data')}{os.sep}include" cmake_args.append(f'-DBLAS_INCLUDE_DIR={include_dir}') From 287c010d7fc67ad16d4554093125e99604fcf8b5 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 08:20:03 +0000 Subject: [PATCH 6/9] update --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index fe5fc2539..43b898020 100644 --- a/setup.py +++ b/setup.py @@ -64,10 +64,6 @@ def build_extension(self, ext): f'-DCMAKE_PREFIX_PATH={torch.utils.cmake_prefix_path}', ] - arch_list = os.environ.get('TORCH_CUDA_ARCH_LIST') - if WITH_CUDA and arch_list is not None: - cmake_args.append(f'-DCMAKE_CUDA_ARCHITECTURES={arch_list}') - if CMakeBuild.check_env_flag('USE_MKL_BLAS'): include_dir = f"{sysconfig.get_path('data')}{os.sep}include" cmake_args.append(f'-DBLAS_INCLUDE_DIR={include_dir}') From bcc3f60bc50d25170b07bb35b199345e36141890 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 09:11:38 +0000 Subject: [PATCH 7/9] update --- .github/workflows/building.yml | 4 ++-- .github/workflows/nightly.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index c0ce39df5..128ad3c8b 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -39,9 +39,9 @@ jobs: cuda-version: 'cu121' - torch-version: 2.1.0 cuda-version: 'cu113' - - torch-version: 2.0.0 + - torch-version: 2.1.0 cuda-version: 'cu116' - - torch-version: 1.13.0 + - torch-version: 2.1.0 cuda-version: 'cu117' - os: macos-10.15 cuda-version: 'cu113' diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d7cac2aa0..55c984a7a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -43,9 +43,9 @@ jobs: cuda-version: 'cu121' - torch-version: 2.1.0 cuda-version: 'cu113' - - torch-version: 2.0.0 + - torch-version: 2.1.0 cuda-version: 'cu116' - - torch-version: 1.13.0 + - torch-version: 2.1.0 cuda-version: 'cu117' steps: From 18b32a77891e2ae4ae18352d1b51707e6499680b Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 09:38:56 +0000 Subject: [PATCH 8/9] update --- .github/workflows/cuda/Windows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cuda/Windows.sh b/.github/workflows/cuda/Windows.sh index 3c737ec93..82118f282 100644 --- a/.github/workflows/cuda/Windows.sh +++ b/.github/workflows/cuda/Windows.sh @@ -7,7 +7,7 @@ curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq case ${1} in cu121) - CUDA_SHORT=11.8 + CUDA_SHORT=12.1 CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers CUDA_FILE=cuda_${CUDA_SHORT}.1_531.14_windows.exe ;; From a6878541e1cf705a5f65d06ad4a91e31223f7145 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Thu, 5 Oct 2023 09:40:29 +0000 Subject: [PATCH 9/9] update --- .github/workflows/cuda/Windows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cuda/Windows.sh b/.github/workflows/cuda/Windows.sh index 82118f282..0bee4bf53 100644 --- a/.github/workflows/cuda/Windows.sh +++ b/.github/workflows/cuda/Windows.sh @@ -8,7 +8,7 @@ curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq case ${1} in cu121) CUDA_SHORT=12.1 - CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers + CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers CUDA_FILE=cuda_${CUDA_SHORT}.1_531.14_windows.exe ;; cu118)