jax
jax copied to clipboard
jax.lax.create_token() always returns the same object
Description
The method jax.lax.create_token() always returns the same singleton object, meaning all tokens are the same. This may be an issue if you want to do concurrent things.
>>> jax.lax.create_token()
<jax._src.core.Token object at 0x7fff35329930>
>>> jax.lax.create_token()
<jax._src.core.Token object at 0x7fff35329930>
>>> jax.lax.create_token()
<jax._src.core.Token object at 0x7fff35329930>
>>> jax.lax.create_token()
<jax._src.core.Token object at 0x7fff35329930>
What jax/jaxlib version are you using?
0.4.25
Which accelerator(s) are you using?
GPU
Additional system info?
Linux
NVIDIA GPU info
No response
Hi @chaserileyroberts
This issue appears to be resolved with JAX 0.4.28. I tested this on Colab GPU using JAX cuda version 0.4.28. Now, jax.lax.create_token() produces different tokens at different runs.
Please find the gist for reference.
Thank you
I think @yueshengys fixed this... Yue confirm?
Yes, it's been fixed since https://github.com/google/jax/pull/20706.