'Tensorflow my GPU is not recognized and There are many dll errors
I'm too new with tensorflow and keras, actually I'm trying first to install it correctly. I used Anaconda to make it easier. My question is probabily related to the installation but there might be some erros in script too. Therefore, above, are all steps I made to install tensorflow on anaconda:
#1 - Install with Anaconda prompt as admin
conda create -n tf_gpu python==3.8
conda activate tf_gpu
conda install cudatoolkit=11.2 cudnn=8.1 -c=conda-forge
pip install --upgrade tensorflow-gpu==2.6.0
#2 - test integration
python
import tensorflow as tf
print(tf.__version__)
tf.config.list_physical_devices('GPU')
Test results: I don't know Why none GPU are associated even installing everything, I don't know if the problem is related to this ... (I have a geforce-940mx) ?
Revelant parts of stackTrace:
Many dll erros appeared (dlerror), maybe it's because something wrong with installation:
cufft64_10.dll not found
cublas64_11.dll not found
curand64_10.dll not found
...
#Conclusion
I need help from you guys. I tried many aways to install tensorflow correctly I'm getting headache, everyone said to install it using a new enviroment in anaconda, the steps looks easy, but many issues are happening, why?
#Aditional information
Tested scripts using VsCode
I have Windowns 10
I tried with more than one version using this link: GPU tf installation
Solution 1:[1]
Please follow the below steps to have GPU support in your system.
- Download the right
NVIDIA driver
as per your product type(Geforce-940mx)
- Download and install
cuDNN, CUDA, CUPTI
according to installed Tensorflow version in your system. You can check test build configurations here. - Set the path
(%PATH%)
for each of these in environment variable of your system
For reference,
The detailed instruction steps (with all required links to download NVIDIA driver, CUDA, cuDNN, CUPTI) are mentioned in this Windows setup link to enable GPU support in your system.
Then create a new virtual environment using Anaconda command prompt
conda create -n tf_gpu1 python==3.8
conda activate tf_gpu1
Install tensorlfow in this (tf_gpu1) virtual environment
pip install tensorflow
Now, check with the below command if tensorflow is able to access the GPU in your system. You can follow the test inegration
steps mentioned by you.
python
import tensorflow as tf
tf.__version__ # This code will show the installed tensorflow version
tf.config.list_physical_devices('GPU') # This will show output in boolean value 'True' or 'False'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |