-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to install libtorch without CUDA / cudnn / GPU? #42799
Comments
Please see #30604 for how to properly report a build failure. |
Sorry thought *.md was included automatically. here it is: Package: cudnn:[email protected]#14 Host Environment
To Reproduce vcpkg install libtorch:x64-windows Failure logs -- Found CUDA V11.0.221 |
There is a recommodation what to do, but that's somehow very difficult on my system. therefore the question if I can install without cuda, cudnn, gpu. |
I've the same issue, libtorch is a generic library, which should build without the GPU drivers of a third-party vendor. My system does not have a NVIDIA GPU, why should I install their drivers to build libtorch? |
CUDA is required for the port's default feature
In manifest mode, use a libtorch dependency with |
@dg0yt Thanks!! May I ask which features are default? (Where can I find out? Actually as I am no expert therein I want to install all default features except cuda.) |
The immediate source is the port's manifest: vcpkg/ports/libtorch/vcpkg.json Lines 54 to 61 in f06267d
There is no "global" list, but the active default features vary subject to platform expressions. On vcpkg.link, you will find some features marked with Default Feature and the relevant expression: On a linux console, the following also works for me:
(You see the effect of the |
Copy issue body from D:/di/Libraries/Vs/vcpkg/installed/vcpkg/issue_body.md
Is it possible to install without CUDA / cudnn / GPU?
I've done:
vcpkg install libtorch:x64-windows
I got:
Computing installation plan...
The following packages will be built and installed:
libtorch[core,cuda,opencv,zstd]:[email protected]#7
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exeRestored 0 package(s) from C:\Users\hl\AppData\Local\vcpkg\archives in 6.94 ms. Use --debug to see more details.
Installing 1/30 openblas:[email protected]...
Building openblas:[email protected]...
-- Downloading https://patch-diff.githubusercontent.com/raw/OpenMathLib/OpenBLAS/pull/4926.diff?full_index=1 -> openblas-fix-arm64-windows-uwp.patch...
-- Downloading https://github.com/OpenMathLib/OpenBLAS/archive/v0.3.28.tar.gz -> OpenMathLib-OpenBLAS-v0.3.28.tar.gz...
-- Extracting source D:/di/Libraries/Vs/vcpkg/downloads/OpenMathLib-OpenBLAS-v0.3.28.tar.gz
-- Applying patch uwp.patch
-- Applying patch fix-redefinition-function.patch
-- Applying patch install-tools.patch
-- Applying patch gcc14.patch
-- Applying patch D:/di/Libraries/Vs/vcpkg/downloads/openblas-fix-arm64-windows-uwp.patch
-- Using source at D:/di/Libraries/Vs/vcpkg/buildtrees/openblas/src/v0.3.28-6f3e63eb38.clean
-- Downloading https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit-portable.zip -> strawberry-perl-5.40.0.1-64bit-portable.zip...
-- Found external ninja('1.12.1').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig file: D:/di/Libraries/Vs/vcpkg/packages/openblas_x64-windows/lib/pkgconfig/openblas.pc
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1
2.3.0-1-any.pkg.tar.zst.2.3.0-1-any.pkg.tar.zst.-- Using cached msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst.
-- Using msys root at D:/di/Libraries/Vs/vcpkg/downloads/tools/msys2/21caed2f81ec917b
-- Fixing pkgconfig file: D:/di/Libraries/Vs/vcpkg/packages/openblas_x64-windows/debug/lib/pkgconfig/openblas.pc
-- Installing: D:/di/Libraries/Vs/vcpkg/packages/openblas_x64-windows/share/openblas/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 1.3 s.
Elapsed time to handle openblas:x64-windows: 3.1 min
openblas:x64-windows package ABI: 399907692d18d6dea31219f03cdeaf916ed84fdd9e8468351197628ee836fecd
Installing 2/30 blas:x64-windows@2023-04-14#1...
Building blas:x64-windows@2023-04-14#1...
-- Skipping post-build validation due to VCPKG_POLICY_EMPTY_PACKAGE
Stored binaries in 1 destinations in 35.6 ms.
Elapsed time to handle blas:x64-windows: 169 ms
blas:x64-windows package ABI: 6e5e9aebd99702046d09b866f7df2c21d4d2f47ffdeb1a52c846de1cd2633bc8
Installing 3/30 cpuinfo:x64-windows@2022-07-19#3...
Building cpuinfo:x64-windows@2022-07-19#3...
-- Note: cpuinfo only supports static library linkage. Building static library.
-- Downloading https://github.com/pytorch/cpuinfo/archive/5e63739504f0f8e18e941bd63b2d6d42536c7d90.tar.gz -> pytorch-cpuinfo-5e63739504f0f8e18e941bd63b2d6d42536c7d90.tar.gz...
-- Extracting source D:/di/Libraries/Vs/vcpkg/downloads/pytorch-cpuinfo-5e63739504f0f8e18e941bd63b2d6d42536c7d90.tar.gz
-- Using source at D:/di/Libraries/Vs/vcpkg/buildtrees/cpuinfo/src/42536c7d90-2a15ca16d1.clean
-- Found external ninja('1.12.1').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig file: D:/di/Libraries/Vs/vcpkg/packages/cpuinfo_x64-windows/lib/pkgconfig/libcpuinfo.pc
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1
-- Using cached msys2-msys2-runtime-3.5.4-2-x86_64.pkg.tar.zst.
-- Using msys root at D:/di/Libraries/Vs/vcpkg/downloads/tools/msys2/21caed2f81ec917b
-- Fixing pkgconfig file: D:/di/Libraries/Vs/vcpkg/packages/cpuinfo_x64-windows/debug/lib/pkgconfig/libcpuinfo.pc
-- Installing: D:/di/Libraries/Vs/vcpkg/packages/cpuinfo_x64-windows/share/cpuinfo/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 88.4 ms.
Elapsed time to handle cpuinfo:x64-windows: 5 s
cpuinfo:x64-windows package ABI: a740dc2c5897837227473b59a949eca99516b7a8052aad6fec422d06bc735115
Installing 4/30 cuda:[email protected]#13...
Building cuda:[email protected]#13...
-- Found CUDA V11.0.221
-- Installing: D:/di/Libraries/Vs/vcpkg/packages/cuda_x64-windows/share/cuda/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 29.6 ms.
Elapsed time to handle cuda:x64-windows: 217 ms
cuda:x64-windows package ABI: bb864d1c37aa56ab8e7f1f33e40f0b58954fdf5ed2127ae2a5888a16de76928a
Installing 5/30 cudnn:[email protected]#14...
Building cudnn:[email protected]#14...
-- Found CUDA V11.0.221
-- CUDNN_INCLUDE_DIR: CUDNN_INCLUDE_DIR-NOTFOUND
-- CUDNN_LIBRARY: CUDNN_LIBRARY-NOTFOUND
CMake Error at ports/cudnn/portfile.cmake:62 (message):
Please download CUDNN from official sources
(https://developer.nvidia.com/cudnn) and install it
Call Stack (most recent call first):
scripts/ports.cmake:192 (include)
error: building cudnn:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle cudnn:x64-windows: 139 ms
Please ensure you're using the latest port files with
git pull
andvcpkg update
.Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+cudnn
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[cudnn]+Build+error+on+x64-windows&body=Copy+issue+body+from+D%3A%2Fdi%2FLibraries%2FVs%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md
The text was updated successfully, but these errors were encountered: