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

the jax-based code on multi-host tpu #9

Open
lucasliunju opened this issue Mar 22, 2021 · 3 comments
Open

the jax-based code on multi-host tpu #9

lucasliunju opened this issue Mar 22, 2021 · 3 comments

Comments

@lucasliunju
Copy link

Hi Yang,

That's a great work. I would like to ask whether this code can run on the multi-host tpu (such as v3-32). And could you give me some advice on how to change this code for it.

Thank you very much!

Yong

@yang-song
Copy link
Owner

This code can be directly run on multi-host TPU without modification. Internally we used multi-host TPU for most of our training.

@lucasliunju
Copy link
Author

Hi Yang,

Thanks so much for your help!

Yong

@lucasliunju
Copy link
Author

lucasliunju commented Mar 23, 2021

Hi Yang,

I still have a question about how to connect jax and multi-host tpu since I have not find this part on the code.

My current code is :

from jax.config import config
# The following is required to use TPU Driver as JAX's backend.
config.FLAGS.jax_xla_backend = "tpu_driver"
config.FLAGS.jax_backend_target = "grpc://[ip address]:8470"

And I find the warning:

2021-03-23 16:47:20.111472: W external/org_tensorflow/tensorflow/compiler/xla/python/tpu_driver/client/tpu_client.cc:606] TPU Execute is taking a long time. This might be due to a deadlock between multiple TPU cores or a very slow program.

Thank you very much!

Yong

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

2 participants