TPU not found on VM
See original GitHub issueDescription
Hello
I’m running a TPU v3-8 VM on Google. On the VM I installed jax with pip install "jax[tpu]==0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
.
Unfortunately, I’m getting the message No GPU/TPU found, falling back to CPU.
when issuing jax.device_count()
. The same holds for pip install jax==0.2.12
. Only when I’m using pip install "jax[tpu]>=0.2.16" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
(newest jax version), it works. But I need jax version 0.2.12 or 0.2.16.
How can I get it running with these versions?
What jax/jaxlib version are you using?
jax 0.2.16
Which accelerator(s) are you using?
TPU
Additional system info
No response
NVIDIA GPU info
No response
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
TPU not found on Google VM (jax version 0.2.16)
1 Answer 1 ... As mentioned there, " The underlying problem is that this version of jax still expected libtpu.so to be automatically...
Read more >Cloud TPU VM user's guide
This command lists the Cloud TPU resources in the specified zone. If no resources are currently set up, the output will just show...
Read more >Can't create Cloud TPU VM/node since May 4 - Issue Tracker
Since some time around May 4, I have not been able to create a Cloud TPU node. "CREATE TPU NODE" GUI crashes when...
Read more >Google's TPU Research Cloud! Free TPU hardware for Deep ...
Currently, TPU hardware is not available commercially and can only be accessed via Google. ... Run the following command to create a TPU-VM...
Read more >Use TPUs | TensorFlow Core
They are available through Google Colab, the TPU Research Cloud, and Cloud TPU. ... make sure the missing libraries mentioned above are installed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That didn’t take as long as I expected 😃
For 0.2.16, you can workaround by setting the env var
TPU_LIBRARY_PATH=/home/skyewm/.local/lib/python3.8/site-packages/libtpu/libtpu.so
. (You may have to adjust that path depending on where libtpu-nightly was installed;locate libtpu.so
may be helpful)The underlying problem is that this version of jax still expected libtpu.so to be automatically installed in the VM image (https://github.com/google/jax/blob/jax-v0.2.16/jax/_src/cloud_tpu_init.py#L104), which the TPU VM base image no longer does.
Please see below the content of tpu_driver.INFO.
I’m not able to upgrade jax because I want to use jax for fine-tuning GPT-J using the following tutorial: https://github.com/kingoflolz/mesh-transformer-jax/blob/master/howto_finetune.md With newer Jax versions this does not work.