Best viewed here.
- Breaking changes
- Deleted {func}
jax.scipy.linalg.polar_unitary, which was a deprecated JAX extension to the scipy API. Use {func}jax.scipy.linalg.polarinstead.
- Deleted {func}
-
Breaking changes
- Deleted
jax.experimental.callback - Operations with dimensions in presence of jax2tf shape polymorphism have
been generalized to work in more scenarios, by converting the symbolic
dimension to JAX arrays. Operations involving symbolic dimensions and
np.ndarraynow can raise errors when the result is used as a shape value ({jax-issue}#14106). - jaxpr objects now raise an error on attribute setting in order to avoid
problematic mutations ({jax-issue}
14102)
- Deleted
-
Changes
- {func}
jax2tf.call_tfhas a new parameterhas_side_effects(defaultTrue) that can be used to declare whether an instance can be removed or replicated by JAX optimizations such as dead-code elimination ({jax-issue}#13980). - Added more support for floordiv and mod for jax2tf shape polymorphism. Previously,
certain division operations resulted in errors in presence of symbolic dimensions
({jax-issue}
#14108).
- {func}
- Changes
- Set JAX_USE_PJRT_C_API_ON_TPU=1 to enable new Cloud TPU runtime, featuring automatic device memory defragmentation.
- Changes
- Support for Python 3.7 has been dropped, in accordance with JAX's
{ref}
version-support-policy. - We introduce
jax.Arraywhich is a unified array type that subsumesDeviceArray,ShardedDeviceArray, andGlobalDeviceArraytypes in JAX. Thejax.Arraytype helps make parallelism a core feature of JAX, simplifies and unifies JAX internals, and allows us to unifyjitandpjit.jax.Arrayhas been enabled by default in JAX 0.4 and makes some breaking change to thepjitAPI. The jax.Array migration guide can help you migrate your codebase tojax.Array. You can also look at the Distributed arrays and automatic parallelization tutorial to understand the new concepts. PartitionSpecandMeshare now out of experimental. The new API endpoints arejax.sharding.PartitionSpecandjax.sharding.Mesh.jax.experimental.maps.Meshandjax.experimental.PartitionSpecare deprecated and will be removed in 3 months.with_sharding_constraints new public endpoint isjax.lax.with_sharding_constraint.- If using ABSL flags together with
jax.config, the ABSL flag values are no longer read or written after the JAX configuration options are initially populated from the ABSL flags. This change improves performance of readingjax.configoptions, which are used pervasively in JAX. - The jax2tf.call_tf function now uses for TF lowering the first TF device of the same platform as used by the embedding JAX computation. Before, it was using the 0th device for the JAX-default backend.
- A number of
jax.numpyfunctions now have their arguments marked as positional-only, matching NumPy. jnp.msortis now deprecated, following the deprecation ofnp.msortin numpy 1.24. It will be removed in a future release, in accordance with the {ref}api-compatibilitypolicy. It can be replaced withjnp.sort(a, axis=0).
- Support for Python 3.7 has been dropped, in accordance with JAX's
{ref}
- Changes
- Support for Python 3.7 has been dropped, in accordance with JAX's
{ref}
version-support-policy. - The behavior of
XLA_PYTHON_CLIENT_MEM_FRACTION=.XXhas been changed to allocate XX% of the total GPU memory instead of the previous behavior of using currently available GPU memory to calculate preallocation. Please refer to GPU memory allocation for more details. - The deprecated method
.block_host_until_ready()has been removed. Use.block_until_ready()instead.
- Support for Python 3.7 has been dropped, in accordance with JAX's
{ref}
- The release was yanked.
- The release was yanked.
- Changes
- {func}
jax.numpy.linalg.pinvnow supports thehermitianoption. - {func}
jax.scipy.linalg.hessenbergis now supported on CPU only. Requires jaxlib > 0.3.24. - New functions {func}
jax.lax.linalg.hessenberg, {func}jax.lax.linalg.tridiagonal, and {func}jax.lax.linalg.householder_productwere added. Householder reduction is currently CPU-only and tridiagonal reductions are supported on CPU and GPU only. - The gradients of
svdandjax.numpy.linalg.pinvare now computed more economically for non-square matrices.
- {func}
- Breaking Changes
- Deleted the
jax_experimental_name_stackconfig option. - Convert a string
axis_namesarguments to the {class}jax.experimental.maps.Meshconstructor into a singleton tuple instead of unpacking the string into a sequence of character axis names.
- Deleted the
- Changes
- Added support for tridiagonal reductions on CPU and GPU.
- Added support for upper Hessenberg reductions on CPU.
- Bugs
- Fixed a bug that meant that frames in tracebacks captured by JAX were incorrectly mapped to source lines under Python 3.10+
- Changes
- JAX should be faster to import. We now import scipy lazily, which accounted for a significant fraction of JAX's import time.
- Setting the env var
JAX_PERSISTENT_CACHE_MIN_COMPILE_TIME_SECS=$Ncan be used to limit the number of cache entries written to the persistent cache. By default, computations that take 1 second or more to compile will be cached.- Added {func}
jax.scipy.stats.mode.
- Added {func}
- The default device order used by
pmapon TPU if no order is specified now matchesjax.devices()for single-process jobs. Previously the two orderings differed, which could lead to unnecessary copies or out-of-memory errors. Requiring the orderings to agree simplifies matters.
- Breaking Changes
- {func}
jax.numpy.gradientnow behaves like most other functions in {mod}jax.numpy, and forbids passing lists or tuples in place of arrays ({jax-issue}#12958) - Functions in {mod}
jax.numpy.linalgand {mod}jax.numpy.fftnow uniformly require inputs to be array-like: i.e. lists and tuples cannot be used in place of arrays. Part of {jax-issue}#7737.
- {func}
- Deprecations
jax.sharding.MeshPspecShardinghas been renamed tojax.sharding.NamedSharding.jax.sharding.MeshPspecShardingname will be removed in 3 months.
- Changes
- Buffer donation now works on CPU. This may break code that marked buffers for donation on CPU but relied on donation not being implemented.
- Changes
- Update Colab TPU driver version for new jaxlib release.
- Changes
- Add
JAX_PLATFORMS=tpu,cpuas default setting in TPU initialization, so JAX will raise an error if TPU cannot be initialized instead of falling back to CPU. SetJAX_PLATFORMS=''to override this behavior and automatically choose an available backend (the original default), or setJAX_PLATFORMS=cputo always use CPU regardless of if the TPU is available.
- Add
- Deprecations
- Several test utilities deprecated in JAX v0.3.8 are now removed from
{mod}
jax.test_util.
- Several test utilities deprecated in JAX v0.3.8 are now removed from
{mod}
- GitHub commits.
- Changes
- The persistent compilation cache will now warn instead of raising an
exception on error ({jax-issue}
#12582), so program execution can continue if something goes wrong with the cache. SetJAX_RAISE_PERSISTENT_CACHE_ERRORS=trueto revert this behavior.
- The persistent compilation cache will now warn instead of raising an
exception on error ({jax-issue}
- Bug fixes:
- Adds missing
.pyifiles that were missing from the previous release ({jax-issue}#12536). - Fixes an incompatibility between
jax0.3.19 and the libtpu version it pinned ({jax-issue}#12550). Requires jaxlib 0.3.20. - Fix incorrect
pipurl insetup.pycomment ({jax-issue}#12528).
- Adds missing
- GitHub commits.
- Bug fixes
- Fixes support for limiting the visible CUDA devices via
jax_cuda_visible_devicesin distributed jobs. This functionality is needed for the JAX/SLURM integration on GPU ({jax-issue}#12533).
- Fixes support for limiting the visible CUDA devices via
- GitHub commits.
- Fixes required jaxlib version.
- GitHub commits.
- Changes
- Ahead-of-time lowering and compilation functionality (tracked in
{jax-issue}
#7733) is stable and public. See the overview and the API docs for {mod}jax.stages. - Introduced {class}
jax.Array, intended to be used for bothisinstancechecks and type annotations for array types in JAX. Notice that this included some subtle changes to howisinstanceworks for {class}jax.numpy.ndarrayfor jax-internal objects, as {class}jax.numpy.ndarrayis now a simple alias of {class}jax.Array.
- Ahead-of-time lowering and compilation functionality (tracked in
{jax-issue}
- Breaking changes
jax._srcis no longer imported into the from the publicjaxnamespace. This may break users that were using JAX internals.jax.soft_pmaphas been deleted. Please usepjitorxmapinstead.jax.soft_pmapis undocumented. If it were documented, a deprecation period would have been provided.
- GitHub commits.
- Bugs
- Fix corner case issue in gradient of
lax.powwith an exponent of zero ({jax-issue}12041)
- Fix corner case issue in gradient of
- Breaking changes
- {func}
jax.checkpoint, also known as {func}jax.remat, no longer supports theconcreteoption, following the previous version's deprecation; see JEP 11830.
- {func}
- Changes
- Added {func}
jax.pure_callbackthat enables calling back to pure Python functions from compiled functions (e.g. functions decorated withjax.jitorjax.pmap).
- Added {func}
- Deprecations:
- The deprecated
DeviceArray.tile()method has been removed. Use {func}jax.numpy.tile({jax-issue}#11944). DeviceArray.to_py()has been deprecated. Usenp.asarray(x)instead.
- The deprecated
- GitHub commits.
- Breaking changes
- Support for NumPy 1.19 has been dropped, per the deprecation policy. Please upgrade to NumPy 1.20 or newer.
- Changes
- Added {mod}
jax.debugthat includes utilities for runtime value debugging such at {func}jax.debug.printand {func}jax.debug.breakpoint. - Added new documentation for runtime value debugging
- Added {mod}
- Deprecations
- {func}
jax.mask{func}jax.shapecheckAPIs have been removed. See {jax-issue}#11557. - {mod}
jax.experimental.loopshas been removed. See {jax-issue}#10278for an alternative API. - {func}
jax.tree_util.tree_multimaphas been removed. It has been deprecated since JAX release 0.3.5, and {func}jax.tree_util.tree_mapis a direct replacement. - Removed
jax.experimental.stax; it has long been a deprecated alias of {mod}jax.example_libraries.stax. - Removed
jax.experimental.optimizers; it has long been a deprecated alias of {mod}jax.example_libraries.optimizers. - {func}
jax.checkpoint, also known as {func}jax.remat, has a new implementation switched on by default, meaning the old implementation is deprecated; see JEP 11830.
- {func}
- GitHub commits.
- Changes
JaxTestCaseandJaxTestLoaderhave been removed fromjax.test_util. These classes have been deprecated since v0.3.1 ({jax-issue}#11248).- Added {class}
jax.scipy.gaussian_kde({jax-issue}#11237). - Binary operations between JAX arrays and built-in collections (
dict,list,set,tuple) now raise aTypeErrorin all cases. Previously some cases (particularly equality and inequality) would return boolean scalars inconsistent with similar operations in NumPy ({jax-issue}#11234). - Several {mod}
jax.tree_utilroutines accessed as top-level JAX package imports are now deprecated, and will be removed in a future JAX release in accordance with the {ref}api-compatibilitypolicy:- {func}
jax.treedef_is_leafis deprecated in favor of {func}jax.tree_util.treedef_is_leaf - {func}
jax.tree_flattenis deprecated in favor of {func}jax.tree_util.tree_flatten - {func}
jax.tree_leavesis deprecated in favor of {func}jax.tree_util.tree_leaves - {func}
jax.tree_structureis deprecated in favor of {func}jax.tree_util.tree_structure - {func}
jax.tree_transposeis deprecated in favor of {func}jax.tree_util.tree_transpose - {func}
jax.tree_unflattenis deprecated in favor of {func}jax.tree_util.tree_unflatten
- {func}
- The
sym_posargument of {func}jax.scipy.linalg.solveis deprecated in favor ofassume_a='pos', following a similar deprecation in {func}scipy.linalg.solve.
- GitHub commits.
- Breaking changes
- {func}
jax.experimental.compilation_cache.initialize_cachedoes not supportmax_cache_size_ bytesanymore and will not get that as an input. JAX_PLATFORMSnow raises an exception when platform initialization fails.
- {func}
- Changes
- Fixed compatibility problems with NumPy 1.23.
- {func}
jax.numpy.linalg.slogdetnow accepts an optionalmethodargument that allows selection between an LU-decomposition based implementation and an implementation based on QR decomposition. - {func}
jax.numpy.linalg.qrnow supportsmode="raw". pickle,copy.copy, andcopy.deepcopynow have more complete support when used on jax arrays ({jax-issue}#10659). In particular:pickleanddeepcopypreviously returnednp.ndarrayobjects when used on aDeviceArray; nowDeviceArrayobjects are returned. Fordeepcopy, the copied array is on the same device as the original. Forpicklethe deserialized array will be on the default device.- Within function transformations (i.e. traced code),
deepcopyandcopypreviously were no-ops. Now they use the same mechanism asDeviceArray.copy(). - Calling
pickleon a traced array now results in an explicitConcretizationTypeError.
- The implementation of singular value decomposition (SVD) and symmetric/Hermitian eigendecomposition should be significantly faster on TPU, especially for matrices above 1000x1000 or so. Both now use a spectral divide-and-conquer algorithm for eigendecomposition (QDWH-eig).
- {func}
jax.numpy.ldexpno longer silently promotes all inputs to float64, instead it promotes to float32 for integer inputs of size int32 or smaller ({jax-issue}#10921). - Add a
create_perfetto_linkoption to {func}jax.profiler.start_traceand {func}jax.profiler.start_trace. When used, the profiler will generate a link to the Perfetto UI to view the trace. - Changed the semantics of {func}
jax.profiler.start_server(...)to store the keepalive globally, rather than requiring the user to keep a reference to it. - Added {func}
jax.random.generalized_normal. - Added {func}
jax.random.ball. - Added {func}
jax.default_device. - Added a
python -m jax.collect_profilescript to manually capture program traces as an alternative to the Tensorboard UI. - Added a
jax.named_scopecontext manager that adds profiler metadata to Python programs (similar tojax.named_call). - In scatter-update operations (i.e. :attr:
jax.numpy.ndarray.at), unsafe implicit dtype casts are deprecated, and now result in aFutureWarning. In a future release, this will become an error. An example of an unsafe implicit cast isjnp.zeros(4, dtype=int).at[0].set(1.5), in which1.5previously was silently truncated to1. - {func}
jax.experimental.compilation_cache.initialize_cachenow supports gcs bucket path as input. - Added {func}
jax.scipy.stats.gennorm. - {func}
jax.numpy.rootsis now better behaved whenstrip_zeros=Falsewhen coefficients have leading zeros ({jax-issue}#11215).
- GitHub commits.
- x86-64 Mac wheels now require Mac OS 10.14 (Mojave) or newer. Mac OS 10.14 was released in 2018, so this should not be a very onerous requirement.
- The bundled version of NCCL was updated to 2.12.12, fixing some deadlocks.
- The Python flatbuffers package is no longer a dependency of jaxlib.
- GitHub commits.
- Changes
- Fixes #10717.
- GitHub commits.
- Changes
- {func}
jax.lax.eighnow accepts an optionalsort_eigenvaluesargument that allows users to opt out of eigenvalue sorting on TPU.
- {func}
- Deprecations
- Non-array arguments to functions in {mod}
jax.lax.linalgare now marked keyword-only. As a backward-compatibility step passing keyword-only arguments positionally yields a warning, but in a future JAX release passing keyword-only arguments positionally will fail. However, most users should prefer to use {mod}jax.numpy.linalginstead. - {func}
jax.scipy.linalg.polar_unitary, which was a JAX extension to the scipy API, is deprecated. Use {func}jax.scipy.linalg.polarinstead.
- Non-array arguments to functions in {mod}
- GitHub commits.
- Changes
- TF commit fixes an issue in the MHLO canonicalizer that caused constant folding to take a long time or crash for certain programs.
- GitHub commits.
- Changes
- Added support for fully asynchronous checkpointing for GlobalDeviceArray.
- GitHub commits.
- Changes
- {func}
jax.numpy.linalg.svdon TPUs uses a qdwh-svd solver. - {func}
jax.numpy.linalg.condon TPUs now accepts complex input. - {func}
jax.numpy.linalg.pinvon TPUs now accepts complex input. - {func}
jax.numpy.linalg.matrix_rankon TPUs now accepts complex input. - {func}
jax.scipy.cluster.vq.vqhas been added. jax.experimental.maps.meshhas been deleted. Please usejax.experimental.maps.Mesh. Please see https://jax.readthedocs.io/en/latest/_autosummary/jax.experimental.maps.Mesh.html#jax.experimental.maps.Mesh for more information.- {func}
jax.scipy.linalg.qrnow returns a length-1 tuple rather than the raw array whenmode='r', in order to match the behavior ofscipy.linalg.qr({jax-issue}#10452) - {func}
jax.numpy.take_along_axisnow takes an optionalmodeparameter that specifies the behavior of out-of-bounds indexing. By default, invalid values (e.g., NaN) will be returned for out-of-bounds indices. In previous versions of JAX, invalid indices were clamped into range. The previous behavior can be restored by passingmode="clip". - {func}
jax.numpy.takenow defaults tomode="fill", which returns invalid values (e.g., NaN) for out-of-bounds indices. - Scatter operations, such as
x.at[...].set(...), now have"drop"semantics. This has no effect on the scatter operation itself, but it means that when differentiated the gradient of a scatter will yield zero cotangents for out-of-bounds indices. Previously out-of-bounds indices were clamped into range for the gradient, which was not mathematically correct. - {func}
jax.numpy.take_along_axisnow raises aTypeErrorif its indices are not of an integer type, matching the behavior of {func}numpy.take_along_axis. Previously non-integer indices were silently cast to integers. - {func}
jax.numpy.ravel_multi_indexnow raises aTypeErrorif itsdimsargument is not of an integer type, matching the behavior of {func}numpy.ravel_multi_index. Previously non-integerdimswas silently cast to integers. - {func}
jax.numpy.splitnow raises aTypeErrorif itsaxisargument is not of an integer type, matching the behavior of {func}numpy.split. Previously non-integeraxiswas silently cast to integers. - {func}
jax.numpy.indicesnow raises aTypeErrorif its dimensions are not of an integer type, matching the behavior of {func}numpy.indices. Previously non-integer dimensions were silently cast to integers. - {func}
jax.numpy.diagnow raises aTypeErrorif itskargument is not of an integer type, matching the behavior of {func}numpy.diag. Previously non-integerkwas silently cast to integers. - Added {func}
jax.random.orthogonal.
- {func}
- Deprecations
- Many functions and objects available in {mod}
jax.test_utilare now deprecated and will raise a warning on import. This includescases_from_list,check_close,check_eq,device_under_test,format_shape_dtype_string,rand_uniform,skip_on_devices,with_config,xla_bridge, and_default_tolerance({jax-issue}#10389). These, along with previously-deprecatedJaxTestCase,JaxTestLoader, andBufferDonationTestCase, will be removed in a future JAX release. Most of these utilites can be replaced by calls to standard python & numpy testing utilities found in e.g. {mod}unittest, {mod}absl.testing, {mod}numpy.testing, etc. JAX-specific functionality such as device checking can be replaced through the use of public APIs such as {func}jax.devices. Many of the deprecated utilities will still exist in {mod}jax._src.test_util, but these are not public APIs and as such may be changed or removed without notice in future releases.
- Many functions and objects available in {mod}
- GitHub commits.
- Changes:
- Fixed a performance problem if the indices passed to
{func}
jax.numpy.take_along_axiswere broadcasted ({jax-issue}#10281). - {func}
jax.scipy.special.expitand {func}jax.scipy.special.logitnow require their arguments to be scalars or JAX arrays. They also now promote integer arguments to floating point. - The
DeviceArray.tile()method is deprecated, because numpy arrays do not have atile()method. As a replacement for this, use {func}jax.numpy.tile({jax-issue}#10266).
- Fixed a performance problem if the indices passed to
{func}
- Changes:
- Linux wheels are now built conforming to the
manylinux2014standard, instead ofmanylinux2010.
- Linux wheels are now built conforming to the
- GitHub commits.
- Changes:
- Upgraded libtpu wheel to a version that fixes a hang when initializing a TPU pod. Fixes #10218.
- Deprecations:
- {mod}
jax.experimental.loopsis being deprecated. See {jax-issue}#10278for an alternative API.
- {mod}
- GitHub commits.
- Changes:
- added {func}
jax.random.loggamma& improved behavior of {func}jax.random.betaand {func}jax.random.dirichletfor small parameter values ({jax-issue}#9906). - the private
lax_numpysubmodule is no longer exposed in thejax.numpynamespace ({jax-issue}#10029). - added array creation routines {func}
jax.numpy.frombuffer, {func}jax.numpy.fromfunction, and {func}jax.numpy.fromstring({jax-issue}#10049). DeviceArray.copy()now returns aDeviceArrayrather than anp.ndarray({jax-issue}#10069)- added {func}
jax.scipy.linalg.rsf2csf jax.experimental.sharded_jithas been deprecated and will be removed soon.
- added {func}
- Deprecations:
- {func}
jax.nn.normalizeis being deprecated. Use {func}jax.nn.standardizeinstead ({jax-issue}#9899). - {func}
jax.tree_util.tree_multimapis deprecated. Use {func}jax.tree_util.tree_mapinstead ({jax-issue}#5746). jax.experimental.sharded_jitis deprecated. Usepjitinstead.
- {func}
- Bug fixes
- Fixed a bug where double-precision complex-to-real IRFFTs would mutate their
input buffers on GPU ({jax-issue}
#9946). - Fixed incorrect constant-folding of complex scatters ({jax-issue}
#10159)
- Fixed a bug where double-precision complex-to-real IRFFTs would mutate their
input buffers on GPU ({jax-issue}
- GitHub commits.
- Changes:
- The functions
jax.ops.index_update,jax.ops.index_add, which were deprecated in 0.2.22, have been removed. Please use the.atproperty on JAX arrays instead, e.g.,x.at[idx].set(y). - Moved
jax.experimental.ann.approx_*_kintojax.lax. These functions are optimized alternatives tojax.lax.top_k. - {func}
jax.numpy.broadcast_arraysand {func}jax.numpy.broadcast_tonow require scalar or array-like inputs, and will fail if they are passed lists (part of {jax-issue}#7737). - The standard jax[tpu] install can now be used with Cloud TPU v4 VMs.
pjitnow works on CPU (in addition to previous TPU and GPU support).
- The functions
- Changes
XlaComputation.as_hlo_text()now supports printing large constants by passing boolean flagprint_large_constants=True.
- Deprecations:
- The
.block_host_until_ready()method on JAX arrays has been deprecated. Use.block_until_ready()instead.
- The
-
Changes:
jax.test_util.JaxTestCaseandjax.test_util.JaxTestLoaderare now deprecated. The suggested replacement is to useparametrized.TestCasedirectly. For tests that rely on custom asserts such asJaxTestCase.assertAllClose(), the suggested replacement is to use standard numpy testing utilities such as {func}numpy.testing.assert_allclose(), which work directly with JAX arrays ({jax-issue}#9620).jax.test_util.JaxTestCasenow setsjax_numpy_rank_promotion='raise'by default ({jax-issue}#9562). To recover the previous behavior, use the newjax.test_util.with_configdecorator:@jtu.with_config(jax_numpy_rank_promotion='allow') class MyTestCase(jtu.JaxTestCase): ...
- Added {func}
jax.scipy.linalg.schur, {func}jax.scipy.linalg.sqrtm, {func}jax.scipy.signal.csd, {func}jax.scipy.signal.stft, {func}jax.scipy.signal.welch.
-
Changes
- jax version has been bumped to 0.3.0. Please see the design doc for the explanation.
- Changes
- Bazel 5.0.0 is now required to build jaxlib.
- jaxlib version has been bumped to 0.3.0. Please see the design doc for the explanation.
- GitHub
commits.
jax.jit(f).lower(...).compiler_ir()now defaults to the MHLO dialect if nodialect=is passed.- The
jax.jit(f).lower(...).compiler_ir(dialect='mhlo')now returns an MLIRir.Moduleobject instead of its string representation.
- New features
- Includes precompiled SASS for NVidia compute capability 8.0 GPUS (e.g. A100). Removes precompiled SASS for compute capability 6.1 so as not to increase the number of compute capabilities: GPUs with compute capability 6.1 can use the 6.0 SASS.
- With jaxlib 0.1.76, JAX uses the MHLO MLIR dialect as its primary target compiler IR by default.
- Breaking changes
- Support for NumPy 1.18 has been dropped, per the deprecation policy. Please upgrade to a supported NumPy version.
- Bug fixes
- Fixed a bug where apparently identical pytreedef objects constructed by different routes do not compare as equal (#9066).
- The JAX jit cache requires two static arguments to have identical types for a cache hit (#9311).
-
Breaking changes:
- Support for NumPy 1.18 has been dropped, per the deprecation policy. Please upgrade to a supported NumPy version.
- The host_callback primitives have been simplified to drop the
special autodiff handling for hcb.id_tap and id_print.
From now on, only the primals are tapped. The old behavior can be
obtained (for a limited time) by setting the
JAX_HOST_CALLBACK_AD_TRANSFORMSenvironment variable, or the--flax_host_callback_ad_transformsflag. Additionally, added documentation for how to implement the old behavior using JAX custom AD APIs ({jax-issue}#8678). - Sorting now matches the behavior of NumPy for
0.0andNaNregardless of the bit representation. In particular,0.0and-0.0are now treated as equivalent, where previously-0.0was treated as less than0.0. Additionally allNaNrepresentations are now treated as equivalent and sorted to the end of the array. Previously negativeNaNvalues were sorted to the front of the array, andNaNvalues with different internal bit representations were not treated as equivalent, and were sorted according to those bit patterns ({jax-issue}#9178). - {func}
jax.numpy.uniquenow treatsNaNvalues in the same way asnp.uniquein NumPy versions 1.21 and newer: at most oneNaNvalue will appear in the uniquified output ({jax-issue}9184).
-
Bug fixes:
- host_callback now supports ad_checkpoint.checkpoint ({jax-issue}
#8907).
- host_callback now supports ad_checkpoint.checkpoint ({jax-issue}
-
New features:
- add
jax.block_until_ready({jax-issue}`#8941) - Added a new debugging flag/environment variable
JAX_DUMP_IR_TO=/path. If set, JAX dumps the MHLO/HLO IR it generates for each computation to a file under the given path. - Added
jax.ensure_compile_time_evalto the public api ({jax-issue}#7987). - jax2tf now supports a flag jax2tf_associative_scan_reductions to change
the lowering for associative reductions, e.g., jnp.cumsum, to behave
like JAX on CPU and GPU (to use an associative scan). See the jax2tf README
for more details ({jax-issue}
#9189).
- add
- New features:
- Support for python 3.10.
-
Bug fixes:
- Out-of-bounds indices to
jax.ops.segment_sumwill now be handled withFILL_OR_DROPsemantics, as documented. This primarily afects the reverse-mode derivative, where gradients corresponding to out-of-bounds indices will now be returned as 0. (#8634). - jax2tf will force the converted code to use XLA for the code fragments
under jax.jit, e.g., most jax.numpy functions ({jax-issue}
#7839).
- Out-of-bounds indices to
- Enabled peer-to-peer copies between GPUs. Previously, GPU copies were bounced via the host, which is usually slower.
- Added experimental MLIR Python bindings for use by JAX.
-
New features:
- (Experimental)
jax.distributed.initializeexposes multi-host GPU backend. jax.random.permutationsupports newindependentkeyword argument ({jax-issue}#8430)
- (Experimental)
-
Breaking changes
- Moved
jax.experimental.staxtojax.example_libraries.stax - Moved
jax.experimental.optimizerstojax.example_libraries.optimizers
- Moved
-
New features:
- Added
jax.lax.linalg.qdwh.
- Added
-
New features:
jax.random.choiceandjax.random.permutationnow support multidimensional arrays and an optionalaxisargument ({jax-issue}#8158)
-
Breaking changes:
jax.numpy.takeandjax.numpy.take_along_axisnow require array-like inputs (see {jax-issue}#7737)
-
Multiple cuDNN versions are now supported for jaxlib GPU
cuda11wheels.- cuDNN 8.2 or newer. We recommend using the cuDNN 8.2 wheel if your cuDNN installation is new enough, since it supports additional functionality.
- cuDNN 8.0.5 or newer.
-
Breaking changes:
-
The install commands for GPU jaxlib are as follows:
pip install --upgrade pip # Installs the wheel compatible with CUDA 11 and cuDNN 8.2 or newer. pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_releases.html # Installs the wheel compatible with Cuda 11 and cudnn 8.2 or newer. pip install jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_releases.html # Installs the wheel compatible with Cuda 11 and cudnn 8.0.5 or newer. pip install jax[cuda11_cudnn805] -f https://storage.googleapis.com/jax-releases/jax_releases.html
-
- GitHub commits.
- Breaking Changes
-
Static arguments to
jax.pmapmust now be hashable.Unhashable static arguments have long been disallowed on
jax.jit, but they were still permitted onjax.pmap;jax.pmapcompared unhashable static arguments using object identity.This behavior is a footgun, since comparing arguments using object identity leads to recompilation each time the object identity changes. Instead, we now ban unhashable arguments: if a user of
jax.pmapwants to compare static arguments by object identity, they can define__hash__and__eq__methods on their objects that do that, or wrap their objects in an object that has those operations with object identity semantics. Another option is to usefunctools.partialto encapsulate the unhashable static arguments into the function object. -
jax.util.partialwas an accidental export that has now been removed. Usefunctools.partialfrom the Python standard library instead.
-
- Deprecations
- The functions
jax.ops.index_update,jax.ops.index_addetc. are deprecated and will be removed in a future JAX release. Please use the.atproperty on JAX arrays instead, e.g.,x.at[idx].set(y). For now, these functions produce aDeprecationWarning.
- The functions
- New features:
- An optimized C++ code-path improving the dispatch time for
pmapis now the default when using jaxlib 0.1.72 or newer. The feature can be disabled using the--experimental_cpp_pmapflag (orJAX_CPP_PMAPenvironment variable). jax.numpy.uniquenow supports an optionalfill_valueargument ({jax-issue}#8121)
- An optimized C++ code-path improving the dispatch time for
- Breaking changes:
- Support for CUDA 10.2 and CUDA 10.1 has been dropped. Jaxlib now supports CUDA 11.1+.
- Bug fixes:
- Fixes jax-ml#7461, which caused wrong outputs on all platforms due to incorrect buffer aliasing inside the XLA compiler.
- GitHub commits.
- Breaking Changes
jax.apihas been removed. Functions that were available asjax.api.*were aliases for functions injax.*; please use the functions injax.*instead.jax.partial, andjax.lax.partialwere accidental exports that have now been removed. Usefunctools.partialfrom the Python standard library instead.- Boolean scalar indices now raise a
TypeError; previously this silently returned wrong results ({jax-issue}#7925). - Many more
jax.numpyfunctions now require array-like inputs, and will error if passed a list ({jax-issue}#7747{jax-issue}#7802{jax-issue}#7907). See {jax-issue}#7737for a discussion of the rationale behind this change. - When inside a transformation such as
jax.jit,jax.numpy.arrayalways stages the array it produces into the traced computation. Previouslyjax.numpy.arraywould sometimes produce a on-device array, even under ajax.jitdecorator. This change may break code that used JAX arrays to perform shape or index computations that must be known statically; the workaround is to perform such computations using classic NumPy arrays instead. jnp.ndarrayis now a true base-class for JAX arrays. In particular, this means that for a standard numpy arrayx,isinstance(x, jnp.ndarray)will now returnFalse({jax-issue}7927).
- New features:
- Added {func}
jax.numpy.insertimplementation ({jax-issue}#7936).
- Added {func}
- GitHub commits.
- Breaking Changes
jnp.poly*functions now require array-like inputs ({jax-issue}#7732)jnp.uniqueand other set-like operations now require array-like inputs ({jax-issue}#7662)
- Breaking changes:
- Support for CUDA 11.0 and CUDA 10.1 has been dropped. Jaxlib now supports CUDA 10.2 and CUDA 11.1+.
- GitHub commits.
- Breaking changes:
-
Support for NumPy 1.17 has been dropped, per the deprecation policy. Please upgrade to a supported NumPy version.
-
The
jitdecorator has been added around the implementation of a number of operators on JAX arrays. This speeds up dispatch times for common operators such as+.This change should largely be transparent to most users. However, there is one known behavioral change, which is that large integer constants may now produce an error when passed directly to a JAX operator (e.g.,
x + 2**40). The workaround is to cast the constant to an explicit type (e.g.,np.float64(2**40)).
-
- New features:
- Improved the support for shape polymorphism in jax2tf for operations that
need to use a dimension size in array computation, e.g.,
jnp.mean. ({jax-issue}#7317)
- Improved the support for shape polymorphism in jax2tf for operations that
need to use a dimension size in array computation, e.g.,
- Bug fixes:
- Some leaked trace errors from the previous release ({jax-issue}
#7613)
- Some leaked trace errors from the previous release ({jax-issue}
- Breaking changes:
-
Support for Python 3.6 has been dropped, per the deprecation policy. Please upgrade to a supported Python version.
-
Support for NumPy 1.17 has been dropped, per the deprecation policy. Please upgrade to a supported NumPy version.
-
The host_callback mechanism now uses one thread per local device for making the calls to the Python callbacks. Previously there was a single thread for all devices. This means that the callbacks may now be called interleaved. The callbacks corresponding to one device will still be called in sequence.
-
-
Breaking changes:
- Support for Python 3.6 has been dropped, per the deprecation policy. Please upgrade to a supported Python version.
- The minimum jaxlib version is now 0.1.69.
- The
backendargument to {py:func}jax.dlpack.from_dlpackhas been removed.
-
New features:
- Added a polar decomposition ({py:func}
jax.scipy.linalg.polar).
- Added a polar decomposition ({py:func}
-
Bug fixes:
- Tightened the checks for lax.argmin and lax.argmax to ensure they are
not used with an invalid
axisvalue, or with an empty reduction dimension. ({jax-issue}#7196)
- Tightened the checks for lax.argmin and lax.argmax to ensure they are
not used with an invalid
- Fix bugs in TFRT CPU backend that results in incorrect results.
- GitHub commits.
- Bug fixes:
- Default to the older "stream_executor" CPU runtime for jaxlib <= 0.1.68 to work around #7229, which caused wrong outputs on CPU due to a concurrency problem.
- New features:
- New SciPy function {py:func}
jax.scipy.special.sph_harm. - Reverse-mode autodiff functions ({func}
jax.grad, {func}jax.value_and_grad, {func}jax.vjp, and {func}jax.linear_transpose) support a parameter that indicates which named axes should be summed over in the backward pass if they were broadcasted over in the forward pass. This enables use of these APIs in a non-per-example way inside maps (initially only {func}jax.experimental.maps.xmap) ({jax-issue}#6950).
- New SciPy function {py:func}
-
New features:
- #7042 Turned on TFRT CPU backend with significant dispatch performance improvements on CPU.
- The {func}
jax2tf.convertsupports inequalities and min/max for booleans ({jax-issue}#6956). - New SciPy function {py:func}
jax.scipy.special.lpmn_values.
-
Breaking changes:
- Support for NumPy 1.16 has been dropped, per the deprecation policy.
-
Bug fixes:
- Fixed bug that prevented round-tripping from JAX to TF and back:
jax2tf.call_tf(jax2tf.convert)({jax-issue}#6947).
- Fixed bug that prevented round-tripping from JAX to TF and back:
- Bug fixes:
- Fixed bug in TFRT CPU backend that gets nans when transfer TPU buffer to CPU.
-
New features:
- The {func}
jax2tf.convertnow has support forpjitandsharded_jit. - A new configuration option JAX_TRACEBACK_FILTERING controls how JAX filters tracebacks.
- A new traceback filtering mode using
__tracebackhide__is now enabled by default in sufficiently recent versions of IPython. - The {func}
jax2tf.convertsupports shape polymorphism even when the unknown dimensions are used in arithmetic operations, e.g.,jnp.reshape(-1)({jax-issue}#6827). - The {func}
jax2tf.convertgenerates custom attributes with location information in TF ops. The code that XLA generates after jax2tf has the same location information as JAX/XLA. - New SciPy function {py:func}
jax.scipy.special.lpmn.
- The {func}
-
Bug fixes:
- The {func}
jax2tf.convertnow ensures that it uses the same typing rules for Python scalars and for choosing 32-bit vs. 64-bit computations as JAX ({jax-issue}#6883). - The {func}
jax2tf.convertnow scopes theenable_xlaconversion parameter properly to apply only during the just-in-time conversion ({jax-issue}#6720). - The {func}
jax2tf.convertnow convertslax.dot_generalusing theXlaDotTensorFlow op, for better fidelity w.r.t. JAX numerical precision ({jax-issue}#6717). - The {func}
jax2tf.convertnow has support for inequality comparisons and min/max for complex numbers ({jax-issue}#6892).
- The {func}
- New features:
-
CUDA 11.1 wheels are now supported on all CUDA 11 versions 11.1 or higher.
NVidia now promises compatibility between CUDA minor releases starting with CUDA 11.1. This means that JAX can release a single CUDA 11.1 wheel that is compatible with CUDA 11.2 and 11.3.
There is no longer a separate jaxlib release for CUDA 11.2 (or higher); use the CUDA 11.1 wheel for those versions (cuda111).
-
Jaxlib now bundles
libdevice.10.bcin CUDA wheels. There should be no need to point JAX to a CUDA installation to find this file. -
Added automatic support for static keyword arguments to the {func}
jitimplementation. -
Added support for pretransformation exception traces.
-
Initial support for pruning unused arguments from {func}
jit-transformed computations. Pruning is still a work in progress. -
Improved the string representation of {class}
PyTreeDefobjects. -
Added support for XLA's variadic ReduceWindow.
-
- Bug fixes:
- Fixed a bug in the remote cloud TPU support when large numbers of arguments are passed to a computation.
- Fix a bug that meant that JAX garbage collection was not triggered by
{func}
jittransformed functions.
-
New features:
- When combined with jaxlib 0.1.66, {func}
jax.jitnow supports static keyword arguments. A newstatic_argnamesoption has been added to specify keyword arguments as static. - {func}
jax.nonzerohas a new optionalsizeargument that allows it to be used withinjit({jax-issue}#6501) - {func}
jax.numpy.uniquenow supports theaxisargument ({jax-issue}#6532). - {func}
jax.experimental.host_callback.callnow supportspjit.pjit({jax-issue}#6569). - Added {func}
jax.scipy.linalg.eigh_tridiagonalthat computes the eigenvalues of a tridiagonal matrix. Only eigenvalues are supported at present. - The order of the filtered and unfiltered stack traces in exceptions has been
changed. The traceback attached to an exception thrown from JAX-transformed
code is now filtered, with an
UnfilteredStackTraceexception containing the original trace as the__cause__of the filtered exception. Filtered stack traces now also work with Python 3.6. - If an exception is thrown by code that has been transformed by reverse-mode
automatic differentiation, JAX now attempts to attach as a
__cause__of the exception aJaxStackTraceBeforeTransformationobject that contains the stack trace that created the original operation in the forward pass. Requires jaxlib 0.1.66.
- When combined with jaxlib 0.1.66, {func}
-
Breaking changes:
- The following function names have changed. There are still aliases, so this
should not break existing code, but the aliases will eventually be removed
so please change your code.
host_id--> {func}~jax.process_indexhost_count--> {func}~jax.process_counthost_ids-->range(jax.process_count())
- Similarly, the argument to {func}
~jax.local_deviceshas been renamed fromhost_idtoprocess_index. - Arguments to {func}
jax.jitother than the function are now marked as keyword-only. This change is to prevent accidental breakage when arguments are added tojit.
- The following function names have changed. There are still aliases, so this
should not break existing code, but the aliases will eventually be removed
so please change your code.
-
Bug fixes:
- The {func}
jax2tf.convertnow works in presence of gradients for functions with integer inputs ({jax-issue}#6360). - Fixed assertion failure in {func}
jax2tf.call_tfwhen used with capturedtf.Variable({jax-issue}#6572).
- The {func}
- GitHub commits.
- New features
- New profiling APIs: {func}
jax.profiler.start_trace, {func}jax.profiler.stop_trace, and {func}jax.profiler.trace - {func}
jax.lax.reduceis now differentiable.
- New profiling APIs: {func}
- Breaking changes:
- The minimum jaxlib version is now 0.1.64.
- Some profiler APIs names have been changed. There are still aliases, so this
should not break existing code, but the aliases will eventually be removed
so please change your code.
TraceContext--> {func}~jax.profiler.TraceAnnotationStepTraceContext--> {func}~jax.profiler.StepTraceAnnotationtrace_function--> {func}~jax.profiler.annotate_function
- Omnistaging can no longer be disabled. See omnistaging for more information.
- Python integers larger than the maximum
int64value will now lead to an overflow in all cases, rather than being silently converted touint64in some cases ({jax-issue}#6047). - Outside X64 mode, Python integers outside the range representable by
int32will now lead to anOverflowErrorrather than having their value silently truncated.
- Bug fixes:
host_callbacknow supports empty arrays in arguments and results ({jax-issue}#6262).- {func}
jax.random.randintclips rather than wraps of out-of-bounds limits, and can now generate integers in the full range of the specified dtype ({jax-issue}#5868)
-
New features:
-
Bug fixes:
- #6136 generalized
jax.flatten_util.ravel_pytreeto handle integer dtypes. - #6129 fixed a bug with handling
some constants like
enum.IntEnums - #6145 fixed batching issues with incomplete beta functions
- #6014 fixed H2D transfers during tracing
- #6165 avoids OverflowErrors when converting some large Python integers to floats
- #6136 generalized
-
Breaking changes:
- The minimum jaxlib version is now 0.1.62.
- GitHub commits.
- New features:
- {func}
jax.scipy.stats.chi2is now available as a distribution with logpdf and pdf methods. - {func}
jax.scipy.stats.betabinomis now available as a distribution with logpmf and pmf methods. - Added {func}
jax.experimental.jax2tf.call_tfto call TensorFlow functions from JAX ({jax-issue}#5627) and README). - Extended the batching rule for
lax.padto support batching of the padding values.
- {func}
- Bug fixes:
- {func}
jax.numpy.takeproperly handles negative indices ({jax-issue}#5768)
- {func}
- Breaking changes:
- JAX's promotion rules were adjusted to make promotion more consistent and
invariant to JIT. In particular, binary operations can now result in weakly-typed
values when appropriate. The main user-visible effect of the change is that
some operations result in outputs of different precision than before; for
example the expression
jnp.bfloat16(1) + 0.1 * jnp.arange(10)previously returned afloat64array, and now returns abfloat16array. JAX's type promotion behavior is described at {ref}type-promotion. - {func}
jax.numpy.linspacenow computes the floor of integer values, i.e., rounding towards -inf rather than 0. This change was made to match NumPy 1.20.0. - {func}
jax.numpy.i0no longer accepts complex numbers. Previously the function computed the absolute value of complex arguments. This change was made to match the semantics of NumPy 1.20.0. - Several {mod}
jax.numpyfunctions no longer accept tuples or lists in place of array arguments: {func}jax.numpy.pad, :funcjax.numpy.ravel, {func}jax.numpy.repeat, {func}jax.numpy.reshape. In general, {mod}jax.numpyfunctions should be used with scalars or array arguments.
- JAX's promotion rules were adjusted to make promotion more consistent and
invariant to JIT. In particular, binary operations can now result in weakly-typed
values when appropriate. The main user-visible effect of the change is that
some operations result in outputs of different precision than before; for
example the expression
- New features:
- jaxlib wheels are now built to require AVX instructions on x86-64 machines
by default. If you want to use JAX on a machine that doesn't support AVX,
you can build a jaxlib from source using the
--target_cpu_featuresflag tobuild.py.--target_cpu_featuresalso replaces--enable_march_native.
- jaxlib wheels are now built to require AVX instructions on x86-64 machines
by default. If you want to use JAX on a machine that doesn't support AVX,
you can build a jaxlib from source using the
- Bug fixes:
- Fixed a memory leak when converting CPU DeviceArrays to NumPy arrays. The memory leak was present in jaxlib releases 0.1.58 and 0.1.59.
bool,int8, anduint8are now considered safe to cast tobfloat16NumPy extension type.
- GitHub commits.
- New features:
- Extend the {mod}
jax.experimental.loopsmodule with support for pytrees. Improved error checking and error messages. - Add {func}
jax.experimental.enable_x64and {func}jax.experimental.disable_x64. These are context managers which allow X64 mode to be temporarily enabled/disabled within a session.
- Extend the {mod}
- Breaking changes:
- {func}
jax.ops.segment_sumnow drops segment IDs that are out of range rather than wrapping them into the segment ID space. This was done for performance reasons.
- {func}
- GitHub commits.
- New features:
- Add {func}
jax.closure_convertfor use with higher-order custom derivative functions. ({jax-issue}#5244) - Add {func}
jax.experimental.host_callback.callto call a custom Python function on the host and return a result to the device computation. ({jax-issue}#5243)
- Add {func}
- Bug fixes:
jax.numpy.arccoshnow returns the same branch asnumpy.arccoshfor complex inputs ({jax-issue}#5156)host_callback.id_tapnow works forjax.pmapalso. There is an optional parameter forid_tapandid_printto request that the device from which the value is tapped be passed as a keyword argument to the tap function ({jax-issue}#5182).
- Breaking changes:
jax.numpy.padnow takes keyword arguments. Positional argumentconstant_valueshas been removed. In addition, passing unsupported keyword arguments raises an error.- Changes for {func}
jax.experimental.host_callback.id_tap({jax-issue}#5243):- Removed support for
kwargsfor {func}jax.experimental.host_callback.id_tap. (This support has been deprecated for a few months.) - Changed the printing of tuples for {func}
jax.experimental.host_callback.id_printto use '(' instead of '['. - Changed the {func}
jax.experimental.host_callback.id_printin presence of JVP to print a pair of primal and tangent. Previously, there were two separate print operations for the primals and the tangent. host_callback.outfeed_receiverhas been removed (it is not necessary, and was deprecated a few months ago).
- Removed support for
- New features:
- New flag for debugging
inf, analagous to that forNaN({jax-issue}#5224).
- New flag for debugging
- GitHub commits.
- New features:
- Add
jax.device_put_replicated - Add multi-host support to
jax.experimental.sharded_jit - Add support for differentiating eigenvalues computed by
jax.numpy.linalg.eig - Add support for building on Windows platforms
- Add support for general in_axes and out_axes in
jax.pmap - Add complex support for
jax.numpy.linalg.slogdet
- Add
- Bug fixes:
- Fix higher-than-second order derivatives of
jax.numpy.sincat zero - Fix some hard-to-hit bugs around symbolic zeros in transpose rules
- Fix higher-than-second order derivatives of
- Breaking changes:
jax.experimental.optixhas been deleted, in favor of the standaloneoptaxPython package.- indexing of JAX arrays with non-tuple sequences now raises a
TypeError. This type of indexing has been deprecated in Numpy since v1.16, and in JAX since v0.2.4. See {jax-issue}#4564.
-
New Features:
- Add support for shape-polymorphic tracing for the jax.experimental.jax2tf converter. See README.md.
-
Breaking change cleanup
-
Raise an error on non-hashable static arguments for jax.jit and xla_computation. See cb48f42.
-
Improve consistency of type promotion behavior ({jax-issue}
#4744):- Adding a complex Python scalar to a JAX floating point number respects the precision of
the JAX float. For example,
jnp.float32(1) + 1jnow returnscomplex64, where previously it returnedcomplex128. - Results of type promotion with 3 or more terms involving uint64, a signed int, and a third type
are now independent of the order of arguments. For example:
jnp.result_type(jnp.uint64, jnp.int64, jnp.float16)andjnp.result_type(jnp.float16, jnp.uint64, jnp.int64)both returnfloat16, where previously the first returnedfloat64and the second returnedfloat16.
- Adding a complex Python scalar to a JAX floating point number respects the precision of
the JAX float. For example,
-
The contents of the (undocumented)
jax.lax_linalglinear algebra module are now exposed publicly asjax.lax.linalg. -
jax.random.PRNGKeynow produces the same results in and out of JIT compilation ({jax-issue}#4877). This required changing the result for a given seed in a few particular cases:- With
jax_enable_x64=False, negative seeds passed as Python integers now return a different result outside JIT mode. For example,jax.random.PRNGKey(-1)previously returned[4294967295, 4294967295], and now returns[0, 4294967295]. This matches the behavior in JIT. - Seeds outside the range representable by
int64outside JIT now result in anOverflowErrorrather than aTypeError. This matches the behavior in JIT.
To recover the keys returned previously for negative integers with
jax_enable_x64=Falseoutside JIT, you can use:key = random.PRNGKey(-1).at[0].set(0xFFFFFFFF) - With
-
DeviceArray now raises
RuntimeErrorinstead ofValueErrorwhen trying to access its value while it has been deleted.
-
- Fixed a bug that meant JAX sometimes return platform-specific types (e.g.,
np.cint) instead of standard types (e.g.,np.int32). (#4903) - Fixed a crash when constant-folding certain int16 operations. (#4971)
- Added an
is_leafpredicate to {func}pytree.flatten.
- Fixed manylinux2010 compliance issues in GPU wheels.
- Switched the CPU FFT implementation from Eigen to PocketFFT.
- Fixed a bug where the hash of bfloat16 values was not correctly initialized and could change (#4651).
- Add support for retaining ownership when passing arrays to DLPack (#4636).
- Fixed a bug for batched triangular solves with sizes greater than 128 but not a multiple of 128.
- Fixed a bug when performing concurrent FFTs on multiple GPUs (#3518).
- Fixed a bug in profiler where tools are missing (#4427).
- Dropped support for CUDA 10.0.
- GitHub commits.
- Improvements:
- Ensure that
check_jaxprdoes not perform FLOPS. See {jax-issue}#4650. - Expanded the set of JAX primitives converted by jax2tf. See primitives_with_limited_support.md.
- Ensure that
-
Improvements:
- Add support for
rematto jax.experimental.host_callback. See {jax-issue}#4608.
- Add support for
-
Deprecations
- Indexing with non-tuple sequences is now deprecated, following a similar deprecation in Numpy.
In a future release, this will result in a TypeError. See {jax-issue}
#4564.
- Indexing with non-tuple sequences is now deprecated, following a similar deprecation in Numpy.
In a future release, this will result in a TypeError. See {jax-issue}
- GitHub commits.
- The reason for another release so soon is we need to temporarily roll back a new jit fastpath while we look into a performance degradation
- GitHub commits.
- Improvements:
- As a benefit of omnistaging, the host_callback functions are executed (in program
order) even if the result of the {py:func}
jax.experimental.host_callback.id_print/ {py:func}jax.experimental.host_callback.id_tapis not used in the computation.
- As a benefit of omnistaging, the host_callback functions are executed (in program
order) even if the result of the {py:func}
- GitHub commits.
- Improvements:
- Omnistaging on by default. See {jax-issue}
#3370and omnistaging
- Omnistaging on by default. See {jax-issue}
- Breaking changes:
- New simplified interface for {py:func}
jax.experimental.host_callback.id_tap(#4101)
- New simplified interface for {py:func}
- Update XLA:
- Fix bug in DLPackManagedTensorToBuffer (#4196)
- GitHub commits.
- Bug Fixes:
- make jnp.abs() work for unsigned inputs (#3914)
- Improvements:
- "Omnistaging" behavior added behind a flag, disabled by default (#3370)
- GitHub commits.
- New Features:
- BFGS (#3101)
- TPU support for half-precision arithmetic (#3878)
- Bug Fixes:
- Prevent some accidental dtype warnings (#3874)
- Fix a multi-threading bug in custom derivatives (#3845, #3869)
- Improvements:
- Faster searchsorted implementation (#3873)
- Better test coverage for jax.numpy sorting algorithms (#3836)
- Update XLA.
- GitHub commits.
- The minimum jaxlib version is now 0.1.51.
- New Features:
- jax.image.resize. (#3703)
- hfft and ihfft (#3664)
- jax.numpy.intersect1d (#3726)
- jax.numpy.lexsort (#3812)
lax.scanand thescanprimitive support anunrollparameter for loop unrolling when lowering to XLA ({jax-issue}#3738).
- Bug Fixes:
- Fix reduction repeated axis error (#3618)
- Fix shape rule for lax.pad for input dimensions of size 0. (#3608)
- make psum transpose handle zero cotangents (#3653)
- Fix shape error when taking JVP of reduce-prod over size 0 axis. (#3729)
- Support differentiation through jax.lax.all_to_all (#3733)
- address nan issue in jax.scipy.special.zeta (#3777)
- Improvements:
- Many improvements to jax2tf
- Reimplement argmin/argmax using a single pass variadic reduction. (#3611)
- Enable XLA SPMD partitioning by default. (#3151)
- Add support for 0d transpose convolution (#3643)
- Make LU gradient work for low-rank matrices (#3610)
- support multiple_results and custom JVPs in jet (#3657)
- Generalize reduce-window padding to support (lo, hi) pairs. (#3728)
- Implement complex convolutions on CPU and GPU. (#3735)
- Make jnp.take work for empty slices of empty arrays. (#3751)
- Relax dimension ordering rules for dot_general. (#3778)
- Enable buffer donation for GPU. (#3800)
- Add support for base dilation and window dilation to reduce window op… (#3803)
- Update XLA.
- Add new runtime support for host_callback.
- GitHub commits.
- Bug fixes:
- Fix an odeint bug introduced in the previous release, see
{jax-issue}
#3587.
- Fix an odeint bug introduced in the previous release, see
{jax-issue}
- GitHub commits.
- The minimum jaxlib version is now 0.1.48.
- Bug fixes:
- Allow
jax.experimental.ode.odeintdynamics functions to close over values with respect to which we're differentiating {jax-issue}#3562.
- Allow
- Add support for CUDA 11.0.
- Drop support for CUDA 9.2 (we only maintain support for the last four CUDA versions.)
- Update XLA.
- Bug fixes:
- Fix build issue that could result in slow compiles (https://github.com/tensorflow/tensorflow/commit/f805153a25b00d12072bd728e91bb1621bfcf1b1)
- New features:
- Adds support for fast traceback collection.
- Adds preliminary support for on-device heap profiling.
- Implements
np.nextafterforbfloat16types. - Complex128 support for FFTs on CPU and GPU.
- Bugfixes:
- Improved float64
tanhaccuracy on GPU. - float64 scatters on GPU are much faster.
- Complex matrix multiplication on CPU should be much faster.
- Stable sorts on CPU should actually be stable now.
- Concurrency bug fix in CPU backend.
- Improved float64
- GitHub commits.
- New features:
lax.switchintroduces indexed conditionals with multiple branches, together with a generalization of thecondprimitive {jax-issue}#3318.
- GitHub commits.
- New features:
- {func}
lax.condsupports a single-operand form, taken as the argument to both branches {jax-issue}#2993.
- {func}
- Notable changes:
- The format of the
transformskeyword for the {func}jax.experimental.host_callback.id_tapprimitive has changed {jax-issue}#3132.
- The format of the
- GitHub commits.
- New features:
- Support for reduction over subsets of a pmapped axis using
axis_index_groups{jax-issue}#2382. - Experimental support for printing and calling host-side Python function from
compiled code. See id_print and id_tap
({jax-issue}
#3006).
- Support for reduction over subsets of a pmapped axis using
- Notable changes:
- The visibility of names exported from {mod}
jax.numpyhas been tightened. This may break code that was making use of names that were previously exported accidentally.
- The visibility of names exported from {mod}
- Fixes crash for outfeed.
- GitHub commits.
- New features:
- Support for
in_axes=Noneon {func}pmap{jax-issue}#2896.
- Support for
- Fixes crash for linear algebra functions on Mac OS X (#432).
- Fixes an illegal instruction crash caused by using AVX512 instructions when an operating system or hypervisor disabled them (#2906).
- GitHub commits.
- New features:
- Differentiation of determinants of singular matrices
{jax-issue}
#2809.
- Differentiation of determinants of singular matrices
{jax-issue}
- Bug fixes:
- Fix {func}
odeintdifferentiation with respect to time of ODEs with time-dependent dynamics {jax-issue}#2817, also add ODE CI testing. - Fix {func}
lax_linalg.qrdifferentiation {jax-issue}#2867.
- Fix {func}
- Fixes segfault: {jax-issue}
#2755 - Plumb is_stable option on Sort HLO through to Python.
- GitHub commits.
- New features:
- Add syntactic sugar for functional indexed updates
{jax-issue}
#2684. - Add {func}
jax.numpy.linalg.multi_dot{jax-issue}#2726. - Add {func}
jax.numpy.unique{jax-issue}#2760. - Add {func}
jax.numpy.rint{jax-issue}#2724. - Add {func}
jax.numpy.rint{jax-issue}#2724. - Add more primitive rules for {func}
jax.experimental.jet.
- Add syntactic sugar for functional indexed updates
{jax-issue}
- Bug fixes:
- Fix {func}
logaddexpand {func}logaddexp2differentiation at zero {jax-issue}#2107. - Improve memory usage in reverse-mode autodiff without {func}
jit{jax-issue}#2719.
- Fix {func}
- Better errors:
- Improves error message for reverse-mode differentiation of {func}
lax.while_loop{jax-issue}#2129.
- Improves error message for reverse-mode differentiation of {func}
- Fixes a bug where if multiple GPUs of different models were present, JAX would only compile programs suitable for the first GPU.
- Bugfix for
batch_group_countconvolutions. - Added precompiled SASS for more GPU versions to avoid startup PTX compilation hang.
- GitHub commits.
- Added
jax.custom_jvpandjax.custom_vjpfrom {jax-issue}#2026, see the tutorial notebook. Deprecatedjax.custom_transformsand removed it from the docs (though it still works). - Add
scipy.sparse.linalg.cg{jax-issue}#2566. - Changed how Tracers are printed to show more useful information for debugging {jax-issue}
#2591. - Made
jax.numpy.isclosehandlenanandinfcorrectly {jax-issue}#2501. - Added several new rules for
jax.experimental.jet{jax-issue}#2537. - Fixed
jax.experimental.stax.BatchNormwhenscale/centerisn't provided. - Fix some missing cases of broadcasting in
jax.numpy.einsum{jax-issue}#2512. - Implement
jax.numpy.cumsumandjax.numpy.cumprodin terms of a parallel prefix scan {jax-issue}#2596and makereduce_proddifferentiable to arbitray order {jax-issue}#2597. - Add
batch_group_counttoconv_general_dilated{jax-issue}#2635. - Add docstring for
test_util.check_grads{jax-issue}#2656. - Add
callback_transform{jax-issue}#2665. - Implement
rollaxis,convolve/correlate1d & 2d,copysign,trunc,roots, andquantile/percentileinterpolation options.
- Fixed a performance regression for Resnet-50 on GPU.
- GitHub commits.
- JAX has dropped support for Python 3.5. Please upgrade to Python 3.6 or newer.
- Removed the internal function
lax._safe_mul, which implemented the convention0. * nan == 0.. This change means some programs when differentiated will produce nans when they previously produced correct values, though it ensures nans rather than silently incorrect results are produced for other programs. See #2447 and #1052 for details. - Added an
all_gatherparallel convenience function. - More type annotations in core code.
- jaxlib 0.1.41 broke cloud TPU support due to an API incompatibility. This release fixes it again.
- JAX has dropped support for Python 3.5. Please upgrade to Python 3.6 or newer.
- GitHub commits.
- Fixes Python 3.5 support. This will be the last JAX or jaxlib release that supports Python 3.5.
- GitHub commits.
- New features:
- {py:func}
jax.pmaphasstatic_broadcast_argnumsargument which allows the user to specify arguments that should be treated as compile-time constants and should be broadcasted to all devices. It works analogously tostatic_argnumsin {py:func}jax.jit. - Improved error messages for when tracers are mistakenly saved in global state.
- Added {py:func}
jax.nn.one_hotutility function. - Added {mod}
jax.experimental.jetfor exponentially faster higher-order automatic differentiation. - Added more correctness checking to arguments of {py:func}
jax.lax.broadcast_in_dim.
- {py:func}
- The minimum jaxlib version is now 0.1.41.
- Adds experimental support in Jaxlib for TensorFlow profiler, which allows tracing of CPU and GPU computations from TensorBoard.
- Includes prototype support for multihost GPU computations that communicate via NCCL.
- Improves performance of NCCL collectives on GPU.
- Adds TopK, CustomCallWithoutLayout, CustomCallWithLayout, IGammaGradA and RandomGamma implementations.
- Supports device assignments known at XLA compilation time.
-
Breaking changes
- The minimum jaxlib version is now 0.1.38.
- Simplified {py:class}
Jaxprby removing theJaxpr.freevarsandJaxpr.bound_subjaxprs. The call primitives (xla_call,xla_pmap,sharded_call, andremat_call) get a new parametercall_jaxprwith a fully-closed (noconstvars) jaxpr. Also, added a new fieldcall_primitiveto primitives.
-
New features:
- Reverse-mode automatic differentiation (e.g.
grad) oflax.cond, making it now differentiable in both modes ({jax-issue}#2091) - JAX now supports DLPack, which allows sharing CPU and GPU arrays in a zero-copy way with other libraries, such as PyTorch.
- JAX GPU DeviceArrays now support
__cuda_array_interface__, which is another zero-copy protocol for sharing GPU arrays with other libraries such as CuPy and Numba. - JAX CPU device buffers now implement the Python buffer protocol, which allows zero-copy buffer sharing between JAX and NumPy.
- Added JAX_SKIP_SLOW_TESTS environment variable to skip tests known as slow.
- Reverse-mode automatic differentiation (e.g.
- Updates XLA.
- CUDA 9.0 is no longer supported.
- CUDA 10.2 wheels are now built by default.
-
Breaking changes
- JAX has dropped Python 2 support, because Python 2 reached its end of life on January 1, 2020. Please update to Python 3.5 or newer.
-
New features
- Forward-mode automatic differentiation (
jvp) of while loop ({jax-issue}#1980)
-
New NumPy and SciPy functions:
- {py:func}
jax.numpy.fft.fft2 - {py:func}
jax.numpy.fft.ifft2 - {py:func}
jax.numpy.fft.rfft - {py:func}
jax.numpy.fft.irfft - {py:func}
jax.numpy.fft.rfft2 - {py:func}
jax.numpy.fft.irfft2 - {py:func}
jax.numpy.fft.rfftn - {py:func}
jax.numpy.fft.irfftn - {py:func}
jax.numpy.fft.fftfreq - {py:func}
jax.numpy.fft.rfftfreq - {py:func}
jax.numpy.linalg.matrix_rank - {py:func}
jax.numpy.linalg.matrix_power - {py:func}
jax.scipy.special.betainc
- {py:func}
-
Batched Cholesky decomposition on GPU now uses a more efficient batched kernel.
- Forward-mode automatic differentiation (
- With the Python 3 upgrade, JAX no longer depends on
fastcache, which should help with installation.