jax.array_garbage_collection_guard#
- jax.array_garbage_collection_guard = <jax._src.config.State object>#
Context manager for jax_array_garbage_collection_guard config option.
Select garbage collection guard level for
jax.Arrayobjects.This option can be used to control what happens when a
jax.Arrayobject is garbage collected. It is desirable forjax.Arrayobjects to be freed by Python reference counting rather than garbage collection in order to avoid device memory being held by the arrays until garbage collection occurs.Valid values are:
allow: do not log garbage collection ofjax.Arrayobjects.log: log an error when ajax.Arrayis garbage collected.fatal: fatal error if ajax.Arrayis garbage collected.
Default is
allow. Note that not all cycles may be detected.- Parameters:
new_val (Any)