Skip to content
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

R tensorflow (2.8) cannot detect GPU on Google Colab #534

Open
gongx030 opened this issue May 19, 2022 · 1 comment
Open

R tensorflow (2.8) cannot detect GPU on Google Colab #534

gongx030 opened this issue May 19, 2022 · 1 comment

Comments

@gongx030
Copy link

I have been using R's tensorflow on Google colab's R runtime (with GPU accelerator) and it has been very smooth until very recently. In recent few days, I noticed that R's tensorflow failed to detect GPUs even on a GPU runtime. Here is a gist to reproduce the error.

I also ran R/tensorflow on Colab's terminal, and it gave the following error.

/content# R

R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(tensorflow)
> tf$config$list_physical_devices('GPU')
Loaded Tensorflow version 2.8.0
2022-05-19 05:40:15.123653: E tensorflow/stream_executor/cuda/cuda_driver.cc:271] failed call to cuInit: CUDA_ERROR_SYSTEM_DRIVER_MISMATCH: system has unsupported display driver / cuda driver combination
2022-05-19 05:40:15.123826: E tensorflow/stream_executor/cuda/cuda_diagnostics.cc:313] kernel version 460.32.3 does not match DSO version 515.43.4 -- cannot find working devices in this configuration
list()
> 

While under Python it was able to find the GPUs:

/content# python
Python 3.7.13 (default, Apr 24 2022, 01:04:09) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.config.list_physical_devices('GPU')
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

Are there any solutions for this issue? Thanks a lot.

@gongx030
Copy link
Author

It should be noted that when I previously use R's tensorflow on Google colab's GPU runtime, there was no need to run install_tensorflow() after installing R's tensorflow package. It appears to me that the R's tensorflow package automatically recognized the installed Python's tensorflow on Colab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant