30.08.2025, 08:36
In dlib-whl
there are 2 type of releases: 1) "alpha" which is CUDA enabled 2) "non-alpha" which is CPU only
In the torch package was installed the "non-alpha" version.
You can see this by looking to file: __init__.py
Inside the version released in the torch package there is this code:
As you can see the load of DLL is disabled ( 'OFF' == 'ON' )
Dan
P.S. the "alpha" version of 20.0.0 is working on my side
there are 2 type of releases: 1) "alpha" which is CUDA enabled 2) "non-alpha" which is CPU only
In the torch package was installed the "non-alpha" version.
You can see this by looking to file: __init__.py
Inside the version released in the torch package there is this code:
# Copyright (C) 2020 Davis E. King (davis@dlib.net)
# License: Boost Software License See LICENSE.txt for the full license.
def add_lib_to_dll_path(path):
""" On windows you must call os.add_dll_directory() to allow linking to external DLLs. See
https://docs.python.org/3.8/whatsnew/3.8.html#bpo-36085-whatsnew. This function adds the folder
containing path to the dll search path.
"""
try:
import os
os.add_dll_directory(os.path.join(os.path.dirname(path), '../../bin'))
except (AttributeError,KeyError,FileNotFoundError):
pass
if 'OFF' == 'ON':
add_lib_to_dll_path('C:/Program Files/NVIDIA/CUDNN/v9.8/lib/x64/cudnn.lib')
add_lib_to_dll_path('C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.8/lib/x64/cudart.lib')
from _dlib_pybind11 import *
from _dlib_pybind11 import __version__, __time_compiled__
As you can see the load of DLL is disabled ( 'OFF' == 'ON' )
Dan
P.S. the "alpha" version of 20.0.0 is working on my side