@petronny Sorry for the delay in answering your questions.
-
If you remove cuda or cudnn (since both are needed to compile and run dlib with cuda support) with
pacman -Rdd cuda cudnn
, python-dlib-cuda will not fallback to using only the cpu. In fact importing dlib will simply fail with an ImportError with not being able to open the shared object file(s) (either cuda or cudnn). -
I do not fully understand your question, I will assume that you are asking if it is possible to replace cuda with another dependency and still have be capable of using dlib in python. You cannot replace cuda with something else, or only with cudnn. You need both cuda and cudnn, hence why they are not only make dependencies, but also dependencies.
The dependency issue and the need to recompile if you would want to switch from having cuda support to using cpu only are likely the reason why python dlib was originally split into a cuda and non-cuda version.
If you have any other questions please don't hesitate to ask.
Pinned Comments
petronny commented on 2024-03-30 13:11 (UTC) (edited on 2024-03-30 13:13 (UTC) by petronny)
Set
_build_cpu
and_build_cuda
to 1 and 0 to build or not build the CPU or CUDA version.If
options=(!lto)
has no effect, please check if it's still enabled in/etc/makepkg.conf
.petronny commented on 2023-11-28 04:57 (UTC)
Prebuilt binaries of this package can be found in arch4edu.