-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different GPU detection between python command line and Jupyter Notebook Cell #6886
Comments
Hi @fiammante thank you for submitting this issue! Can you reproduce this issue in IPython? |
It works well with IPython, works also well with docker Tensorflow image with Jupyter. Problem only exists when lauching jupyter from WSL Ubunto . IPython capture below (tf) fiammante@DESKTOP-3AQ037Q:~$ ipython In [1]: import tensorflow as tf; print(tf.config.list_physical_devices('GPU')) |
Same problem here on linux |
@JasonWeill I would like to work on this issue |
@vaibhavnohria1 Thanks for your interest! I've assigned you to this issue; please submit a pull request when your change is ready for review. |
Describe the bug
Tensorflow GPU support existing in command line python is not available in Jupyter notebooks started from same conda environment.
To Reproduce
Follow the steps to install Tensorflow GPU support on Windows WSL (using UBUNTU 22.04.2 LTS distro)
https://www.tensorflow.org/install/pip#windows-wsl2
The verification command
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
returns
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Install jupyter in the miniconda environment defined in the tensorflow install page.
Launch jupyter notebook.exe from the same command line environment
Same Python code from a notebook cell
import tensorflow as tf;
print(tf.config.list_physical_devices('GPU'))
return and empty list []
Expected behavior
Notebook cell should display same result as command line [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Screenshots
Desktop (please complete the following information):
Additional context
the jupyter command help under Ubuntu states to use jupyter notebook.exe (not jupyter notebook).
same behavior after installing nb_conda.
The text was updated successfully, but these errors were encountered: