jax icon indicating copy to clipboard operation
jax copied to clipboard

[BUG] Cannot recognise CUDA device when installed along with tensorflow

Open OutisLi opened this issue 3 weeks ago • 1 comments

Description

I created a new environment using mamba, and installed uv in it, and then I want to install both jax and tensorflow using uv pip install -U tensorflow "jax[cuda12]" since the cuda toolkit on my device is 12.8. After the installation, I ran python and import jax, but jax.devices cannot recognise cuda devices as below:

Image

If installed individually through uv pip install -U "jax[cuda12]" without tensorflow, it works normally. I also tried uv pip install -U tensorflow "jax[cuda-local]", but it didn't work as well. I also tried on another machine, the result is the same

System info (python version, jaxlib version, accelerator, etc.)

  • latest jax[cuda12] through pip
  • cuda 12.8
  • ubuntu 24.04 LTS

OutisLi avatar Dec 11 '25 00:12 OutisLi

Could you show the output of pip list? It's possible installing tensorflow gets you an incompatible version of cudnn.

justinjfu avatar Dec 11 '25 10:12 justinjfu