Skip to content

Commit

Permalink
Merge pull request #1204 from mlverse/libtorch/v2.5.1
Browse files Browse the repository at this point in the history
Libtorch 2.5.1
  • Loading branch information
dfalbel authored Nov 14, 2024
2 parents d7c4977 + ad815b0 commit 2ff1848
Show file tree
Hide file tree
Showing 45 changed files with 57,202 additions and 24,742 deletions.
6 changes: 4 additions & 2 deletions .github/actions/install-cudnn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ runs:
Get-ChildItem -Path "${env:CUDA_PATH}\lib"
Get-ChildItem -Path "C:\cudnn\" -Directory | Move-Item -Destination "C:\cudnn\cuda"
Get-ChildItem -Path "C:\cudnn\"
Get-ChildItem -Path "C:\cudnn\cuda"
Move-Item -Path "C:\cudnn\cuda\bin\cudnn*.dll" -Destination "${env:CUDA_PATH}\bin"
Move-Item -Path "C:\cudnn\cuda\include\cudnn*.h" -Destination "${env:CUDA_PATH}\include"
Move-Item -Path "C:\cudnn\cuda\lib\cudnn*.lib" -Destination "${env:CUDA_PATH}\lib\x64"
echo "CUDNN_INCLUDE_PATH=""${CUDA_PATH}\include""" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CUDNN_LIBRARY_PATH=""${CUDA_PATH}\lib\x64""" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Move-Item -Path "C:\cudnn\cuda\lib\x64\cudnn*.lib" -Destination "${env:CUDA_PATH}\lib\x64"
echo "CUDNN_INCLUDE_PATH=""${env:CUDA_PATH}\include""" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CUDNN_LIBRARY_PATH=""${env:CUDA_PATH}\lib\x64""" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Remove-Item -Path cudnn.zip
shell: pwsh
4 changes: 3 additions & 1 deletion .github/actions/install-cudnn/cudnn-url.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
windows 11.3 https://torch-cdn.mlverse.org/cudnn/cudnn-11.3-windows-x64-v8.2.1.32.zip
windows 11.7 https://developer.download.nvidia.com/compute/redist/cudnn/v8.5.0/local_installers/11.7/cudnn-windows-x86_64-8.5.0.96_cuda11-archive.zip
windows 11.8 https://developer.download.nvidia.com/compute/redist/cudnn/v8.7.0/local_installers/11.8/cudnn-windows-x86_64-8.7.0.84_cuda11-archive.zip
windows 12.4 https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip
linux 11.3 https://torch-cdn.mlverse.org/cudnn/cudnn-11.3-linux-x64-v8.2.1.32.tgz
linux 11.6 https://torch-cdn.mlverse.org/cudnn/cudnn-linux-x86_64-8.6.0.163_cuda11-archive.tgz
linux 10.2 https://torch-cdn.mlverse.org/cudnn/cudnn-10.2-linux-x64-v7.6.5.32.tgz
linux 11.7 https://torch-cdn.mlverse.org/cudnn/cudnn-linux-x86_64-8.5.0.96_cuda11-archive.tar.xz
linux 11.8 https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.0.131_cuda11-archive.tar.xz
linux 11.8 https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.0.131_cuda11-archive.tar.xz
linux 12.4 https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz
23 changes: 11 additions & 12 deletions .github/workflows/lantern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
config:
# when changing supported versions here, please modify supported versions
# in install.R
- {os: macOS, version: cpu-intel, runner: macos-12}
- {os: macOS, version: cpu-intel, runner: macos-13}
- {os: macOS, version: cpu-m1, runner: [self-hosted, m1]}

- {os: ubuntu, version: cpu, runner: ubuntu-latest}
- {os: ubuntu, version: cu11.7, runner: [self-hosted, linux]}
- {os: ubuntu, version: cu11.8, runner: [self-hosted, linux]}
- {os: ubuntu, version: cu12.4, runner: [self-hosted, linux]}

- {os: windows, version: cpu, runner: windows-2019}
- {os: windows, version: cu11.7, runner: windows-2019}
- {os: windows, version: cpu, runner: windows-2022}
- {os: windows, version: cu11.8, runner: windows-2019}
- {os: windows, version: cu12.4, runner: windows-2019}

precxx11abi: [0, 1]

Expand All @@ -39,16 +39,14 @@ jobs:
- config: {os: ubuntu}
precxx11abi: 1
container: ubuntu:20.04

# specify the CUDA patch for each major/minor version.
# required for cuda installation
- config: {version: cu11.7}
cuda: 11.7
cuda_patch: 1

- config: {version: cu11.8}
cuda: 11.8
cuda_patch: 0

- config: {version: cu12.4}
cuda: 12.4
cuda_patch: 1

exclude:
- config: {os: macOS}
Expand Down Expand Up @@ -80,17 +78,18 @@ jobs:

- name: Install CUDA
if: ${{matrix.cuda != ''}}
uses: Jimver/[email protected].10
uses: Jimver/[email protected].18
id: cuda-toolkit
with:
cuda: "${{matrix.cuda}}.${{matrix.cuda_patch}}"
log-file-suffix: '${{matrix.cuda}}.${{matrix.cuda_patch}}.${{matrix.precxx11abi}}.txt'

- name: Install CuDNN
if: ${{ matrix.cuda != '' }}
uses: ./.github/actions/install-cudnn
with:
cuda_version: ${{ matrix.cuda }}

- name: Run cmake
run: |
cd src/lantern/
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ jobs:

- {os: ubuntu, r_version: release, version: cpu, runner: ubuntu-20.04}
- {os: ubuntu, r_version: release, version: cpu, runner: ubuntu-20.04, precxx11abi: 1}
- {os: ubuntu, r_version: release, version: cu11.7, runner: [self-hosted, gpu-local]}
- {os: ubuntu, r_version: release, version: cu11.8, runner: [self-hosted, gpu-local]}
- {os: ubuntu, r_version: release, version: cu12.4, runner: [self-hosted, gpu-local]}

- {os: windows, r_version: release, version: cpu, runner: windows-latest}

include:

- config: {os: ubuntu, version: cu11.7}
container: {image: 'nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04', options: '--gpus all --runtime=nvidia'}

- config: {os: ubuntu, version: cu11.8}
container: {image: 'nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04', options: '--gpus all --runtime=nvidia'}
- config: {os: ubuntu, version: cu12.4}
container: {image: 'nvidia/cuda:12.4.1-cudnn-devel-ubuntu20.04', options: '--gpus all --runtime=nvidia'}

runs-on: ${{ matrix.config.runner }}
container: ${{ matrix.container }}
Expand Down Expand Up @@ -79,7 +75,7 @@ jobs:
- uses: ./.github/actions/setup-r
with:
r_version: ${{ matrix.config.r_version}}

- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
if: ${{ env.BUILD_LANTERN == 1}}
Expand All @@ -91,16 +87,15 @@ jobs:
cache: false
extra-packages: any::rcmdcheck
needs: check

- run: |
Sys.getenv("PRECXX11ABI")
Sys.setenv("PRECXX11ABI" = 1)
pkgbuild::build()
shell: Rscript {0}

- name: Session info
run: |
Rscript -e "sessionInfo()"
- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
args: 'c("--no-multiarch", "--no-manual", "--as-cran")'



10 changes: 7 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: torch
Type: Package
Title: Tensors and Neural Networks with 'GPU' Acceleration
Version: 0.13.0.9000
Version: 0.13.0.9001
Authors@R: c(
person("Daniel", "Falbel", email = "[email protected]", role = c("aut", "cre", "cph")),
person("Javier", "Luraschi", email = "[email protected]", role = c("aut")),
Expand All @@ -11,6 +11,7 @@ Authors@R: c(
person("Krzysztof", "Joachimiak", role = c("ctb")),
person("Hamada S.", "Badr", role = c("ctb")),
person("Sebastian", "Fischer", role = c("ctb")),
person("Maximilian", "Pichler", role = c("ctb")),
person(family = "RStudio", role = c("cph"))
)
Description: Provides functionality to define and train neural networks similar to
Expand Down Expand Up @@ -43,8 +44,9 @@ Imports:
glue,
desc,
safetensors (>= 0.1.1),
jsonlite
RoxygenNote: 7.3.1
jsonlite,
scales
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
Suggests:
testthat (>= 3.0.0),
Expand Down Expand Up @@ -177,3 +179,5 @@ Collate:
'variable_list.R'
'with-indices.R'
'wrapers.R'
Remotes:
RcppCore/Rcpp
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Bug fixes

- `torch_iinfo()` now support all integer dtypes (#1190 @cregouby)
- Fixed float key_padding_mask in `nnf_multi_head_attention_forward()` (#1205)

# torch 0.13.0

Expand Down
Loading

0 comments on commit 2ff1848

Please sign in to comment.