Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Setup
inputs:
python-version:
required: false
default: '3.9'
default: '3.8'
torch-version:
required: false
default: '1.13.0'
default: '2.0.0'
cuda-version:
required: false
default: cpu
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/building.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,47 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15] # windows-2019
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: [1.11.0, 1.12.0, 1.13.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115', 'cu116', 'cu117']
python-version: ['3.7', '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', 'cu102', 'cu113', 'cu115', 'cu116', 'cu117', 'cu118']
# TODO
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.13.0
python-version: '3.11'
- torch-version: 1.13.0
cuda-version: 'cu102'
- 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: 2.0.0
python-version: '3.7'
- torch-version: 2.0.0
cuda-version: 'cu102'
- torch-version: 2.0.0
cuda-version: 'cu113'
- torch-version: 2.0.0
cuda-version: 'cu115'
- torch-version: 2.0.0
cuda-version: 'cu116'
- os: macos-10.15
cuda-version: 'cu102'
- os: macos-10.15
Expand All @@ -39,8 +62,8 @@ jobs:
cuda-version: 'cu116'
- os: macos-10.15
cuda-version: 'cu117'
- os: windows-2019
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu118'

steps:
- name: Checkout repository
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cuda/Linux-env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash

case ${1} in
cu118)
export FORCE_CUDA=1
export PATH=/usr/local/cuda-11.8/bin:${PATH}
;;
cu117)
export FORCE_CUDA=1
export PATH=/usr/local/cuda-11.7/bin:${PATH}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/cuda/Linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
OS=ubuntu1804

case ${1} in
cu118)
CUDA=11.8
APT_KEY=${OS}-${CUDA/./-}-local
FILENAME=cuda-repo-${APT_KEY}_${CUDA}.0-520.61.05-1_amd64.deb
URL=https://developer.download.nvidia.com/compute/cuda/${CUDA}.0/local_installers
;;
cu117)
CUDA=11.7
APT_KEY=${OS}-${CUDA/./-}-local
Expand Down Expand Up @@ -44,7 +50,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" ]; then
if [ "${1}" = "cu117" ] || [ "${1}" = "cu118" ]; 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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cuda/Windows-env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash

case ${1} in
cu118)
export FORCE_CUDA=1
export PATH=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.8/bin:${PATH}
;;
cu117)
export FORCE_CUDA=1
export PATH=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v11.7/bin:${PATH}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cuda/Windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
cu118)
CUDA_SHORT=11.8
CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers
CUDA_FILE=cuda_${CUDA_SHORT}.0_522.06_windows.exe
;;
cu117)
CUDA_SHORT=11.7
CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install package
run: |
source ./.github/workflows/cuda/${{ runner.os }}-env.sh ${{ matrix.cuda-version }}
pip install --verbose -e .[triton]
pip install --verbose -e .

- name: Test imports
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.8

- name: Install dependencies
run: pip install mypy
Expand Down
30 changes: 26 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,46 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-18.04]
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: [1.11.0, 1.12.0, 1.13.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115', 'cu116', 'cu117']
python-version: ['3.7', '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', 'cu102', 'cu113', 'cu115', 'cu116', 'cu117', 'cu118']
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.13.0
python-version: '3.11'
- torch-version: 1.13.0
cuda-version: 'cu102'
- 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: 2.0.0
python-version: '3.7'
- torch-version: 2.0.0
cuda-version: 'cu102'
- torch-version: 2.0.0
cuda-version: 'cu113'
- torch-version: 2.0.0
cuda-version: 'cu115'
- torch-version: 2.0.0
cuda-version: 'cu116'

steps:
- name: Checkout repository
Expand Down Expand Up @@ -108,7 +130,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Install package
run: |
pip install --verbose -e .[triton,test]
pip install --verbose -e .[test]

- name: Run tests
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [0.2.0] - 2023-MM-DD
### Added
- Added PyTorch 2.0 support ([#214](https://github.com/pyg-team/pyg-lib/pull/214))
- `neighbor_sample` routines now also return information about the number of sampled nodes/edges per layer ([#197](https://github.com/pyg-team/pyg-lib/pull/197))
- Added `index_sort` implementation ([#181](https://github.com/pyg-team/pyg-lib/pull/181), [#192](https://github.com/pyg-team/pyg-lib/pull/192))
- Added `triton>=2.0` support ([#171](https://github.com/pyg-team/pyg-lib/pull/171))
Expand Down
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Installation

We provide pre-built Python wheels for all major OS/PyTorch/CUDA combinations from Python 3.7 till 3.10, see [here](https://data.pyg.org/whl).
We provide pre-built Python wheels for all major OS/PyTorch/CUDA combinations from Python 3.7 till 3.11, see [here](https://data.pyg.org/whl).
Note that currently, Windows wheels are not supported (we are working on fixing this as soon as possible).

To install the wheels, simply run
Expand All @@ -26,32 +26,38 @@ 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` or `1.13.0`
* `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, `cu115`, `cu116` or `cu117`
* `${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`

The following combinations are supported:

| PyTorch 1.13 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` |
|--------------|-------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | | | | ✅ | ✅ |
| **Windows** | | | | | | |
| **macOS** | ✅ | | | | | |

| PyTorch 1.12 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` |
|--------------|-------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ | | ✅ | |
| **Windows** | | | | | | |
| **macOS** | ✅ | | | | | |

| PyTorch 1.11 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` |
|--------------|-------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ | ✅ | | |
| **Windows** | | | | | | |
| **macOS** | ✅ | | | | | |
| PyTorch 2.0 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` |
|--------------|-------|---------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | | | | ✅ | | ✅ |
| **Windows** | | | | | | | |
| **macOS** | ✅ | | | | | | |

| PyTorch 1.13 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` |
|--------------|-------|---------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | | | | ✅ | ✅ | |
| **Windows** | | | | | | | |
| **macOS** | ✅ | | | | | | |

| PyTorch 1.12 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` |
|--------------|-------|---------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ | | ✅ | | |
| **Windows** | | | | | | | |
| **macOS** | ✅ | | | | | | |

| PyTorch 1.11 | `cpu` | `cu102` | `cu113` | `cu115` | `cu116` | `cu117` | `cu118` |
|--------------|-------|---------|---------|---------|---------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ | ✅ | | | |
| **Windows** | | | | | | | |
| **macOS** | ✅ | | | | | | |

### Form nightly

Nightly wheels are provided for Linux from Python 3.7 till 3.10:
Nightly wheels are provided for Linux from Python 3.7 till 3.11:

```
pip install pyg-lib -f https://data.pyg.org/whl/nightly/torch-${TORCH}+${CUDA}.html
Expand Down