Skip to content

Commit

Permalink
Support for pytorch 2.0 (#94)
Browse files Browse the repository at this point in the history
* Update environments to support torch 2.0

* Make latest CUDA version in CI be 11.7, since the CUDA workflow provider does not
include 11.8

* Update ci

* Update ci

* Update ci

* Update ci

* Add latest torchani, compatible with pytorch 2

* update ci

* update ci

* Update ci

* Address raimis comments

* Fix cuda

* Remove = in environment.yml
  • Loading branch information
RaulPPelaez authored Apr 18, 2023
1 parent b27ec97 commit b63fc70
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
gcc: "8.5.*"
nvcc: "10.2"
python: "3.8.*"
torchani: "2.2.*"
pytorch: "1.11.*"

# Older supported versions
Expand All @@ -38,33 +39,36 @@ jobs:
gcc: "10.3.*"
nvcc: "11.2"
python: "3.9.*"
torchani: "2.2.*"
pytorch: "1.12.*"

# Latest supported versions (with CUDA)
- name: Linux (CUDA 11.7, Python 3.10, PyTorch 1.13)
- name: Linux (CUDA 11.8, Python 3.10, PyTorch 2.0)
enable_cuda: true
cuda: "11.7.0"
cuda: "11.8.0"
gcc: "10.3.*"
nvcc: "11.7"
nvcc: "11.8"
python: "3.10.*"
pytorch: "1.13.*"
torchani: "2.2.*"
pytorch: "2.0.*"

# Latest supported versions (without CUDA)
- name: Linux (no CUDA, Python 3.10, PyTorch 1.13)
- name: Linux (no CUDA, Python 3.10, PyTorch 2.0)
enable_cuda: false
gcc: "10.3.*"
python: "3.10.*"
pytorch: "1.13.*"
pytorch: "2.0.*"
torchani: "2.2.*"

steps:
- name: Check out
uses: actions/checkout@v2

- name: Install CUDA Toolkit
uses: Jimver/[email protected].8
uses: Jimver/[email protected].10
with:
cuda: ${{ matrix.cuda }}
linux-local-args: '["--toolkit", "--override"]' # Need to install CUDA 10.2
linux-local-args: '["--toolkit", "--override"]'
if: ${{ matrix.enable_cuda }}

- name: Install Miniconda
Expand All @@ -79,6 +83,7 @@ jobs:
run: |
sed -i -e "/cudatoolkit/c\ - cudatoolkit ${{ matrix.cuda }}" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
-e "/torchani/c\ - torchani ${{ matrix.torchani }}" \
-e "/nvcc_linux-64/c\ - nvcc_linux-64 ${{ matrix.nvcc }}" \
-e "/python/c\ - python ${{ matrix.python }}" \
-e "/pytorch-gpu/c\ - pytorch-gpu ${{ matrix.pytorch }}" \
Expand All @@ -89,6 +94,7 @@ jobs:
run: |
sed -i -e "/cudatoolkit/c\ # - cudatoolkit" \
-e "/gxx_linux-64/c\ - gxx_linux-64 ${{ matrix.gcc }}" \
-e "/torchani/c\ - torchani ${{ matrix.torchani }}" \
-e "/nvcc_linux-64/c\ # - nvcc_linux-64" \
-e "/python/c\ - python ${{ matrix.python }}" \
-e "/pytorch-gpu/c\ - pytorch-cpu ${{ matrix.pytorch }}" \
Expand Down
10 changes: 5 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ channels:
- conda-forge
dependencies:
- cmake >=3.20
- cudatoolkit 11.2.2
- cudatoolkit 11.8.*
- gxx_linux-64 10.3.*
- make
- mdtraj
- nvcc_linux-64 11.2
- torchani 2.2.2
- nvcc_linux-64 11.8
- torchani 2.2.*
- pytest
- python 3.10.*
- pytorch-gpu 1.12.*
- sysroot_linux-64 2.17
- pytorch-gpu 2.0.*
- sysroot_linux-64 2.17

0 comments on commit b63fc70

Please sign in to comment.