author int64 658 755k | date stringdate 2012-06-12 08:34:29 2024-07-22 14:51:21 | timezone int64 -46,800 43.2k | hash stringlengths 40 40 | message stringlengths 5 490 | mods listlengths 1 16 | language stringclasses 20
values | license stringclasses 3
values | repo stringlengths 5 68 | original_message stringlengths 12 491 |
|---|---|---|---|---|---|---|---|---|---|
260,335 | 30.06.2020 22:19:16 | 25,200 | 107689e91f0940327a807e2a9890da3071e6feac | improve vmap axis spec structure mismatch errors
* improve vmap axis spec structure mismatch errors
fixes
* deflake | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -867,10 +867,11 @@ def vmap(fun: Callable, in_axes=0, out_axes=0) -> Callable:\nargs_flat, in_tree = tree_flatten(args)\nf = lu.wrap_init(fun)\nflat_fun, out_tree = flatten_fun_nokwargs(f, in_tree)\n- in_axes_... | Python | Apache License 2.0 | google/jax | improve vmap axis spec structure mismatch errors (#3619)
* improve vmap axis spec structure mismatch errors
fixes #3613
* deflake |
260,335 | 01.07.2020 11:26:44 | 25,200 | ba1b5ce8de01985133ce0cf960c112ffb81dd7fb | skip some ode tests on gpu for speed | [
{
"change_type": "MODIFY",
"old_path": "jax/test_util.py",
"new_path": "jax/test_util.py",
"diff": "@@ -55,8 +55,7 @@ flags.DEFINE_integer(\nflags.DEFINE_bool(\n'jax_skip_slow_tests',\nbool_env('JAX_SKIP_SLOW_TESTS', False),\n- help=\n- 'Skip tests marked as slow (> 5 sec).'\n+ help='Skip tests mark... | Python | Apache License 2.0 | google/jax | skip some ode tests on gpu for speed (#3629) |
260,335 | 01.07.2020 12:22:39 | 25,200 | 1bd04e2d2f3ed0cbbe4dae8bfec09651930db66c | skip gamma tests on tpu for compilation speed | [
{
"change_type": "MODIFY",
"old_path": "tests/random_test.py",
"new_path": "tests/random_test.py",
"diff": "@@ -402,6 +402,7 @@ class LaxRandomTest(jtu.JaxTestCase):\nnp.array([0.2, 1., 5.]),\n]\nfor dtype in [np.float32, np.float64]))\n+ @jtu.skip_on_devices(\"tpu\") # TODO(mattjj): slow compilatio... | Python | Apache License 2.0 | google/jax | skip gamma tests on tpu for compilation speed (#3631) |
260,335 | 01.07.2020 14:15:48 | 25,200 | 65c4d755def093ab9c4388d04b10a6ff0f3178f6 | fix bug in categorical test, disable on tpu
* fix bug in categorical test, disable on tpu
Disabling on TPU pending a TPU compilation bug.
* unskip a test | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -4363,6 +4363,10 @@ ad.defjvp_zero(argmin_p)\nxla.backend_specific_translations['gpu'][argmin_p] = xla.lower_fun(\npartial(_argminmax_gpu_translation_rule, _reduce_min),\nmultiple_results=False)\n+# TO... | Python | Apache License 2.0 | google/jax | fix bug in categorical test, disable #3611 on tpu (#3633)
* fix bug in categorical test, disable #3611 on tpu
Disabling #3611 on TPU pending a TPU compilation bug.
* unskip a test |
260,411 | 02.07.2020 10:21:23 | -10,800 | 448c635a9ea00f32b2c20c277a49f62ea9029f3b | [jax2tf] Update the tf-nightly version to 2020-07-01 | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/ci-build.yaml",
"new_path": ".github/workflows/ci-build.yaml",
"diff": "@@ -52,6 +52,7 @@ jobs:\n- python-version: 3.6\nos: ubuntu-latest\nenable-x64: enable-x64\n+ # Test with numpy version that matches Google-internal version\npackage-overr... | Python | Apache License 2.0 | google/jax | [jax2tf] Update the tf-nightly version to 2020-07-01 (#3635) |
260,411 | 02.07.2020 10:33:00 | -10,800 | a5ed161550825f3b3c52b764b39db8e15b4c9f1e | Release jaxlib 0.1.51 | [
{
"change_type": "MODIFY",
"old_path": "WORKSPACE",
"new_path": "WORKSPACE",
"diff": "@@ -28,10 +28,10 @@ http_archive(\n# and update the sha256 with the result.\nhttp_archive(\nname = \"org_tensorflow\",\n- sha256 = \"3e2387ae5d069de6fe1ccd4faa8d0dc1d63799d59df10f5bb93d03152ba9b158\",\n- strip_pref... | Python | Apache License 2.0 | google/jax | Release jaxlib 0.1.51 (#3636) |
260,411 | 02.07.2020 12:47:22 | -10,800 | bfe8f8732b9b90a3a0e7d79c40964b759833bdea | Change the version of tensorflow, the one in jaxlib 0.1.51 does not build | [
{
"change_type": "MODIFY",
"old_path": "WORKSPACE",
"new_path": "WORKSPACE",
"diff": "@@ -28,10 +28,10 @@ http_archive(\n# and update the sha256 with the result.\nhttp_archive(\nname = \"org_tensorflow\",\n- sha256 = \"ab1b8edb072269a4a513385fbf03a6dc2a22cda5f7cb833aa4962e692d3caf61\",\n- strip_pref... | Python | Apache License 2.0 | google/jax | Change the version of tensorflow, the one in jaxlib 0.1.51 does not build (#3637) |
260,411 | 02.07.2020 18:53:58 | -10,800 | 166e795d638349530accacb1a48261203b29ae67 | Updated minimum jaxlib to 0.1.51 | [
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -410,7 +410,7 @@ PYTHON_VERSION=cp37 # alternatives: cp36, cp37, cp38\nCUDA_VERSION=cuda100 # alternatives: cuda100, cuda101, cuda102, cuda110\nPLATFORM=manylinux2010_x86_64 # alternatives: manylinux2010_x86_64\... | Python | Apache License 2.0 | google/jax | Updated minimum jaxlib to 0.1.51 (#3642) |
260,335 | 02.07.2020 14:29:17 | 25,200 | d10cf0e38f9281e16e7e84fa4fe289f6c5ae2654 | fix prng key reuse in differential privacy example
fix prng key reuse in differential privacy example | [
{
"change_type": "MODIFY",
"old_path": "examples/differentially_private_sgd.py",
"new_path": "examples/differentially_private_sgd.py",
"diff": "@@ -64,7 +64,6 @@ Example invocations:\n--learning_rate=.25 \\\n\"\"\"\n-from functools import partial\nimport itertools\nimport time\nimport warnings\n@@ -... | Python | Apache License 2.0 | google/jax | fix prng key reuse in differential privacy example (#3646)
fix prng key reuse in differential privacy example |
260,335 | 03.07.2020 10:00:25 | 25,200 | 796df9c550618c15dfec157af306b08fe58eac13 | make psum transpose handle zero cotangents
make psum transpose handle zero cotangents
fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax_parallel.py",
"new_path": "jax/lax/lax_parallel.py",
"diff": "@@ -364,6 +364,12 @@ def _notuple_psum_translation_rule(c, *args, replica_groups):\nreturn psum(val)\nreturn xops.Tuple(c, list(map(_translate, args)))\n+def _psum_transpose_rule(cts, ax... | Python | Apache License 2.0 | google/jax | make psum transpose handle zero cotangents (#3653)
make psum transpose handle zero cotangents
fixes #3651 |
260,335 | 03.07.2020 20:54:25 | 25,200 | 49cfe2687c9a23d355c799a01a931280e44e6018 | improve concreteness error message for nn.one_hot
* improve nn.one_hot and jax.numpy.arange errors
fixes
* deflake
* debug | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -831,17 +831,15 @@ def concretization_function_error(fun, context=\"\"):\nreturn error\n-def concrete_or_error(typ: Type, val: Any, context=\"\"):\n- \"\"\"Like typ(val), but gives the context in the error m... | Python | Apache License 2.0 | google/jax | improve concreteness error message for nn.one_hot (#3656)
* improve nn.one_hot and jax.numpy.arange errors
fixes #3654
* deflake
* debug |
260,411 | 06.07.2020 09:04:02 | -10,800 | 8f93607330b36f1bfdb8e030657b6d73452d0cb3 | Fix broken links to deleted notebook
Fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/tree_util.py",
"new_path": "jax/tree_util.py",
"diff": "@@ -31,7 +31,7 @@ The primary purpose of this module is to enable the interoperability between\nuser defined data structures and JAX transformations (e.g. `jit`). This is not\nmeant to be a general pu... | Python | Apache License 2.0 | google/jax | Fix broken links to deleted notebook (#3663)
Fixes #3662. |
260,335 | 06.07.2020 15:11:01 | 25,200 | e5ba5f1e6707fde12b3d95de0bd71da8a2dd453b | support multiple_results and custom JVPs in jet | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jet.py",
"new_path": "jax/experimental/jet.py",
"diff": "@@ -26,6 +26,7 @@ from jax.tree_util import (register_pytree_node, tree_structure,\ntreedef_is_leaf, tree_flatten, tree_unflatten)\nimport jax.linear_util as lu\nfrom jax.interpreters im... | Python | Apache License 2.0 | google/jax | support multiple_results and custom JVPs in jet (#3657) |
260,335 | 07.07.2020 00:30:08 | 25,200 | d2ebb6eb19b0a824303e22a492d4b72f15ba1d88 | fix ppermute test bugs found by | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax_parallel.py",
"new_path": "jax/lax/lax_parallel.py",
"diff": "@@ -196,29 +196,26 @@ def ppermute(x, axis_name, perm):\npartial(ppermute_p.bind, axis_name=axis_name, perm=tuple(perm)), x)\ndef pshuffle(x, axis_name, perm):\n- \"\"\"Perform a collect... | Python | Apache License 2.0 | google/jax | fix ppermute test bugs found by @jekbradbury (#3675) |
260,335 | 07.07.2020 14:48:54 | 25,200 | 1034f29de778b288c32271cd283fb44e9b5adaf4 | fix bad pmap tests from | [
{
"change_type": "MODIFY",
"old_path": "tests/pmap_test.py",
"new_path": "tests/pmap_test.py",
"diff": "@@ -564,15 +564,10 @@ class PmapTest(jtu.JaxTestCase):\nx = np.arange(device_count, dtype=np.float32)\n- ans = g(x)\n- expected = np.roll(np.pi + np.arange(device_count), 1)\n- self.assertAllClose... | Python | Apache License 2.0 | google/jax | fix bad pmap tests from #3675 (#3685) |
260,411 | 08.07.2020 16:08:54 | -10,800 | fdd7f0c8574b1e0e4366ee428153d73bc1788510 | Added concurrent id_tap tests, disabled for GPU | [
{
"change_type": "MODIFY",
"old_path": "tests/host_callback_test.py",
"new_path": "tests/host_callback_test.py",
"diff": "@@ -336,6 +336,77 @@ where: 3\nhcb.barrier_wait() # Wait for receivers to be done\nself.assertEqual(3, tap_count)\n+ @parameterized.named_parameters(\n+ jtu.cases_from_list(\n+ d... | Python | Apache License 2.0 | google/jax | Added concurrent id_tap tests, disabled for GPU (#3690) |
260,651 | 10.07.2020 20:34:59 | -10,800 | 412b9d5209619c6cc6f5af7c6926cab24b919c3e | hfft and ihfft implementation | [
{
"change_type": "MODIFY",
"old_path": "docs/jax.numpy.rst",
"new_path": "docs/jax.numpy.rst",
"diff": "@@ -312,6 +312,8 @@ jax.numpy.fft\nirfft2\nrfftn\nirfftn\n+ hfft\n+ ihfft\nfftfreq\nrfftfreq\nfftshift\n"
},
{
"change_type": "MODIFY",
"old_path": "jax/numpy/fft.py",
"new_path": ... | Python | Apache License 2.0 | google/jax | hfft and ihfft implementation (#3664) |
260,335 | 11.07.2020 20:47:22 | 25,200 | 51ca57d5fc02abe486cecc1f1a5478bd2bf6a100 | check matmul inputs aren't scalar
also dot_general shape rule should check dimension numbers are in range
fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -2657,6 +2657,20 @@ def _precision_config(precision):\ndef _dot_general_shape_rule(lhs, rhs, *, dimension_numbers, precision):\n(lhs_contracting, rhs_contracting), (lhs_batch, rhs_batch) = dimension_nu... | Python | Apache License 2.0 | google/jax | check matmul inputs aren't scalar (#3725)
also dot_general shape rule should check dimension numbers are in range
fixes #3718 |
260,651 | 14.07.2020 01:31:47 | -10,800 | a6ab742f3635ed7c6d8c499c4be8aeb2a4181922 | Improve np.intersect1d | [
{
"change_type": "MODIFY",
"old_path": "jax/numpy/lax_numpy.py",
"new_path": "jax/numpy/lax_numpy.py",
"diff": "@@ -1249,10 +1249,9 @@ def _intersect1d_sorted_mask(ar1, ar2, return_indices=False):\nHelper function for intersect1d which is jit-able\n\"\"\"\nar = concatenate((ar1, ar2))\n-\nif return_... | Python | Apache License 2.0 | google/jax | Improve np.intersect1d (#3739) |
260,500 | 14.07.2020 18:37:09 | -3,600 | f6f97554f9c9689caccae8ff383a51620f0151f8 | A jit-able version of np.repeat.
A new keyword argument has been added to np.repeat, total_repeat_length, that can optionally be supplied to make np.repeat jit-able. | [
{
"change_type": "MODIFY",
"old_path": "jax/numpy/lax_numpy.py",
"new_path": "jax/numpy/lax_numpy.py",
"diff": "@@ -2505,72 +2505,61 @@ def indices(dimensions, dtype=int32, sparse=False):\nreturn stack(output, 0) if output else array([], dtype=dtype)\n-def _repeat_scalar(a, repeats, axis=None):\n- i... | Python | Apache License 2.0 | google/jax | A jit-able version of np.repeat. (#3670)
A new keyword argument has been added to np.repeat, total_repeat_length, that can optionally be supplied to make np.repeat jit-able. |
260,308 | 15.07.2020 00:45:49 | -7,200 | f02d5b4694ae62a5a05a193d89e825bda2b79737 | Support differentiation through jax.lax.all_to_all
* Support differentiation through jax.lax.all_to_all
Credit to for the solution.
* Test gradient of all_to_all
We are testing all_to_all through pswapaxes, since general all_to_all is problematic according to
* Removed trailing spaces | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax_parallel.py",
"new_path": "jax/lax/lax_parallel.py",
"diff": "@@ -441,6 +441,9 @@ def _all_to_all_split_axis_rule(vals, which_mapped, split_axis, concat_axis,\nout = _moveaxis(1, concat_axis + 1, out)\nreturn out, True\n+def _all_to_all_transpose_r... | Python | Apache License 2.0 | google/jax | Support differentiation through jax.lax.all_to_all (#3733)
* Support differentiation through jax.lax.all_to_all
Credit to @levskaya for the solution.
* Test gradient of all_to_all
We are testing all_to_all through pswapaxes, since general all_to_all is problematic according to https://github.com/google/jax/issues/1332.
* Removed trailing spaces |
260,298 | 15.07.2020 06:56:19 | -7,200 | 68c8dc781e9623afa01f5d0ec9cdde93c7e2bc6d | Added installation note for jax2tf with GPU support. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/README.md",
"new_path": "jax/experimental/jax2tf/README.md",
"diff": "@@ -77,3 +77,10 @@ tf.saved_model.save(my_model, '/some/directory')\n# Restoring (note: the restored model does *not* require JAX to run, just XLA).\nrestored_model =... | Python | Apache License 2.0 | google/jax | Added installation note for jax2tf with GPU support. (#3750) |
260,298 | 15.07.2020 14:12:42 | -7,200 | d55c47d2cfc031b1340cca776ece33faf54c8060 | [jax2tf] Fix error in sorting with TF graphs. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -1104,9 +1104,9 @@ def _sort(*operand: TfVal, dimension: int, is_stable: bool, num_keys: int) -> Tu\nraise NotImplementedError(\"TODO: implement stable version of ... | Python | Apache License 2.0 | google/jax | [jax2tf] Fix error in sorting with TF graphs. (#3764) |
260,411 | 15.07.2020 18:19:22 | -10,800 | 23c279f033a4fc6b836f4c9f12d82a8bcc1dda17 | [jax2tf] Relax tolerance for JaxPrimitiveTest.test_unary_elementwise_lgamma_float32 | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"new_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"diff": "@@ -171,7 +171,12 @@ class JaxPrimitiveTest(tf_test_util.JaxToTfTestCase):\n# non-special cases are equal\nself.assertAllClose(result_ja... | Python | Apache License 2.0 | google/jax | [jax2tf] Relax tolerance for JaxPrimitiveTest.test_unary_elementwise_lgamma_float32 (#3767) |
260,266 | 15.07.2020 19:19:40 | -3,600 | 150d028d9d381b47ff58b9b71dc7167ef3f6dc7f | Update scipy.ndimage.map_coordinates docstring | [
{
"change_type": "MODIFY",
"old_path": "jax/scipy/ndimage.py",
"new_path": "jax/scipy/ndimage.py",
"diff": "@@ -111,10 +111,10 @@ def _map_coordinates(input, coordinates, order, mode, cval):\n@_wraps(scipy.ndimage.map_coordinates, lax_description=textwrap.dedent(\"\"\"\\\n- Only linear interpolation... | Python | Apache License 2.0 | google/jax | Update scipy.ndimage.map_coordinates docstring (#3762) |
260,298 | 16.07.2020 15:44:20 | -7,200 | 7b18a4e857f0a11f6203fe8fff7a4d87f22ce107 | [jax2tf] Fix interface of ConvertAndCompare function. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/tf_test_util.py",
"new_path": "jax/experimental/jax2tf/tests/tf_test_util.py",
"diff": "@@ -62,7 +62,6 @@ class JaxToTfTestCase(jtu.JaxTestCase):\ndef ConvertAndCompare(self, func_jax: Callable, *args,\ncustom_assert: Optional[Cal... | Python | Apache License 2.0 | google/jax | [jax2tf] Fix interface of ConvertAndCompare function. (#3776) |
260,355 | 18.07.2020 21:36:23 | -3,600 | d43393405abe30b2da2561bd29b4d8b08a6063bf | Add a TypeVar to while_loop definition. | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax_control_flow.py",
"new_path": "jax/lax/lax_control_flow.py",
"diff": "@@ -22,7 +22,7 @@ import functools\nimport inspect\nimport itertools\nimport operator\n-from typing import Callable, Sequence\n+from typing import Callable, Sequence, TypeVar\nim... | Python | Apache License 2.0 | google/jax | Add a TypeVar to while_loop definition. (#3792) |
260,424 | 20.07.2020 14:59:13 | -7,200 | dd3cb8213507f5f57f23b554862f7e703abb7c6e | Enable buffer donation for GPU. | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/pxla.py",
"new_path": "jax/interpreters/pxla.py",
"diff": "@@ -795,7 +795,7 @@ def parallel_callable(fun, backend, axis_name, axis_size, global_axis_size,\nelse:\nout_tuple = build_out_tuple()\nbackend = xb.get_backend(backend)\n- if backend.p... | Python | Apache License 2.0 | google/jax | Enable buffer donation for GPU. (#3800) |
260,335 | 21.07.2020 06:48:55 | 25,200 | 3a3c8ea8f21332bce8bd44bdd62deec059e0fe62 | tweak jnp.repeat not to use jnp on shapes
tweak jnp.repeat not to use jnp on shapes | [
{
"change_type": "MODIFY",
"old_path": "jax/numpy/lax_numpy.py",
"new_path": "jax/numpy/lax_numpy.py",
"diff": "@@ -2543,16 +2543,18 @@ def repeat(a, repeats, axis=None, *, total_repeat_length=None):\na = ravel(a)\naxis = 0\n- repeats = array(repeats)\n+ # If total_repeat_length is not given, can't ... | Python | Apache License 2.0 | google/jax | tweak jnp.repeat not to use jnp on shapes (#3810)
tweak jnp.repeat not to use jnp on shapes |
260,476 | 21.07.2020 15:41:08 | 14,400 | 74d363e552ca916d48eb116366eca3bb7eccf23f | fix extremely minor typo
"ijnputs" -> "inputs" | [
{
"change_type": "MODIFY",
"old_path": "jax/random.py",
"new_path": "jax/random.py",
"diff": "@@ -280,7 +280,7 @@ def fold_in(key, data):\ndata: a 32bit integer representing data to be folded in to the key.\nReturns:\n- A new PRNGKey that is a deterministic function of the ijnputs and is\n+ A new PR... | Python | Apache License 2.0 | google/jax | fix extremely minor typo (#3815)
"ijnputs" -> "inputs" |
260,335 | 23.07.2020 19:38:56 | 25,200 | 67ad5eb5a1bf4db3c61a28d7f7233f971e4c1263 | add result_shape option to xla_computation
add result_shape option to xla_computation | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -228,7 +228,8 @@ def xla_computation(fun: Callable,\naxis_env: Optional[Sequence[Tuple[AxisName, int]]] = None,\nbackend: Optional[str] = None,\ntuple_args: bool = False,\n- instantiate_const_outputs: bool = T... | Python | Apache License 2.0 | google/jax | add result_shape option to xla_computation (#3844)
add result_shape option to xla_computation |
260,335 | 23.07.2020 19:49:04 | 25,200 | cc9528d97dba5c88c15c089a4bac069d7407a61b | fix thread locality bug in custom_derivatives
* fix thread locality bug in custom_derivatives
fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -635,6 +635,11 @@ class TraceState(threading.local):\nself.substack = [Sublevel(0)]\nself.initial_style = False\n+ def set_state(self, other: 'TraceState') -> None:\n+ self.trace_stack = other.trace_stack\n+... | Python | Apache License 2.0 | google/jax | fix thread locality bug in custom_derivatives (#3845)
* fix thread locality bug in custom_derivatives
fixes #3843 |
260,335 | 23.07.2020 20:59:12 | 25,200 | e2424e3b242a521dc02eaa11228861ddc354b41b | attempt to fix CI failure (from test?) | [
{
"change_type": "MODIFY",
"old_path": "tests/api_test.py",
"new_path": "tests/api_test.py",
"diff": "@@ -2534,13 +2534,17 @@ class CustomJVPTest(jtu.JaxTestCase):\ndef run():\nreturn jax.grad(unroll)(jnp.array(1.0), jnp.array([1.0]))\n+ expected = run()\n+\n# we just don't want this to crash\nn_wor... | Python | Apache License 2.0 | google/jax | attempt to fix CI failure (from #3845 test?) (#3846) |
260,411 | 24.07.2020 10:14:08 | -10,800 | 86732620c9c996c60ffd2666e18e56b3142c437d | [jax2tf] Expand the support for jax.remat.
In the simplest forms, remat is already handled by the `process_call`.
But when the `remat` has outputs computed from values captured from
an outer environment, we need to also implement `post_process_call`. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -305,8 +305,17 @@ class TensorFlowTrace(core.Trace):\nvals_out: Sequence[TfValOrUnit] = f.call_wrapped(*vals)\nreturn [TensorFlowTracer(self, v) for v in vals_out]... | Python | Apache License 2.0 | google/jax | [jax2tf] Expand the support for jax.remat. (#3828)
In the simplest forms, remat is already handled by the `process_call`.
But when the `remat` has outputs computed from values captured from
an outer environment, we need to also implement `post_process_call`. |
260,411 | 24.07.2020 10:14:34 | -10,800 | 55cd8279c857456a0797639899259906dce570cf | [jax2tf] Selectively disable some primitive tests on TPU.
Currently, all primitive tests are disabled on TPU, but only some
cases fail. This PR simply disables the selected failing tests on
TPU, so that we can enable the rest by default. Future PRs will
address each failure individually. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"new_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"diff": "@@ -119,6 +119,9 @@ class JaxPrimitiveTest(tf_test_util.JaxToTfTestCase):\nelif harness.params[\"dtype\"] is dtypes.bfloat16:\nraise uni... | Python | Apache License 2.0 | google/jax | [jax2tf] Selectively disable some primitive tests on TPU. (#3835)
Currently, all primitive tests are disabled on TPU, but only some
cases fail. This PR simply disables the selected failing tests on
TPU, so that we can enable the rest by default. Future PRs will
address each failure individually. |
260,335 | 24.07.2020 12:52:52 | 25,200 | 57c2fcb0cdb58768790fed13e6dd171bba235d90 | tweak parallel collective translation rule api
also remove standard_parallel_primitive helper function, which wasn't
very helpful | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/pxla.py",
"new_path": "jax/interpreters/pxla.py",
"diff": "@@ -944,7 +944,7 @@ def get_num_partitions(*partitions):\nreturn num_partitions_set.pop()\n-class ResultToPopulate(object): pass\n+class ResultToPopulate: pass\nresult_to_populate = Re... | Python | Apache License 2.0 | google/jax | tweak parallel collective translation rule api (#3853)
also remove standard_parallel_primitive helper function, which wasn't
very helpful |
260,335 | 24.07.2020 15:54:21 | 25,200 | 5e91965723ac16dda361435d1bfcd4dc99201537 | delete standard_parallel_primitive helper
delete standard_parallel_primitive helper
meant to include this in it's even in the PR message! | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/__init__.py",
"new_path": "jax/lax/__init__.py",
"diff": "@@ -334,5 +334,4 @@ from .lax_parallel import (\npsum,\npsum_p,\npswapaxes,\n- standard_pmap_primitive,\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax_parallel.py",
... | Python | Apache License 2.0 | google/jax | delete standard_parallel_primitive helper (#3858)
delete standard_parallel_primitive helper
meant to include this in #3853, it's even in the PR message! |
260,335 | 26.07.2020 22:38:14 | 25,200 | c9d8acd2e921efdbc01b2208fa9f790a9c312933 | put core trace state in a threading.local class
this is a refinement of the fix in so that we no longer need
TraceState.set_state (and so that is easier to adapt) | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -39,7 +39,7 @@ from .pprint_util import pp, vcat, PrettyPrint\n# TODO(dougalm): compilation cache breaks the leak detector. Consisder solving.\ncheck_leaks = False\n-\"\"\"Disables internal invariant checks.... | Python | Apache License 2.0 | google/jax | put core trace state in a threading.local class (#3869)
this is a refinement of the fix in #3845, so that we no longer need
TraceState.set_state (and so that #3370 is easier to adapt) |
260,326 | 28.07.2020 02:45:36 | -19,080 | 3aa37d3af4324f53c72270296ca905189ab6fd99 | Replicating sort_complex functionality from np.sort_complex to jax.numpy | [
{
"change_type": "MODIFY",
"old_path": "docs/jax.numpy.rst",
"new_path": "docs/jax.numpy.rst",
"diff": "@@ -255,6 +255,7 @@ Not every function in NumPy is implemented; contributions are welcome!\nsinh\nsometrue\nsort\n+ sort_complex\nsplit\nsqrt\nsquare\n"
},
{
"change_type": "MODIFY",
"... | Python | Apache License 2.0 | google/jax | Replicating sort_complex functionality from np.sort_complex to jax.numpy (#3870) |
260,335 | 27.07.2020 21:51:12 | 25,200 | 616d63b19ae08c6d58f1de8d7c41fe78ebded157 | fix vmap error, fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -907,7 +907,7 @@ def _mapped_axis_size(tree, vals, dims, name):\n# TODO(mattjj,phawkins): add a way to inspect pytree kind more directly\nif tree == tree_flatten((core.unit,) * tree.num_leaves)[1]:\nlines1 = [... | Python | Apache License 2.0 | google/jax | fix vmap error, fixes #3877 (#3879) |
260,299 | 28.07.2020 16:27:07 | -7,200 | 7506a3e5f0137f48415def878bea71c5977dfbd0 | Fix flaky generated_fun_test.py test | [
{
"change_type": "MODIFY",
"old_path": "tests/generated_fun_test.py",
"new_path": "tests/generated_fun_test.py",
"diff": "@@ -186,7 +186,7 @@ def inner_prod(xs, ys):\nreturn sum(jnp.sum(x * y) for x, y in xys)\ndef jvp_fd(fun, args, tangents):\n- EPS = 1e-4\n+ EPS = 1e-3\ndef eval_eps(eps):\nreturn ... | Python | Apache License 2.0 | google/jax | Fix flaky generated_fun_test.py test (#3885) |
260,335 | 28.07.2020 19:46:00 | 25,200 | 30980742c57f3b507d74b5ae79e9a75b5f57bc08 | refine population_count type check
* refine population_count type check
fixes
* allow signed/unsigned ints for population_count
https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/compiler/xla/service/shape_inference.cc;l=314?q=xla%20f:shape_inference.cc
* make lax_reference.population_count handle signed | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -2242,7 +2242,7 @@ ad.defjvp_zero(or_p)\nxor_p = standard_naryop([_bool_or_int, _bool_or_int], 'xor')\nad.defjvp_zero(xor_p)\n-population_count_p = standard_unop(_bool_or_int, 'population_count')\n+pop... | Python | Apache License 2.0 | google/jax | refine population_count type check (#3887)
* refine population_count type check
fixes #3886
* allow signed/unsigned ints for population_count
https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/compiler/xla/service/shape_inference.cc;l=314?q=xla%20f:shape_inference.cc
* make lax_reference.population_count handle signed |
260,335 | 30.07.2020 00:42:32 | 25,200 | b3806ce87438ecbeb52ffa5ee7755adaf21eef2b | add placeholder enable_omnistaging method | [
{
"change_type": "MODIFY",
"old_path": "jax/config.py",
"new_path": "jax/config.py",
"diff": "@@ -113,6 +113,8 @@ class Config(object):\nself.complete_absl_config(absl.flags)\nalready_configured_with_absl = True\n+ def enable_omnistaging(self):\n+ pass # placeholder\nclass NameSpace(object):\ndef __... | Python | Apache License 2.0 | google/jax | add placeholder enable_omnistaging method (#3907) |
260,335 | 30.07.2020 22:27:01 | 25,200 | 146cf49fa04ce8e476da6981f52688b63bef7f4e | delay backend check for xla_computation | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/xla.py",
"new_path": "jax/interpreters/xla.py",
"diff": "@@ -369,7 +369,10 @@ def jaxpr_literals(jaxpr):\ndef jaxpr_subcomp(c, jaxpr, backend, axis_env, consts, name_stack, *args):\n- platform = xb.get_backend(backend).platform\n+ if backend n... | Python | Apache License 2.0 | google/jax | delay backend check for xla_computation (#3920) |
260,335 | 31.07.2020 15:11:01 | 25,200 | 843d710116138fba67728fafb53a4eb667cbf55c | allow mask to return output logical shape
When the `mask` argument `out_shape` is not provided, or when it has
value `None`, return the output logical shape to the user. | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -1241,7 +1241,7 @@ def _papply(fun):\nreturn papply_fun, axis_name\n-def mask(fun: Callable, in_shapes, out_shape) -> Callable:\n+def mask(fun: Callable, in_shapes, out_shape=None) -> Callable:\n_check_callabl... | Python | Apache License 2.0 | google/jax | allow mask to return output logical shape (#3929)
When the `mask` argument `out_shape` is not provided, or when it has
value `None`, return the output logical shape to the user. |
260,335 | 31.07.2020 22:20:58 | 25,200 | ff96de935b186609da473cf6f769901a17f77aa9 | add dummy eval context | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -733,6 +733,10 @@ def initial_style_staging():\nfinally:\ntrace_state.initial_style = prev\n+@contextmanager\n+def eval_context():\n+ yield # dummy implementation for forward compatibility\n+\n# ------------... | Python | Apache License 2.0 | google/jax | add dummy eval context (#3932) |
260,355 | 01.08.2020 21:33:11 | -3,600 | 8a8bb702d29c8036807d53b6110fc2fe2051559a | Catch invalid (negative) in/out axes in vmap.
Catch invalid (negative) in/out axes in vmap. | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -869,16 +869,22 @@ def vmap(fun: Callable, in_axes=0, out_axes=0) -> Callable:\n# rather than raising an error. https://github.com/google/jax/issues/2367\nin_axes = tuple(in_axes)\n- if not all(isinstance(l, (... | Python | Apache License 2.0 | google/jax | Catch invalid (negative) in/out axes in vmap. (#3926)
Catch invalid (negative) in/out axes in vmap. |
260,285 | 03.08.2020 17:17:48 | -7,200 | 7de784afbf719590583e362102a2bcc0fa5037a0 | Fix _CheckAgainstNumpy arg order | [
{
"change_type": "MODIFY",
"old_path": "tests/lax_numpy_test.py",
"new_path": "tests/lax_numpy_test.py",
"diff": "@@ -2582,7 +2582,7 @@ class LaxBackedNumpyTests(jtu.JaxTestCase):\nargs_maker = lambda: [rng.randn(3, 4).astype(\"float32\")]\nnp_op = lambda x: np.asarray(x).astype(jnp.int32)\njnp_op =... | Python | Apache License 2.0 | google/jax | Fix _CheckAgainstNumpy arg order (#3935) |
260,298 | 04.08.2020 09:24:53 | -7,200 | ea6d1dafc2f698a831cfdbb7faf1f4dab47ed102 | [jax2tf] First draft of conversion of population_count.
tf.raw_ops.PopulationCount returns a Tensor with elements of type
uint8. In JAX, the type of the result is the same as the type of
the input, hence the need to use tf.cast in the conversion
function. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -364,7 +364,7 @@ for unexpected in [\n# Primitives that are not yet implemented must be explicitly declared here.\ntf_not_yet_impl = [\n- lax.population_count_p, l... | Python | Apache License 2.0 | google/jax | [jax2tf] First draft of conversion of population_count. (#3890)
tf.raw_ops.PopulationCount returns a Tensor with elements of type
uint8. In JAX, the type of the result is the same as the type of
the input, hence the need to use tf.cast in the conversion
function. |
260,287 | 04.08.2020 12:41:30 | 0 | 60db0a073747bd11d654e31a380f23ee9de95ab3 | Improve a comment and a docstring in partial_eval | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/partial_eval.py",
"new_path": "jax/interpreters/partial_eval.py",
"diff": "@@ -605,6 +605,12 @@ def partial_eval_jaxpr(jaxpr: TypedJaxpr, unknowns: Sequence[bool],\n`jaxpr_known` = lambda ki, ui: let ka = ki + 2\nin (ki + 3, *, ka)\n'jaxpr_unk... | Python | Apache License 2.0 | google/jax | Improve a comment and a docstring in partial_eval |
260,285 | 06.08.2020 03:36:46 | -7,200 | 2e873b7d050a09dd99881d9339353a18042cf7b3 | Fix jnp.right_shift incorrect on unsigned ints | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -506,7 +506,9 @@ class Tracer:\ndef __rxor__(self, other): return self.aval._rxor(self, other)\ndef __invert__(self): return self.aval._invert(self)\ndef __lshift__(self, other): return self.aval._lshift(sel... | Python | Apache License 2.0 | google/jax | Fix jnp.right_shift incorrect on unsigned ints (#3958) |
260,299 | 06.08.2020 18:37:32 | -7,200 | 09f4339c165f3885583144644b8fa9d33788e3b3 | Rm two unused lines from lax_parallel.psum_bind | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax_parallel.py",
"new_path": "jax/lax/lax_parallel.py",
"diff": "@@ -955,8 +955,6 @@ def omnistaging_enabler() -> None:\n# tracing time.\n@psum_p.def_custom_bind\ndef psum_bind(*args, axis_name, **params):\n- if len(args) == 1 and not isinstance(args[... | Python | Apache License 2.0 | google/jax | Rm two unused lines from lax_parallel.psum_bind (#3978) |
260,411 | 07.08.2020 13:30:26 | -10,800 | e39420b55d715a6e73aae0691936945975775451 | [jax2tf] Another attempt to work around the nested XLA compilation bug
* [jax2tf] Another attempt to work around the nested compilation bug for XLA
This time we abandon trying to force compilation, and instead we
use XlaDynamicSlice. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/README.md",
"new_path": "jax/experimental/jax2tf/README.md",
"diff": "@@ -92,36 +92,6 @@ with both [jaxlib](../../../../../#pip-installation) and\n## Known limitations\n-#### Errors due to nested invocations of XLA\n-\n-In some rare cas... | Python | Apache License 2.0 | google/jax | [jax2tf] Another attempt to work around the nested XLA compilation bug (#3965)
* [jax2tf] Another attempt to work around the nested compilation bug for XLA
This time we abandon trying to force compilation, and instead we
use XlaDynamicSlice. |
260,298 | 07.08.2020 17:22:17 | -7,200 | b756f29457a717ab47b791538dc029681e8f5c80 | [jax2tf] implementation of select_and_gather_add conversion.
* [jax2tf] First draft of select_and_gather_add conversion.
The case where we need to reduce precision for packing is left
unimplemented, as packing is anyway a temporary hack until XLA
implements ReduceWindow on tuples (see b/73062247). | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -23,6 +23,7 @@ from jax import ad_util\nfrom jax import api\nfrom jax import core\nfrom jax import custom_derivatives\n+from jax import dtypes\nfrom jax import lax... | Python | Apache License 2.0 | google/jax | [jax2tf] implementation of select_and_gather_add conversion. (#3987)
* [jax2tf] First draft of select_and_gather_add conversion.
The case where we need to reduce precision for packing is left
unimplemented, as packing is anyway a temporary hack until XLA
implements ReduceWindow on tuples (see b/73062247). |
260,355 | 08.08.2020 17:22:54 | -3,600 | 038c85dad0ca6d7b39ccee3f8838d29630f97e8f | Improve type annotations for `jit` and `vmap`. | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -29,7 +29,7 @@ import functools\nimport inspect\nimport itertools as it\nimport threading\n-from typing import Any, Callable, Iterable, Optional, Sequence, Tuple, Union\n+from typing import Any, Callable, Iter... | Python | Apache License 2.0 | google/jax | Improve type annotations for `jit` and `vmap`. (#3938) |
260,335 | 10.08.2020 07:20:09 | 25,200 | d46ea969533dbfe4451517ac9a5e51dbdeee6d5d | add helper for flax to be omnistaging-compatible | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/partial_eval.py",
"new_path": "jax/interpreters/partial_eval.py",
"diff": "@@ -1075,6 +1075,15 @@ def trace_to_jaxpr_final(fun: lu.WrappedFun, in_avals: Sequence[AbstractValue]):\ndel master\nreturn jaxpr, out_avals, consts\n+def partial_eval_... | Python | Apache License 2.0 | google/jax | add helper for flax to be omnistaging-compatible (#4004) |
260,299 | 10.08.2020 19:09:34 | -7,200 | 89e8a0886b17385556074f1c31d5048981794bb8 | Fix warnings in pmap_test.py
Also add note to developer documentation re: testing pmap. | [
{
"change_type": "MODIFY",
"old_path": "docs/developer.rst",
"new_path": "docs/developer.rst",
"diff": "@@ -116,6 +116,14 @@ the tests of ``jax.numpy.pad`` using::\nThe Colab notebooks are tested for errors as part of the documentation build.\n+Note that to run the full pmap tests on a (multi-core) ... | Python | Apache License 2.0 | google/jax | Fix warnings in pmap_test.py (#3977)
Also add note to developer documentation re: testing pmap. |
260,335 | 10.08.2020 18:11:57 | 25,200 | 6a3b920507dcae7a4e4dfa513155222fa0c6feb1 | make make_jaxpr work on tracer example args
(don't use xla.abstractify) | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -1625,7 +1625,7 @@ def make_jaxpr(fun: Callable,\nwrapped, _ = argnums_partial(wrapped, dyn_argnums, args)\njax_args, in_tree = tree_flatten((args, kwargs))\njaxtree_fun, out_tree = flatten_fun(wrapped, in_tre... | Python | Apache License 2.0 | google/jax | make make_jaxpr work on tracer example args (#4014)
(don't use xla.abstractify) |
260,335 | 10.08.2020 20:48:03 | 25,200 | 09d8ac14de8c9edc2c9a14becb4963bfdebda605 | use fewer internal APIs in custom interp notebook | [
{
"change_type": "MODIFY",
"old_path": "docs/notebooks/Writing_custom_interpreters_in_Jax.ipynb",
"new_path": "docs/notebooks/Writing_custom_interpreters_in_Jax.ipynb",
"diff": "{\n+ \"nbformat\": 4,\n+ \"nbformat_minor\": 0,\n+ \"metadata\": {\n+ \"colab\": {\n+ \"name\": \"Writing custom interpret... | Python | Apache License 2.0 | google/jax | use fewer internal APIs in custom interp notebook (#4016) |
260,411 | 11.08.2020 12:39:54 | -10,800 | 0b99ca896d8cfecd737af71f1a140b9956143d4c | [jax2tf] Disable the CI tests for jax2tf.
We do this to see if this reduces the incidence of errors fetching
the tf-nightly package. These tests are being run when we import
the code in Google. | [
{
"change_type": "MODIFY",
"old_path": ".github/workflows/ci-build.yaml",
"new_path": ".github/workflows/ci-build.yaml",
"diff": "@@ -110,9 +110,6 @@ jobs:\necho \"JAX_NUM_GENERATED_CASES=$JAX_NUM_GENERATED_CASES\"\necho \"JAX_ENABLE_X64=$JAX_ENABLE_X64\"\necho \"JAX_OMNISTAGING=$JAX_OMNISTAGING\"\n... | Python | Apache License 2.0 | google/jax | [jax2tf] Disable the CI tests for jax2tf. (#4019)
We do this to see if this reduces the incidence of errors fetching
the tf-nightly package. These tests are being run when we import
the code in Google. |
260,287 | 11.08.2020 11:45:58 | -7,200 | cd54dd977897f868c3f55723604054d43db801e8 | Implement the invertible decorator in terms of custom_vjp
This simplifies the implementation significantly, as we can piggyback
off of all the logic for custom derivatives. For example, the previous
implementation didn't support differentiating with respect to a subset
of function parameters, but the new one does. | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -2044,7 +2044,7 @@ def custom_gradient(fun):\ndef _ensure_tuple(x: Union[int, Iterable[int]]) -> Tuple[int, ...]:\nreturn (x,) if isinstance(x, int) else tuple(x)\n-def invertible(fun: Callable, concrete: bool... | Python | Apache License 2.0 | google/jax | Implement the invertible decorator in terms of custom_vjp (#3957)
This simplifies the implementation significantly, as we can piggyback
off of all the logic for custom derivatives. For example, the previous
implementation didn't support differentiating with respect to a subset
of function parameters, but the new one does. |
260,299 | 11.08.2020 16:09:36 | -7,200 | 1e07712955939d6f8f461fc259b12a20808782b3 | Fix typos in api.py docstrings | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -118,7 +118,7 @@ def jit(fun: Callable[..., T],\nstatic_argnums: An int or collection of ints specifying which positional\narguments to treat as static (compile-time constant). Operations that only\ndepend on ... | Python | Apache License 2.0 | google/jax | Fix typos in api.py docstrings (#4021) |
260,335 | 11.08.2020 20:36:51 | 25,200 | c564aca77710df0599715d4231b7d5b7dd46984a | skip more ode tests on gpu, b/c slow to compile | [
{
"change_type": "MODIFY",
"old_path": "tests/ode_test.py",
"new_path": "tests/ode_test.py",
"diff": "@@ -59,7 +59,7 @@ class ODETest(jtu.JaxTestCase):\njtu.check_grads(integrate, (y0, ts, *args), modes=[\"rev\"], order=2,\natol=tol, rtol=tol)\n- @jtu.skip_on_devices(\"tpu\")\n+ @jtu.skip_on_devices... | Python | Apache License 2.0 | google/jax | skip more ode tests on gpu, b/c slow to compile (#4028) |
260,411 | 12.08.2020 09:20:26 | -10,800 | ece05d2813942594cc904c306ac485b4846882bd | [host_callback] Add support for custom gradients inside control-flow
* [host_callback] Add support for custom gradients inside control-flow
Specifically, add support for rewriting JAXPR that contains
custom_vjp_call_jaxpr_p and custom_jvp_call_jaxpr_p.
Fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/host_callback.py",
"new_path": "jax/experimental/host_callback.py",
"diff": "@@ -136,6 +136,7 @@ import itertools\nfrom jax import api\nfrom jax import core\n+from jax import custom_derivatives\nfrom jax import lax\nfrom jax.lib import pytree\... | Python | Apache License 2.0 | google/jax | [host_callback] Add support for custom gradients inside control-flow (#4029)
* [host_callback] Add support for custom gradients inside control-flow
Specifically, add support for rewriting JAXPR that contains
custom_vjp_call_jaxpr_p and custom_jvp_call_jaxpr_p.
Fixes #4015. |
260,701 | 12.08.2020 19:52:42 | -3,600 | 6e4ec7cb81be0dc06dd0bf0ffe789abb8a2ae87a | Fix broadcasting in random.uniform and randint. | [
{
"change_type": "MODIFY",
"old_path": "jax/random.py",
"new_path": "jax/random.py",
"diff": "@@ -353,8 +353,8 @@ def uniform(key: jnp.ndarray,\nshape. Default ().\ndtype: optional, a float dtype for the returned values (default float64 if\njax_enable_x64 is true, otherwise float32).\n- minval: opti... | Python | Apache License 2.0 | google/jax | Fix broadcasting in random.uniform and randint. (#4035) |
260,411 | 13.08.2020 13:02:22 | -10,800 | 206d2f9890dac4da6855933ae486f8a270d477dd | [host_callback] Fix handling of params[donated_invars]
There was some confusion when rewriting xla_call primitives and
the donated_invars was not set to be equal to the length of the
invars.
Fixes:
Fixes: | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/host_callback.py",
"new_path": "jax/experimental/host_callback.py",
"diff": "@@ -654,7 +654,10 @@ def _rewrite_eqn(eqn: core.JaxprEqn, eqns: List[core.JaxprEqn],\ndict(\neqn.params,\ncall_jaxpr=_rewrite_jaxpr(call_jaxpr, True,\n- True)), eqn.s... | Python | Apache License 2.0 | google/jax | [host_callback] Fix handling of params[donated_invars] (#4040)
There was some confusion when rewriting xla_call primitives and
the donated_invars was not set to be equal to the length of the
invars.
Fixes: #4015
Fixes: #3863 |
260,298 | 13.08.2020 12:27:16 | -7,200 | 3458f1fc1643eb5b1f71c598a16baf7e6d739307 | [jax2tf] Change np.array dtype to jnp.float32 when target dtype is bfloat16.
* Change np.array dtype to jnp.float32 when target dtype is bfloat16.
This ensures that the conversion for tf.convert_to_tensor is well
defined without losing precision.
Fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -57,11 +57,39 @@ def _is_tfval(v: TfVal) -> bool:\nif isinstance(v, (tf.Tensor, tf.Variable)):\nreturn True\ntry:\n- tf.convert_to_tensor(v)\n+ # Note: this conver... | Python | Apache License 2.0 | google/jax | [jax2tf] Change np.array dtype to jnp.float32 when target dtype is bfloat16. (#3959)
* Change np.array dtype to jnp.float32 when target dtype is bfloat16.
This ensures that the conversion for tf.convert_to_tensor is well
defined without losing precision.
Fixes #3942. |
260,411 | 13.08.2020 15:20:07 | -10,800 | 7cf236f83f0494f2ef0777f0ba450df20973dde2 | [jax2tf] Clean up test_qr and disable (temporarily) some tests for shirt_right
on TPU
This is a follow-up from that enabled some more integer types for TPU
for JAX.
There are still some silent errors to investigate for shift_right on TPU. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/primitive_harness.py",
"new_path": "jax/experimental/jax2tf/tests/primitive_harness.py",
"diff": "@@ -413,7 +413,7 @@ lax_linalg_qr = tuple(\nshape=shape,\ndtype=dtype,\nfull_matrices=full_matrices)\n- for dtype in jtu.dtypes.all\... | Python | Apache License 2.0 | google/jax | [jax2tf] Clean up test_qr and disable (temporarily) some tests for shirt_right (#4044)
on TPU
This is a follow-up from #4032 that enabled some more integer types for TPU
for JAX.
There are still some silent errors to investigate for shift_right on TPU. |
260,298 | 14.08.2020 09:58:41 | -7,200 | 41f1eb412c2522be34795cd47148f3e39405088c | [jax2tf] Added note about nextafter support in TensorFlow.
The TF implementation of nextafter only supports float32/64 params. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"new_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"diff": "@@ -361,9 +361,11 @@ class JaxPrimitiveTest(tf_test_util.JaxToTfTestCase):\nif dtype is np.float32 and jtu.device_under_test() == \"tpu\... | Python | Apache License 2.0 | google/jax | [jax2tf] Added note about nextafter support in TensorFlow. (#4056)
The TF implementation of nextafter only supports float32/64 params. |
260,298 | 14.08.2020 12:24:57 | -7,200 | bd14f2343aece428df85808d23cace1ede0b2821 | [jax2tf] Fix bfloat16 failures on CPU/GPU with latest tf-nightly. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"new_path": "jax/experimental/jax2tf/tests/primitives_test.py",
"diff": "@@ -282,8 +282,13 @@ class JaxPrimitiveTest(tf_test_util.JaxToTfTestCase):\ndef test_unary_elementwise(self, harness: primitive_harness.... | Python | Apache License 2.0 | google/jax | [jax2tf] Fix bfloat16 failures on CPU/GPU with latest tf-nightly. (#4060) |
260,272 | 14.08.2020 21:05:46 | -7,200 | b44a1bacaf14833f44907dbd13399bf04d162fee | Note flush-denormal-to-zero behavior in nextafter.
Since imports of functions from lax.py in lax_numpy.py previously
didn't copy docstrings, add option to extract docstring from the
lax function. To avoid duplication of the short description,
discard first line of the lax function's docstring, and pass
the rest as lax_description to _wraps. | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -113,7 +113,18 @@ def sign(x: Array) -> Array:\nreturn sign_p.bind(x)\ndef nextafter(x1: Array, x2: Array) -> Array:\n- r\"\"\"Returns the next representable value after `x1` in the direction of `x2`.\... | Python | Apache License 2.0 | google/jax | Note flush-denormal-to-zero behavior in nextafter. (#4049)
Since imports of functions from lax.py in lax_numpy.py previously
didn't copy docstrings, add option to extract docstring from the
lax function. To avoid duplication of the short description,
discard first line of the lax function's docstring, and pass
the rest as lax_description to _wraps. |
260,588 | 15.08.2020 17:47:28 | -7,200 | 1316562b0b96eb4ce10b0661bb113e1be3b9406c | Canonicalize result dtype to fix double precision problem in ldexp | [
{
"change_type": "MODIFY",
"old_path": "jax/numpy/lax_numpy.py",
"new_path": "jax/numpy/lax_numpy.py",
"diff": "@@ -757,7 +757,7 @@ _INT_DTYPES = {\n@_wraps(np.ldexp)\n@jit\ndef ldexp(x1, x2):\n- dtype = _result_dtype(np.ldexp, x1, x2)\n+ dtype = dtypes.canonicalize_dtype(_result_dtype(np.ldexp, x1,... | Python | Apache License 2.0 | google/jax | Canonicalize result dtype to fix double precision problem in ldexp (#4069) |
260,335 | 15.08.2020 22:55:18 | 25,200 | 8232f2deee5d1e0c78496699f35225b2f5d6226b | adapt _TempAxisName for unhashable objs
adapt _TempAxisName for unhashable objs | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -364,7 +364,7 @@ def xla_computation(fun: Callable,\nreturn xla.AxisEnv(nreps, (), (), None)\nelse:\nnreps = nreps * prod(size for name, size in axis_env)\n- names, sizes = zip(*axis_env)\n+ names, sizes = unz... | Python | Apache License 2.0 | google/jax | adapt _TempAxisName for unhashable objs (#4077)
adapt _TempAxisName for unhashable objs |
260,411 | 17.08.2020 09:50:47 | -10,800 | 22b92c5122ab5af6f5e4560f9be08f5649ae7653 | Increase tolerance for CPU test LaxBackedNumpyTests::testCorrCoef | [
{
"change_type": "MODIFY",
"old_path": "tests/lax_numpy_test.py",
"new_path": "tests/lax_numpy_test.py",
"diff": "@@ -3623,7 +3623,10 @@ class LaxBackedNumpyTests(jtu.JaxTestCase):\nself._CheckAgainstNumpy(\nnp_fun, jnp_fun, args_maker, check_dtypes=False,\ntol=1e-2 if jtu.device_under_test() == \"t... | Python | Apache License 2.0 | google/jax | Increase tolerance for CPU test LaxBackedNumpyTests::testCorrCoef (#4080) |
260,298 | 17.08.2020 12:57:41 | -7,200 | ec90c3587adb569491bf54c7b447844491925337 | [jax2tf] Fix bfloat16 bug in select_and_gather_add conversion.
* [jax2tf] Fix bfloat16 bug in select_and_gather_add conversion.
This fix makes it possible to run bfloat16 tests for the jax2tf
conversion of select_and_gather_add. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -799,8 +799,8 @@ def _select_and_gather_add(tangents: TfVal,\npadding: Sequence[Tuple[int, int]]):\n# Note: this function follows the pattern in\n# jax.lax._select... | Python | Apache License 2.0 | google/jax | [jax2tf] Fix bfloat16 bug in select_and_gather_add conversion. (#4058)
* [jax2tf] Fix bfloat16 bug in select_and_gather_add conversion.
This fix makes it possible to run bfloat16 tests for the jax2tf
conversion of select_and_gather_add. |
260,298 | 17.08.2020 16:32:34 | -7,200 | 4c22e012d27ca865d429492f0e5956791907a981 | [jax2tf] Explictly raise an error when attempting to convert _select_and_scatter_add_p. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -395,7 +395,6 @@ for unexpected in [\n# Primitives that are not yet implemented must be explicitly declared here.\ntf_not_yet_impl = [\nlax.reduce_p, lax.reduce_wi... | Python | Apache License 2.0 | google/jax | [jax2tf] Explictly raise an error when attempting to convert _select_and_scatter_add_p. (#4084) |
260,287 | 17.08.2020 20:11:43 | -7,200 | 1ba4e06c9101f5fcc3fa587e76b1247b72a5fa1b | Initial version of gmap
Co-autored-by: Matthew Johnson | [
{
"change_type": "ADD",
"old_path": null,
"new_path": "jax/experimental/general_map.py",
"diff": "+# Copyright 2020 Google LLC\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of t... | Python | Apache License 2.0 | google/jax | Initial version of gmap (#4006)
Co-autored-by: Matthew Johnson <mattjj@google.com> |
260,287 | 18.08.2020 12:02:28 | -7,200 | 36f3a369c73f9d293b600dc97cbd3be4e31bf708 | Separate axis splitting from collective handling
This makes the vmap collective handling a bit more flexible and allowed
me to add ppermute support. | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/batching.py",
"new_path": "jax/interpreters/batching.py",
"diff": "@@ -133,23 +133,20 @@ class BatchTrace(Trace):\nif all(bdim is not_mapped for bdim in dims_in):\nreturn primitive.bind(*vals_in, **params)\nelif config.omnistaging_enabled and ... | Python | Apache License 2.0 | google/jax | Separate axis splitting from collective handling (#4082)
This makes the vmap collective handling a bit more flexible and allowed
me to add ppermute support. |
260,485 | 18.08.2020 16:40:45 | 14,400 | 29f7fa753a24225800a7d7ba64db6441ca6a4dac | Add implementation of jax.numpy.trim_zeros | [
{
"change_type": "MODIFY",
"old_path": "docs/jax.numpy.rst",
"new_path": "docs/jax.numpy.rst",
"diff": "@@ -342,6 +342,7 @@ Not every function in NumPy is implemented; contributions are welcome!\ntril\ntril_indices\ntril_indices_from\n+ trim_zeros\ntriu\ntriu_indices\ntriu_indices_from\n"
},
{
... | Python | Apache License 2.0 | google/jax | Add implementation of jax.numpy.trim_zeros (#4027) |
260,268 | 18.08.2020 18:49:29 | 14,400 | afeefa6f1fb8c5fdd296e5bedf4d4e1c1df70b45 | Add typing and namedtuple to `optimizers.py`, improve documentation. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/optimizers.py",
"new_path": "jax/experimental/optimizers.py",
"diff": "@@ -64,8 +64,21 @@ Notice that an optimizer implementation has a lot of flexibility in the form of\nopt_state: it just has to be a pytree of JaxTypes (so that it can be pas... | Python | Apache License 2.0 | google/jax | Add typing and namedtuple to `optimizers.py`, improve documentation. (#3570) |
260,321 | 19.08.2020 19:36:28 | -3,600 | b4efb31f1a9c38b6e635b1b096adc496866fb235 | Docs: Fix broken link in quickstart | [
{
"change_type": "MODIFY",
"old_path": "docs/notebooks/quickstart.ipynb",
"new_path": "docs/notebooks/quickstart.ipynb",
"diff": "\"id\": \"Xpy1dSgNqCP4\"\n},\n\"source\": [\n- \"We'll be generating random data in the following examples. One big difference between NumPy and JAX is how you generate r... | Python | Apache License 2.0 | google/jax | Docs: Fix broken link in quickstart (#4102) |
260,335 | 19.08.2020 15:51:40 | 25,200 | 9ba282f321c7b68d0a3f5b70c3c352bcd43a4b91 | add axis_index to supported multi-host collectives
also make the error message less confusing | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/pxla.py",
"new_path": "jax/interpreters/pxla.py",
"diff": "@@ -726,8 +726,9 @@ def parallel_callable(fun, backend, axis_name, axis_size, global_axis_size,\nif is_multi_host_pmap:\nused_collectives = set(xla.jaxpr_collectives(jaxpr))\nif not us... | Python | Apache License 2.0 | google/jax | add axis_index to supported multi-host collectives (#4107)
also make the error message less confusing |
260,298 | 20.08.2020 09:05:30 | -7,200 | 22b593b6b9888dafb5308bc8e689d2d272ab623e | [jax2tf] General conversion of reduce_window.
* [jax2tf] General conversion of reduce_window.
Much like scatter_p, the conversion works as well as the underlying
reduction function (e.g. reduce_window_max is not properly converted
for the int8 dtype, because tf.math.maximum is not defined for int8
tensors). | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/jax2tf.py",
"new_path": "jax/experimental/jax2tf/jax2tf.py",
"diff": "@@ -781,9 +781,6 @@ tf_impl[lax.argmax_p] = functools.partial(_argminmax, tf.math.argmax)\n_add_fn = tf.function(tf.math.add)\n_ge_fn = tf.function(tf.math.greater_eq... | Python | Apache License 2.0 | google/jax | [jax2tf] General conversion of reduce_window. (#4093)
* [jax2tf] General conversion of reduce_window.
Much like scatter_p, the conversion works as well as the underlying
reduction function (e.g. reduce_window_max is not properly converted
for the int8 dtype, because tf.math.maximum is not defined for int8
tensors). |
260,441 | 20.08.2020 16:46:55 | -7,200 | 1e8ac248635a14249dd17269f8e165698603d6ea | Add rademacher, maxwell, double_sided_maxwell and weibull_min to jax.random. | [
{
"change_type": "MODIFY",
"old_path": "jax/random.py",
"new_path": "jax/random.py",
"diff": "@@ -1349,3 +1349,132 @@ def _t(key, df, shape, dtype):\nhalf_df = lax.div(df, two)\ng = gamma(key_n, half_df, shape, dtype)\nreturn n * jnp.sqrt(half_df / g)\n+\n+\n+def rademacher(key, shape, dtype=dtypes.... | Python | Apache License 2.0 | google/jax | Add rademacher, maxwell, double_sided_maxwell and weibull_min to jax.random. (#4104) |
260,335 | 20.08.2020 14:44:26 | 25,200 | 306314590e0c4565178320b13acac40adaee1f8d | use xla.backend_compile function in pxla.py
* use xla.backend_compile function in pxla.py
Not only is this useful for profiling, it also helps us do google-internal logging for the XLA team. | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -302,12 +302,9 @@ def _cpp_jit(\noptions.parameter_is_tupled_arguments = True\nreturn (\n- # We call xla._backend_compile to ensure the XLA computation appears\n+ # We call xla.backend_compile to ensure the XL... | Python | Apache License 2.0 | google/jax | use xla.backend_compile function in pxla.py (#4113)
* use xla.backend_compile function in pxla.py
Not only is this useful for profiling, it also helps us do google-internal logging for the XLA team. |
260,335 | 21.08.2020 11:10:53 | 25,200 | b2a239ca9e7ffa9008e5b1db6adcac66f2bf02f2 | don't force backend creation in xla_computation | [
{
"change_type": "MODIFY",
"old_path": "jax/api.py",
"new_path": "jax/api.py",
"diff": "@@ -611,17 +611,13 @@ def _xla_computation(\nelse:\nout_tuple = build_out_tuple()\n- backend_ = xb.get_backend(backend)\n- if backend_.platform in (\"gpu\", \"tpu\"):\n- donated_invars = xla.set_up_aliases(c, xla... | Python | Apache License 2.0 | google/jax | don't force backend creation in xla_computation |
260,644 | 21.08.2020 20:19:51 | -7,200 | 9d733dd7d7edb3660493654c7aa807e996f99a37 | Doc: change suggested way of starting the profiler | [
{
"change_type": "MODIFY",
"old_path": "docs/profiling.md",
"new_path": "docs/profiling.md",
"diff": "@@ -37,11 +37,13 @@ from a running program.\n```python\nimport jax.profiler\n- jax.profiler.start_server(9999)\n+ server = jax.profiler.start_server(9999)\n```\nThis starts the profiler server that ... | Python | Apache License 2.0 | google/jax | Doc: change suggested way of starting the profiler (#4120) |
260,335 | 21.08.2020 17:43:15 | 25,200 | 66a02b69713a773a837b7f9160dacb6c9a6d397f | only construct one axis_index_p primitive
Before this change, there were two versions, one used with omnistaging
and one without. But that made bookkeeping hard and buggy. This change
defines the axis_index_p primitive in core.py. Some of its rules are
still changed when omnistaging is enabled. | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -1436,7 +1436,7 @@ axis_frame = None\ndef omnistaging_enabler() -> None:\nglobal thread_local_state, call_bind, find_top_trace, initial_style_staging, \\\nnew_master, reset_trace_state, extend_axis_env, axis... | Python | Apache License 2.0 | google/jax | only construct one axis_index_p primitive
Before this change, there were two versions, one used with omnistaging
and one without. But that made bookkeeping hard and buggy. This change
defines the axis_index_p primitive in core.py. Some of its rules are
still changed when omnistaging is enabled. |
260,335 | 21.08.2020 19:58:06 | 25,200 | 56b3688db90cc6c943a15eda4ca7e7c673c17e14 | make random.choice error when shape isn't sequence
fixes | [
{
"change_type": "MODIFY",
"old_path": "jax/random.py",
"new_path": "jax/random.py",
"diff": "@@ -556,6 +556,9 @@ def choice(key, a, shape=(), replace=True, p=None):\nReturns:\nAn array of shape `shape` containing samples from `a`.\n\"\"\"\n+ if not isinstance(shape, Sequence):\n+ raise TypeError(\"... | Python | Apache License 2.0 | google/jax | make random.choice error when shape isn't sequence
fixes #4124 |
260,298 | 24.08.2020 21:29:22 | -7,200 | 0cc3802b0453efa85b45d98099590302608936a9 | Fix documentation of scatter_* operations.
* Fix documentation of scatter_* operations.
This commit changes the documentation of the `unique_indices`
parameter to scatter to better capture its intended meaning in
XLA. | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -868,8 +868,9 @@ def scatter_add(operand: Array, scatter_indices: Array, updates: Array,\nrelate.\nindices_are_sorted: whether `scatter_indices` is known to be sorted. If\ntrue, may improve performance... | Python | Apache License 2.0 | google/jax | Fix documentation of scatter_* operations. (#4138)
* Fix documentation of scatter_* operations.
This commit changes the documentation of the `unique_indices`
parameter to scatter to better capture its intended meaning in
XLA. |
260,510 | 24.08.2020 21:08:23 | 25,200 | 774b5f688e69a33396309a1d0dadb58783fbba86 | Remove frame check assertion in `extend_axis_env`. | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -1579,8 +1579,7 @@ def omnistaging_enabler() -> None:\ntry:\nyield\nfinally:\n- frame_ = thread_local_state.trace_state.axis_env.pop()\n- assert frame is frame_\n+ thread_local_state.trace_state.axis_env.pop... | Python | Apache License 2.0 | google/jax | Remove frame check assertion in `extend_axis_env`. |
260,335 | 25.08.2020 05:38:41 | 25,200 | f4b05bc9ea18bda3dfab1cab77b2e0a36379a1c7 | make pe.abstract_eval_fun use omnistaging | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/partial_eval.py",
"new_path": "jax/interpreters/partial_eval.py",
"diff": "@@ -315,11 +315,10 @@ call_param_updaters: Dict[core.Primitive, Callable] = {}\ndef abstract_eval_fun(fun, *avals, **params):\n- pvals_in = [PartialVal.unknown(a) for a... | Python | Apache License 2.0 | google/jax | make pe.abstract_eval_fun use omnistaging (#4139) |
260,335 | 26.08.2020 10:21:56 | 25,200 | 1d93991003cba20235c21a51e313efa5e06a218e | allow random.choice to accept ndarray input
* allow random.choice to accept ndarray `a`
follow-up to to allow ndarray inputs to be passed
* add jax.random.choice tests to cover ndarray input
* don't use callables in test params
it can mess with pytest-xdist because of hashing by id | [
{
"change_type": "MODIFY",
"old_path": "jax/random.py",
"new_path": "jax/random.py",
"diff": "@@ -98,6 +98,14 @@ def _is_prng_key(key: jnp.ndarray) -> bool:\n### utilities\n+# TODO(mattjj,jakevdp): add more info to error message, use this utility more\n+def _asarray(x):\n+ \"\"\"A more restrictive j... | Python | Apache License 2.0 | google/jax | allow random.choice to accept ndarray input (#4145)
* allow random.choice to accept ndarray `a`
follow-up to #4137 to allow ndarray inputs to be passed
* add jax.random.choice tests to cover ndarray input
* don't use callables in test params
it can mess with pytest-xdist because of hashing by id |
260,298 | 27.08.2020 09:46:32 | -7,200 | 1dc71b2f41bc17ef6d0854661fb64e9a668babea | [jax2tf] Add testing for add/mul/min/max conversion.
* [jax2tf] Add testing for add/mul/min/max conversion.
Only certain types are supported for each of the operations above.
This commit adds previously missing tests to make this explicit. | [
{
"change_type": "MODIFY",
"old_path": "jax/experimental/jax2tf/tests/primitive_harness.py",
"new_path": "jax/experimental/jax2tf/tests/primitive_harness.py",
"diff": "@@ -22,6 +22,7 @@ from typing import Any, Callable, Dict, Iterable, Optional, NamedTuple, Sequence\nfrom absl import testing\nfrom j... | Python | Apache License 2.0 | google/jax | [jax2tf] Add testing for add/mul/min/max conversion. (#4142)
* [jax2tf] Add testing for add/mul/min/max conversion.
Only certain types are supported for each of the operations above.
This commit adds previously missing tests to make this explicit. |
260,298 | 27.08.2020 09:47:19 | -7,200 | 80114e51d643e945f14b66bd576208cd30d8e691 | Add a boolean to _check_shapelike to accept or reject shapes
* Add a boolean to _check_shapelike to accept or reject shapes
corresponding to arrays of 0 elements. (Fixes google/jax#3972).
* Added test for failures referenced in issue 3972. | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -4748,8 +4748,10 @@ def _reduce_window_chooser_jvp_rule(prim, g, operand, *, window_dimensions,\ndef _common_reduce_window_shape_rule(operand, window_dimensions,\nwindow_strides, padding, base_dilation... | Python | Apache License 2.0 | google/jax | Add a boolean to _check_shapelike to accept or reject shapes (#4108)
* Add a boolean to _check_shapelike to accept or reject shapes
corresponding to arrays of 0 elements. (Fixes google/jax#3972).
* Added test for failures referenced in issue 3972. |
260,298 | 27.08.2020 11:04:32 | -7,200 | 4d7396aa02f1d8f739b60e18ed75de4efcb4a427 | Implement a proper shape checking rule for scatter.
The implementation is based on the corresponding shape inference
code in `tensorflow/compiler/xla/service/shape_inference.cc`. The
tests added in `tests/lax_test.py` are similarly mirroring the
corresponding tests in tensorflow, with slight adaptations for
the particular setting of JAX. | [
{
"change_type": "MODIFY",
"old_path": "jax/lax/lax.py",
"new_path": "jax/lax/lax.py",
"diff": "@@ -3952,7 +3952,131 @@ def _scatter_dtype_rule(operand, scatter_indices, updates, **kwargs):\n_check_same_dtypes(\"scatter\", False, operand.dtype, updates.dtype)\nreturn dtypes.canonicalize_dtype(operan... | Python | Apache License 2.0 | google/jax | Implement a proper shape checking rule for scatter. (#4144)
The implementation is based on the corresponding shape inference
code in `tensorflow/compiler/xla/service/shape_inference.cc`. The
tests added in `tests/lax_test.py` are similarly mirroring the
corresponding tests in tensorflow, with slight adaptations for
the particular setting of JAX. |
260,287 | 18.08.2020 09:14:38 | 0 | 7210d6f5d01ba7c64c7552628f37d66523feac9b | Add support for binding axis_name in gmap
This allows executing collectives over the gmapped axes. This requires
some extra manipulation of the gmapped jaxpr, since gmap exposes a
single logical axis name, but evaluates the program using multiple
"physical" axes.
This also fixes some bugs around handling `multiple_returns` in
vmap collective implementation. | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -1579,7 +1579,8 @@ def omnistaging_enabler() -> None:\ntry:\nyield\nfinally:\n- thread_local_state.trace_state.axis_env.pop()\n+ frame_ = thread_local_state.trace_state.axis_env.pop()\n+ assert frame is fram... | Python | Apache License 2.0 | google/jax | Add support for binding axis_name in gmap
This allows executing collectives over the gmapped axes. This requires
some extra manipulation of the gmapped jaxpr, since gmap exposes a
single logical axis name, but evaluates the program using multiple
"physical" axes.
This also fixes some bugs around handling `multiple_returns` in
vmap collective implementation. |
260,298 | 28.08.2020 16:27:32 | -7,200 | 04f9ff7ff4ddb08649e94542900cd2c14755ca06 | Addition of one more conclusive polynomial comparison case.
* Addition of one more conclusive polynomial comparison case.
In the case when the difference between two polynomials is a
constant, it is possible to conclusively compare them. This commit
adds such a case to masking.Poly.__ge__.
* Added a few relevant tests in tests.masking_test.test_Poly_compare. | [
{
"change_type": "MODIFY",
"old_path": "jax/interpreters/masking.py",
"new_path": "jax/interpreters/masking.py",
"diff": "@@ -200,6 +200,10 @@ class Poly(dict):\nreturn False # See above.\nelif self == other:\nreturn True\n+ else:\n+ diff = self - other\n+ if diff.is_constant:\n+ return int(diff) >=... | Python | Apache License 2.0 | google/jax | Addition of one more conclusive polynomial comparison case. (#4167)
* Addition of one more conclusive polynomial comparison case.
In the case when the difference between two polynomials is a
constant, it is possible to conclusively compare them. This commit
adds such a case to masking.Poly.__ge__.
* Added a few relevant tests in tests.masking_test.test_Poly_compare. |
260,287 | 28.08.2020 20:03:39 | -7,200 | a33f4dd8c8853a988e97b57542627869533a2ee7 | Add support for axis_index inside vmap
Also, reorganize the code to put all `axis_index` related functions in
`lax_parallel.py`, next to all other parallel collectives. | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -645,7 +645,7 @@ class TraceStack:\nreturn new\nclass Sublevel(int): pass\n-AxisEnvFrame = namedtuple('AxisEnvFrame', ['name', 'size', 'tag'])\n+AxisEnvFrame = namedtuple('AxisEnvFrame', ['name', 'size', 'ma... | Python | Apache License 2.0 | google/jax | Add support for axis_index inside vmap (#4168)
Also, reorganize the code to put all `axis_index` related functions in
`lax_parallel.py`, next to all other parallel collectives. |
260,411 | 30.08.2020 12:38:14 | -10,800 | 634c6259df26484a7e716db47105c589057d3580 | More renaming of master to main in JAX internals | [
{
"change_type": "MODIFY",
"old_path": "jax/core.py",
"new_path": "jax/core.py",
"diff": "@@ -645,7 +645,7 @@ class TraceStack:\nreturn new\nclass Sublevel(int): pass\n-AxisEnvFrame = namedtuple('AxisEnvFrame', ['name', 'size', 'master_trace'])\n+AxisEnvFrame = namedtuple('AxisEnvFrame', ['name', 's... | Python | Apache License 2.0 | google/jax | More renaming of master to main in JAX internals (#4179) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.