Commit d600675
authored
[iris] Make initialize_jax idempotent (#6320)
initialize_jax now returns early when jax.distributed.is_initialized(),
so calling
it after JAX has already initialized the XLA backend is a no-op instead
of raising.
JAX 0.9+ added a backends_are_initialized() check inside
jax.distributed.initialize()
that turns this ordering into a hard error; pre-0.9 silently no-op'd.
Lets callers
initialize explicitly before levanter's DistributedConfig.initialize().1 parent 1d065b5 commit d600675
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
126 | 137 | | |
127 | 138 | | |
128 | 139 | | |
| |||
0 commit comments