Skip to content

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

@gongx030

Description

@gongx030

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions