Skip to content

Commit 4b2dbc2

Browse files
committed
Fixed CUDA dependencies
1 parent a85c3e7 commit 4b2dbc2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Some useful options:
8989

9090
| Option | Default | Description |
9191
| :------------- |:------------|-----:|
92-
| `-D CUDA_V=(11.8\|12.1\|12.6\|none)` | `none` | Download LibTorch for a CUDA version (`none` = download CPU version). |
92+
| `-D CUDA_V=(11.8\|12.4\|12.6\|none)` | `none` | Download LibTorch for a CUDA version (`none` = download CPU version). |
9393
| `-D LIBTORCH_DOWNLOAD_BUILD_TYPE=(Release\|Debug)` | `Release` | Determines which libtorch build type version to download (only relevant on **Windows**).|
9494
| `-D DOWNLOAD_DATASETS=(OFF\|ON)` | `ON` | Download required datasets during build (only if they do not already exist in `pytorch-cpp/data`). |
9595
|`-D CREATE_SCRIPTMODULES=(OFF\|ON)` | `OFF` | Create all required scriptmodule files for prelearned models / weights during build. Requires installed python3 with pytorch and torchvision. |

cmake/fetch_libtorch.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ cmake_minimum_required(VERSION 3.28.6 FATAL_ERROR)
22

33
include(FetchContent)
44

5-
set(CUDA_V "none" CACHE STRING "Determines libtorch CUDA version to download (11.8, 12.1, 12.6 or none).")
5+
set(CUDA_V "none" CACHE STRING "Determines libtorch CUDA version to download (11.8, 12.4, 12.6 or none).")
66

77
if(${CUDA_V} STREQUAL "none")
88
set(LIBTORCH_DEVICE "cpu")
99
elseif(${CUDA_V} STREQUAL "11.8")
1010
set(LIBTORCH_DEVICE "cu118")
11-
elseif(${CUDA_V} STREQUAL "12.1")
12-
set(LIBTORCH_DEVICE "cu121")
11+
elseif(${CUDA_V} STREQUAL "12.4")
12+
set(LIBTORCH_DEVICE "cu124")
1313
elseif(${CUDA_V} STREQUAL "12.6")
1414
set(LIBTORCH_DEVICE "cu126")
1515
else()
16-
message(FATAL_ERROR "Invalid CUDA version specified, must be 11.8, 12.1, 12.6 or none!")
16+
message(FATAL_ERROR "Invalid CUDA version specified, must be 11.8, 12.4, 12.6 or none!")
1717
endif()
1818

1919
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")

0 commit comments

Comments
 (0)