I am trying to enable the use of GPU for machine learning but I am encountering this issue of “OSError: [WinError 127] The specified procedure could not be found.Error loading “C:Usersnameanaconda3Libsite-packagestorchlibc10_cuda.dll” or one of its dependencies.”.
Currently, I am using a windows laptop with NVIDIA 3050 GPU with Python as my main development language.
Noted that the file exist as the torch libary is directly downloaded using pip
. Therefore, this error technically should not occur.
Initially, I have recieved a similar error “[WinError 126] The specified procedure could not be found.” but I have updated and install C/C++ compiler for the VisualStudio 2022, which solves the [WinError 126} but I got [WinError 127] instead.
To install and enable the GPU, I am following this tutorial with the following steps.
-
Install VisualStudio -> Download All
-
Install Pytorch (pip) -> CUDA 12.4
-
Install CUDA Toolkit (12.6)
-
Download cuDNN “Download cuDNN v8.9.7 (December 5th, 2023), for CUDA 12.x”
-
Paste the contents of the cuDNN into ‘NVIDIA GPU Computing Tool Kit’ by their respective folder names.
The insalled CUDA has been verified that it is added to the environment
To debug this issue, I also follow this recently updated video suggesting the download of C/C++ compiler. However, this does not revolved my issue.
Therefore, I am creating this post to inquire wheter anyone have encounter this similar issue when activating CUDA cores and how to resolve this issue.
Thank you in advance for all your insights!