Comments (9)
i have restarted pc and ubuntu multiple times.
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.60.01 Driver Version: 551.76 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3090 On | 00000000:01:00.0 On | N/A |
| 30% 54C P0 121W / 350W | 1642MiB / 24576MiB | 4% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
from tensorflow.
@jeanswiegers If TF is not recognizing GPU, then could you please verify the build compatibility by running the following in your WSL environment;
import tensorflow as tf
print(tf.test.is_built_with_cuda())
This should output True. If it's False, you might need to reinstall TensorFlow with GPU support. For more information on WSL with GPU support please refer to https://www.tensorflow.org/install/pip. The TensorFlow version needs to be compatible with your CUDA version.
Thank you!
from tensorflow.
@jeanswiegers If TF is not recognizing GPU, then could you please verify the build compatibility by running the following in your WSL environment;
import tensorflow as tf print(tf.test.is_built_with_cuda())
This should output True. If it's False, you might need to reinstall TensorFlow with GPU support. For more information on WSL with GPU support please refer to https://www.tensorflow.org/install/pip. The TensorFlow version needs to be compatible with your CUDA version.
Thank you!
Hi Sushreebarsa, thanks for your help. It does return True in my environment.
from tensorflow.
@jeanswiegers Thank you for your quick response!
Simply restarting your WSL instance (wsl --shutdown
) or your entire computer can resolve environment variable issues. Could you please try this once. If the issue continues then, please use nvidia-smi within your WSL terminal to confirm your RTX3090 is recognized by the NVIDIA drivers. If not, there might be an issue with the driver installation itself.
Thank you!
from tensorflow.
I managed to get it working by installing the latest supported CUDA version (12.3) Ubuntu runfile stated on tensorflows website.
Only running
pip install tensorflow[with-cuda]
doesn't work.
from tensorflow.
Working
from tensorflow.
Are you satisfied with the resolution of your issue?
Yes
No
from tensorflow.
@jeanswiegers Glad it worked fine for you.
Thank you!
from tensorflow.
Almost final and automated fix below
-
Where I found the resolution
- TF 2.16.1 Fails to work with GPUs
- Solution proposed by "sh-shahrokhi", improved by "ChristofKaufmann"
- See specially Comment by COntributor
- Related Issues
- GPU not detected on WSL2, where I have post some comments
- Tensorflow WSL GPU CUDA recognition issue RTX3090
- Once gain: tf.2.16.1 fails to recognize GPUs
- Other mention on social media
- TF 2.16.1 Fails to work with GPUs
-
Exact solution
- Temporary fix (after activating environment in which Tensorflow 2.16.1 is installed)
export NVIDIA_DIR=$(dirname $(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))) export LD_LIBRARY_PATH=$(echo ${NVIDIA_DIR}/*/lib/ | sed -r 's/\s+/:/g')${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- Automating the variable set/unset process with Anaconda (one-time setup)
- Activate your environement in which TF 2.16.1 is installed
- Two files to be created in "anaconda3/envs/<ENV_NAME>/etc/conda"
- anaconda3/envs/<ENV_NAME>/etc/conda/activate.d/env_vars.sh
#!/bin/sh export NVIDIA_DIR=$(dirname $(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))) export LD_LIBRARY_PATH=$(echo ${NVIDIA_DIR}/*/lib/ | sed -r 's/\s+/:/g')${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- anaconda3/envs/<ENV_NAME>/etc/conda/deactivate.d/env_vars.sh
#!/bin/sh unset NVIDIA_DIR unset LD_LIBRARY_PATH
- Official documentation to do this via conda.io
- Stack-overflow question where I got this Set environment vars when activating conda env
- Temporary fix (after activating environment in which Tensorflow 2.16.1 is installed)
-
What else helped me
from tensorflow.
Related Issues (20)
- which version of keras is used by latest kws_streaming HOT 4
- Convert TFlite buffer created using TF1 to TF2 TFlite buffer HOT 1
- How to contribute?
- Error in computation = RQAComputation.create(settings, verbose=True) when I use HPC. However, I do not encounter any error when I use my personal laptop for the same code and installing the same package : from pyrqa.computation import RQAComputation
- I think we should use a separate api token named for this view. We may have additional clients of the APIs in the future, and we should be able to make the decision to limit one of the other of these endpoints from those additional clients. HOT 2
- Why doesn't `The calling iterator did not fully read the dataset being cached.` appear on Google Colab? HOT 2
- How to turn off mlir during tensorflow2.13 compilation? HOT 1
- Running the same model in TF and TFLiteMicro produces different outputs
- TF-Keras mixed precision training leads to autograph errors HOT 2
- Exception encountered: Unrecognized keyword arguments: ['batch_shape'] HOT 5
- Profiler does not Seem to Output Timesteps in xplane.pb - "No step marker observed and hence the step time is unknown" from Tensorboard HOT 3
- Tensorflow compatibility with pyinstaller HOT 2
- Memory leak when jit compiling
- Add support for TensorRT 10
- `tensorflow::RunOptions::RunOptions(void)` symbol missing in built tensorflow.dll (Windows)
- Cannot find any way to install tensorflow<=2.15.0 HOT 3
- Suspected Corner Case in XLA Compilation - vectorized_sum, conditional, scatter_nd_update Complains about Dynamic Shape when we should Know it
- is_installed check for tensorflow-cpu failed as 'spec is None'
- TFLite Multipose model input error for android
- Please update the links on documentation page, pointing to the new location - moved to /src
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow.