"docs/vscode:/vscode.git/clone" did not exist on "4acbfbf13b300e25acbe2516db8fa13a640cad3a"
  • Roy Hvaara's avatar
    [JAX] Replace uses of jax.devices("cpu") with jax.local_devices(backend="cpu") (#5864) · 2695ba8e
    Roy Hvaara authored
    
    
    An upcoming change to JAX will include non-local (addressable) CPU devices in jax.devices() when JAX is used multicontroller-style, where there are multiple Python processes.
    
    This change preserves the current behavior by replacing uses of jax.devices("cpu"), which previously only returned local devices, with jax.local_devices("cpu"), which will return local devices both now and in the future.
    
    This change is always safe (i.e., it should always preserve the previous behavior), but it may sometimes be unnecessary if code is never used in a multicontroller setting.
    Co-authored-by: default avatarPeter Hawkins <phawkins@google.com>
    2695ba8e
modeling_flax_utils.py 26.8 KB