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,411
21.12.2020 11:01:29
-7,200
beb0e02fb48e9e7663ce8afe964059f82247a5cf
[host_callback] Added support for jax.named_call.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/host_callback.py", "new_path": "jax/experimental/host_callback.py", "diff": "@@ -558,7 +558,7 @@ batching.primitive_batchers[id_tap_p] = _id_tap_batching_rule\ndef _id_tap_masking_rule(operands, operands_logical_shapes, **params):\n- new_param...
Python
Apache License 2.0
google/jax
[host_callback] Added support for jax.named_call.
260,472
17.09.2020 18:33:30
-10,800
3796cf33387ec6e804ae3bc9baaefc344a57027b
Covering an execution path on array creation: when an array is created with an unspecified type (None), there was no typechecking that the inferred type is compatible with JAX. The issue has been documented and a test with the use case added.
[ { "change_type": "MODIFY", "old_path": "jax/_src/numpy/lax_numpy.py", "new_path": "jax/_src/numpy/lax_numpy.py", "diff": "@@ -2733,6 +2733,8 @@ def atleast_3d(*arys):\ndef array(object, dtype=None, copy=True, order=\"K\", ndmin=0):\nif order is not None and order != \"K\":\nraise NotImplementedError...
Python
Apache License 2.0
google/jax
Covering an execution path on array creation: when an array is created with an unspecified type (None), there was no typechecking that the inferred type is compatible with JAX. The issue has been documented and a test with the use case added.
260,335
23.12.2020 11:04:59
28,800
19057260b96185368dda332713b69fd03273a715
remove unchanged file
[ { "change_type": "MODIFY", "old_path": "jax/experimental/loops.py", "new_path": "jax/experimental/loops.py", "diff": "@@ -548,8 +548,7 @@ class _WhileBuilder(_LoopBuilder):\n# Conditional function is not allowed to modify the scope state\nfor ms, init_ms in zip(carried_state_names, args):\nif not (s...
Python
Apache License 2.0
google/jax
remove unchanged file
260,335
29.12.2020 11:43:44
28,800
cdc1b0546a3281c2959866576c7a2d2168d7eda1
remove AbstractValue.at_least_vspace default impl
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -800,7 +800,7 @@ class AbstractValue:\n_num_buffers: int = 1 # number of buffers used to represent the value.\ndef at_least_vspace(self):\n- return self\n+ raise NotImplementedError(\"must override\")\ndef _...
Python
Apache License 2.0
google/jax
remove AbstractValue.at_least_vspace default impl
260,411
05.01.2021 09:47:59
-7,200
f2453207310088332b50f82fe573ae99b2c7b12a
Trigger the re-building of documentation
[ { "change_type": "MODIFY", "old_path": "docs/developer.rst", "new_path": "docs/developer.rst", "diff": "@@ -233,7 +233,8 @@ For each automated documentation build you can see the\nIf you want to test the documentation generation on Readthedocs, you can push code to the ``test-docs``\nbranch. That br...
Python
Apache License 2.0
google/jax
Trigger the re-building of documentation
260,411
06.01.2021 13:36:37
-7,200
aec6192ed90d75fceb59353b7e4e1c8511626b5b
Fix float0 handling
[ { "change_type": "MODIFY", "old_path": "jax/experimental/host_callback.py", "new_path": "jax/experimental/host_callback.py", "diff": "@@ -875,25 +875,20 @@ def _add_transform(params: Dict, name: str, *transform_params) -> Dict:\n# TODO(necula): there must be a better way to do this.\n# The Attribute...
Python
Apache License 2.0
google/jax
Fix float0 handling
260,411
06.01.2021 15:02:26
-7,200
7468b9df467ce95cde277fbb3ceb9f1f2d0cd612
Turn off flaky test LaxControlFlowTest.test_cond_typecheck_param
[ { "change_type": "MODIFY", "old_path": "tests/lax_control_flow_test.py", "new_path": "tests/lax_control_flow_test.py", "diff": "@@ -2457,6 +2457,7 @@ class LaxControlFlowTest(jtu.JaxTestCase):\nlambda: core.check_jaxpr(jaxpr))\ndef test_cond_typecheck_param(self):\n+ raise SkipTest(\"TODO: test is f...
Python
Apache License 2.0
google/jax
Turn off flaky test LaxControlFlowTest.test_cond_typecheck_param
260,613
06.01.2021 14:43:05
0
0e73bb9281c12f832635b2c371ca41ecda33cdb2
inf checker tests
[ { "change_type": "MODIFY", "old_path": "tests/debug_nans_test.py", "new_path": "tests/debug_nans_test.py", "diff": "@@ -77,5 +77,55 @@ class DebugNaNsTest(jtu.JaxTestCase):\nf(1)\n+class DebugInfsTest(jtu.JaxTestCase):\n+\n+ def setUp(self):\n+ self.cfg = config.read(\"jax_debug_infs\")\n+ config.up...
Python
Apache License 2.0
google/jax
inf checker tests
260,340
07.01.2021 17:03:39
-32,400
3614d829facd338867617851d7fcac8ecbe8c2c9
Fix typo in jax/_src/random.py
[ { "change_type": "MODIFY", "old_path": "jax/_src/random.py", "new_path": "jax/_src/random.py", "diff": "@@ -658,7 +658,7 @@ def multivariate_normal(key: jnp.ndarray,\nbroadcasting together the batch shapes of ``mean`` and ``cov``.\ndtype: optional, a float dtype for the returned values (default floa...
Python
Apache License 2.0
google/jax
Fix typo in jax/_src/random.py Co-authored-by: Matthew Johnson <mattjj@google.com>
260,411
07.01.2021 07:57:59
-7,200
231ea59f757d720b13ffaf9fea58bdcecc917844
[jax2tf] Fix infinite recursion when converting some bfloat16 arrays This fix takes advantage of a new change in TF to share the bfloat16 dtype definition with JAX Fixes: Relates to:
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -77,30 +77,12 @@ def _is_tfval(v: TfVal) -> bool:\nreturn False\ndef _safe_convert_to_tensor(val, dtype=None) -> TfVal:\n- \"\"\"Converts val to a Tensor.\n-\n- Th...
Python
Apache License 2.0
google/jax
[jax2tf] Fix infinite recursion when converting some bfloat16 arrays This fix takes advantage of a new change in TF to share the bfloat16 dtype definition with JAX Fixes: #5106 Relates to: #5108
260,411
07.01.2021 14:54:47
-7,200
274d970644ad55ca782acab4a7cd6b0fa668c138
[jax2tf] Finish the conversion of lax.sort We were blocked until now due to limited support for the XlaSort op. Also removed the patching of the XlaPad output shape; now XlaPad has shape inference.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/README.md", "new_path": "jax/experimental/jax2tf/README.md", "diff": "@@ -126,7 +126,7 @@ for CUDA. One must be mindful to install a version of CUDA that is compatible\nwith both [jaxlib](https://github.com/google/jax/blob/master/README...
Python
Apache License 2.0
google/jax
[jax2tf] Finish the conversion of lax.sort We were blocked until now due to limited support for the XlaSort op. Also removed the patching of the XlaPad output shape; now XlaPad has shape inference.
260,411
07.01.2021 08:23:17
-7,200
9c8ec132450c95d4ef2e8cc1fbd8b09835e750cf
[jax2tf] Fix/disable tests for non-omnistaging
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -180,7 +180,14 @@ def convert(fun: Callable, *,\ndef converted_fun(*args: TfVal) -> TfVal:\n# TODO: is there a better way to check if we are inside a transformatio...
Python
Apache License 2.0
google/jax
[jax2tf] Fix/disable tests for non-omnistaging
260,335
05.01.2021 08:14:16
28,800
7a9f8f96eaf3d323f9189c27cf6e36d22d26ec69
make c++ jit sensitive to global omnistaging state fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -259,7 +259,7 @@ def _cpp_jit(\nraise ValueError(\"can't specify both a device and a backend for jit, \"\nf\"got device={device} and backend={backend}.\")\n- def cache_miss(*args, **kwargs):\n+ def cache_miss(...
Python
Apache License 2.0
google/jax
make c++ jit sensitive to global omnistaging state fixes #5206 Co-authored-by: Jean-Baptiste Lespiau <jblespiau@google.com>
260,335
08.01.2021 12:13:09
28,800
3f85b300c8b2770dd0aef0c78b883b4820f27412
temporary skip test
[ { "change_type": "MODIFY", "old_path": "tests/random_test.py", "new_path": "tests/random_test.py", "diff": "@@ -954,6 +954,7 @@ class LaxRandomTest(jtu.JaxTestCase):\nself._CompileAndCheck(random.PRNGKey, args_maker)\ndef test_prng_errors(self):\n+ raise SkipTest(\"temporary skip while mattjj debugs...
Python
Apache License 2.0
google/jax
temporary skip test PiperOrigin-RevId: 350812117
260,631
12.01.2021 13:46:52
28,800
47f254d252a0549e8174727e62912c86cd17f9bf
Copybara import of the project: by Chris Jones [JAX] Use XLA AllGather op for GPU (when supported).
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -670,6 +670,10 @@ def _expand(dim, size, index, x):\nout = lax.full(shape, lax._const(x, 0))\nreturn lax.dynamic_update_index_in_dim(out, x, index, dim)\n+def _allgather(x, dim, siz...
Python
Apache License 2.0
google/jax
Copybara import of the project: -- 474fdfcde05b4e5f17cfcb087a832d37c41ddffe by Chris Jones <cjfj@google.com>: [JAX] Use XLA AllGather op for GPU (when supported). PiperOrigin-RevId: 351440599
260,444
11.12.2020 13:29:35
-3,600
f443e19141c3d04a6e2947a0dcde8d23039af786
JVP rule for SVD works now for complex input.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/linalg.py", "new_path": "jax/_src/lax/linalg.py", "diff": "@@ -1171,7 +1171,6 @@ def svd_jvp_rule(primals, tangents, full_matrices, compute_uv):\nraise NotImplementedError(\n\"Singular value decomposition JVP not implemented for full matrices\")\n...
Python
Apache License 2.0
google/jax
JVP rule for SVD works now for complex input.
260,403
13.01.2021 12:52:28
28,800
2ca247f43ed898e4c9d683c97cedf921d0601362
Fix pdot translation rule. This concerns the direct pdot translation rule, which is not used during spmd lowering.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -828,13 +828,15 @@ batching.primitive_batchers[pdot_p] = _pdot_vmap_batching_rule\ndef _pdot_translation_rule(c, x, y, *, axis_name, pos_contract, pos_batch,\naxis_env, platform):\n...
Python
Apache License 2.0
google/jax
Fix pdot translation rule. This concerns the direct pdot translation rule, which is not used during spmd lowering.
260,631
13.01.2021 13:02:53
28,800
9c2aed32eff652973cac1b02cc409e91f9fbefbf
Add # pytype: disable=import-error to a couple of import statements to allow cpu=ppc builds (the imported modules aren't currently linked into jaxlib when building for ppc).
[ { "change_type": "MODIFY", "old_path": "jax/lib/__init__.py", "new_path": "jax/lib/__init__.py", "diff": "@@ -59,7 +59,7 @@ else:\njax_jit = xla_client._xla.jax_jit\ntry:\n- from jaxlib import cusolver\n+ from jaxlib import cusolver # pytype: disable=import-error\nexcept ImportError:\ncusolver = Non...
Python
Apache License 2.0
google/jax
Add # pytype: disable=import-error to a couple of import statements to allow --cpu=ppc builds (the imported modules aren't currently linked into jaxlib when building for ppc). PiperOrigin-RevId: 351648541
260,287
11.01.2021 10:44:00
0
66f3deb97853d2eb20e3ca6ada3bfb99f0fc9fa1
Make xmapped functions with no axis resources callable more than once When no XLA lowering was involved (i.e. when using a purely vectorized schedule), we used to return `f.call_wrapped` as the xmapped function. This obviously didn't end well when someone tried to call it multiple times, which this patch should fix.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/maps.py", "new_path": "jax/experimental/maps.py", "diff": "@@ -304,7 +304,9 @@ def make_xmap_callable(fun: lu.WrappedFun,\nEXPERIMENTAL_SPMD_LOWERING,\n*in_avals)\nelse:\n- return f.call_wrapped\n+ # We have to trace again, because `f` is a li...
Python
Apache License 2.0
google/jax
Make xmapped functions with no axis resources callable more than once When no XLA lowering was involved (i.e. when using a purely vectorized schedule), we used to return `f.call_wrapped` as the xmapped function. This obviously didn't end well when someone tried to call it multiple times, which this patch should fix.
260,411
14.01.2021 14:11:52
-3,600
555a215cfb12f09dc70dce275f250a2557ffc339
[loops] Extend loops with support for pytrees Also improve error checking and error messages.
[ { "change_type": "MODIFY", "old_path": "docs/CHANGELOG.rst", "new_path": "docs/CHANGELOG.rst", "diff": "@@ -24,8 +24,17 @@ jax 0.2.9 (Unreleased)\nThese are the release notes for JAX.\n+next version\n+-------------\n+* `GitHub commits <https://github.com/google/jax/compare/jax-v0.2.8...jax-v0.2.9>`_...
Python
Apache License 2.0
google/jax
[loops] Extend loops with support for pytrees Also improve error checking and error messages.
260,411
14.01.2021 21:35:42
-7,200
042aae732507d0c024240e62071b3b7977c02c2d
[host_callback] Fix bug when id_tap takes no arguments but has a result. Fixes:
[ { "change_type": "MODIFY", "old_path": "jax/experimental/host_callback.py", "new_path": "jax/experimental/host_callback.py", "diff": "@@ -461,9 +461,11 @@ def id_tap(tap_func, arg, *, result=None, tap_with_device=False, **kwargs):\n# Return the results, but add a dependency on the call, to ensure it...
Python
Apache License 2.0
google/jax
[host_callback] Fix bug when id_tap takes no arguments but has a result. Fixes: #5414
260,411
18.09.2020 11:59:20
-10,800
66ad382112ee15dece2317c00cba288785e566bb
[jax2tf] Add support for Add for uint32
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/g3doc/primitives_with_limited_support.md", "new_path": "jax/experimental/jax2tf/g3doc/primitives_with_limited_support.md", "diff": "# Primitives with limited support\n-*Last generated on (YYYY-MM-DD): 2021-01-07*\n+*Last generated on (Y...
Python
Apache License 2.0
google/jax
[jax2tf] Add support for Add for uint32
260,411
15.01.2021 14:40:37
-7,200
0e932aeb725145769dced9d183152b2b2d01dcb8
Update debug_nans_test.py Fix typo
[ { "change_type": "MODIFY", "old_path": "tests/debug_nans_test.py", "new_path": "tests/debug_nans_test.py", "diff": "@@ -81,7 +81,7 @@ class DebugInfsTest(jtu.JaxTestCase):\ndef setUp(self):\nself.cfg = config.read(\"jax_debug_infs\")\n- config.update(\"jax_debug_inf\", True)\n+ config.update(\"jax_d...
Python
Apache License 2.0
google/jax
Update debug_nans_test.py Fix typo
260,485
17.01.2021 00:35:45
18,000
a47abe06edfdc90384901b5bc6742a688785b46b
Added check for shapes of arguments in jvp, resolves issue
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1720,6 +1720,12 @@ def _jvp(fun: lu.WrappedFun, primals, tangents):\nf\"Got primal dtype {_dtype(p)} and so expected tangent dtype \"\nf\"{core.primal_dtype_to_tangent_dtype(_dtype(p))}, but got \"\nf\"tangen...
Python
Apache License 2.0
google/jax
Added check for shapes of arguments in jvp, resolves issue #5226
260,287
11.12.2020 11:57:22
0
166e1296b98f551c9de320b875ae686f73aa8413
Clean up xmap tests Move `pdot` tests to a separate class. Automatically run all regular xmap tests with both the `pmap`-style lowering and `sharded_jit`-style lowering.
[ { "change_type": "MODIFY", "old_path": "tests/xmap_test.py", "new_path": "tests/xmap_test.py", "diff": "@@ -78,22 +78,8 @@ def with_mesh(named_shape, f):\nreturn f(*args, **kwargs)\nreturn new_f\n-def use_spmd_lowering(f):\n- def new_f(*args, **kwargs):\n- if jtu.device_under_test() != \"tpu\":\n- r...
Python
Apache License 2.0
google/jax
Clean up xmap tests Move `pdot` tests to a separate class. Automatically run all regular xmap tests with both the `pmap`-style lowering and `sharded_jit`-style lowering.
260,411
18.01.2021 03:37:55
28,800
6bf634921e12854aead78e7707a05715d19075f2
Copybara import of the project: by George Necula [jax2tf] Update limitations Some bugs were fixed on the TF-side, and we can remove some limitations. COPYBARA_INTEGRATE_REVIEW=https://github.com/google/jax/pull/5449 from gnecula:jax2tf_limit
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/g3doc/primitives_with_limited_support.md", "new_path": "jax/experimental/jax2tf/g3doc/primitives_with_limited_support.md", "diff": "# Primitives with limited support for jax2tf\n-*Last generated on (YYYY-MM-DD): 2021-01-15*\n+*Last gene...
Python
Apache License 2.0
google/jax
Copybara import of the project: -- 781492e0120ec915f9fdc83479884908f59d113d by George Necula <gcnecula@gmail.com>: [jax2tf] Update limitations Some bugs were fixed on the TF-side, and we can remove some limitations. COPYBARA_INTEGRATE_REVIEW=https://github.com/google/jax/pull/5449 from gnecula:jax2tf_limit 781492e0120ec915f9fdc83479884908f59d113d PiperOrigin-RevId: 352381535
260,411
18.01.2021 14:41:42
-7,200
6d2b976fab8a57edbd10459a33e4e2970f0ec31b
[jax2tf] Start using jit_compile instead of the deprecated experimental_compile
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/examples/saved_model_lib.py", "new_path": "jax/experimental/jax2tf/examples/saved_model_lib.py", "diff": "@@ -89,7 +89,7 @@ def convert_and_save_model(\nenable_xla: whether the jax2tf converter is allowed to use TFXLA ops. If\nFalse, th...
Python
Apache License 2.0
google/jax
[jax2tf] Start using jit_compile instead of the deprecated experimental_compile
260,411
18.01.2021 15:19:01
-7,200
d77a9412571ac8ac828981a8774bff9cf8ea0837
[jax2tf] Reflect in the limitations that add is now implemented for uint32 in TF
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/g3doc/primitives_with_limited_support.md", "new_path": "jax/experimental/jax2tf/g3doc/primitives_with_limited_support.md", "diff": "@@ -59,7 +59,7 @@ More detailed information can be found in the\n| acosh | TF error: op not defined for ...
Python
Apache License 2.0
google/jax
[jax2tf] Reflect in the limitations that add is now implemented for uint32 in TF
260,287
18.01.2021 19:40:46
-3,600
c2871807020c64bda6b32accf721efbd8f03ba1a
Update jax/experimental/maps.py
[ { "change_type": "MODIFY", "old_path": "jax/experimental/maps.py", "new_path": "jax/experimental/maps.py", "diff": "@@ -305,7 +305,7 @@ def make_xmap_callable(fun: lu.WrappedFun,\nEXPERIMENTAL_SPMD_LOWERING,\n*in_avals)\nelse:\n- # We have to trace again, because `f` is a linear function, so we can'...
Python
Apache License 2.0
google/jax
Update jax/experimental/maps.py Co-authored-by: Matthew Johnson <mattjj@google.com>
260,485
18.01.2021 23:21:33
18,000
bd9ac93b6bce32182d8d039a00039d832778d0a4
Added changes requested
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1720,12 +1720,10 @@ def _jvp(fun: lu.WrappedFun, primals, tangents):\nf\"Got primal dtype {_dtype(p)} and so expected tangent dtype \"\nf\"{core.primal_dtype_to_tangent_dtype(_dtype(p))}, but got \"\nf\"tange...
Python
Apache License 2.0
google/jax
Added changes requested
260,335
18.01.2021 20:37:12
28,800
47f7cd468031d2177bfc977a188564f8b5deafdd
avoid printing double periods in error messages
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -385,18 +385,18 @@ class Trace:\nreturn self.sublift(val)\nelse:\nraise escaped_tracer_error(\n- val, f\"Can't lift sublevels {val._trace.sublevel} to {sublevel}.\")\n+ val, f\"Can't lift sublevels {val._tra...
Python
Apache License 2.0
google/jax
avoid printing double periods in error messages
260,485
19.01.2021 09:12:11
18,000
9260f2c7d7bbffe8b97c866042176bc9b1f9e676
regex check for each test case
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1721,7 +1721,7 @@ def _jvp(fun: lu.WrappedFun, primals, tangents):\nf\"{core.primal_dtype_to_tangent_dtype(_dtype(p))}, but got \"\nf\"tangent dtype {_dtype(t)} instead.\")\nif np.shape(p) != np.shape(t):\n- ...
Python
Apache License 2.0
google/jax
regex check for each test case
260,335
19.01.2021 19:08:23
28,800
0f704514e30ad8eda67eff543874bc06459f511b
add BatchTrace.process_custom_vjp_call It was an oversight not to include this! Notice we have BatchTrace.process_custom_jvp_call. In fact, we can use the same function! We just needed the simplest possible post-process-call which just peels and packages. fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -259,6 +259,8 @@ class BatchTrace(Trace):\nout_dims = out_dims[-len(out_vals) % len(out_dims):]\nreturn [BatchTracer(self, v, d) for v, d in zip(out_vals, out_dims)]\n+ post...
Python
Apache License 2.0
google/jax
add BatchTrace.process_custom_vjp_call It was an oversight not to include this! Notice we have BatchTrace.process_custom_jvp_call. In fact, we can use the same function! We just needed the simplest possible post-process-call which just peels and packages. fixes #5440 Co-authored-by: Roy Frostig <frostig@google.com>
260,485
20.01.2021 21:47:18
18,000
186c97394d30472246409cef57650a4cac64b601
Added test for python scalar
[ { "change_type": "MODIFY", "old_path": "tests/api_test.py", "new_path": "tests/api_test.py", "diff": "@@ -958,6 +958,9 @@ class APITest(jtu.JaxTestCase):\nwith self.assertRaisesRegex(\nValueError, \"jvp called with different primal and tangent shapes\"):\napi.jvp(fun, (jnp.array([1.,2.,3.], dtype=jn...
Python
Apache License 2.0
google/jax
Added test for python scalar
260,335
18.01.2021 10:02:24
28,800
c02d8041f46f33c9f96df61b9f9df97a3bc76c0d
add systematic pdot tests, utility functions Run lots of tests with e.g. ``` env JAX_NUM_GENERATED_CASES=1000 python tests/xmap_test.py PDotTests ```
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -352,11 +352,11 @@ def axis_index(axis_name):\nreturn axis_index_p.bind(axis_name=axis_name)\n-def pdot(x, y, axis_name, pos_contract=((), ())):\n+def pdot(x, y, axis_name, pos_cont...
Python
Apache License 2.0
google/jax
add systematic pdot tests, utility functions Run lots of tests with e.g. ``` env JAX_NUM_GENERATED_CASES=1000 python tests/xmap_test.py PDotTests ```
260,335
21.01.2021 11:09:59
28,800
6d2f8320c39871b66b5c124addff168febd9500d
add xeinsum, an einsum for xmap (& einsum easter egg)
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -16,6 +16,7 @@ Parallelization primitives.\n\"\"\"\nimport collections\n+import string\nimport warnings\nimport numpy as np\n@@ -359,6 +360,128 @@ def pdot(x, y, axis_name, pos_cont...
Python
Apache License 2.0
google/jax
add xeinsum, an einsum for xmap (& einsum easter egg) Co-authored-by: Adam Paszke <apaszke@google.com>
260,335
19.01.2021 18:38:53
28,800
203af4517b157cb98fd7d0a82e36e25b5b6a1bbb
revive the leak checker, as a debug mode
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/control_flow.py", "new_path": "jax/_src/lax/control_flow.py", "diff": "@@ -108,12 +108,6 @@ def _initial_style_jaxprs_with_common_consts(funs: Sequence[Callable],\ndef _abstractify(x):\nreturn raise_to_shaped(core.get_aval(x))\n-def _disable_jit_i...
Python
Apache License 2.0
google/jax
revive the leak checker, as a debug mode Co-authored-by: James Bradbury <jekbradbury@google.com>
260,335
21.01.2021 21:29:09
28,800
9787894d94556c4a3b5c878c00be2c178328fa88
refactor batching transform logic, fix leak checks See PR description in for details.
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -41,7 +41,7 @@ from . import lib\nfrom . import linear_util as lu\nfrom . import ad_util\nfrom . import dtypes\n-from .core import eval_jaxpr\n+from .core import eval_jaxpr, checking_leaks\nfrom .api_util impo...
Python
Apache License 2.0
google/jax
refactor batching transform logic, fix leak checks See PR description in #5492 for details. Co-authored-by: Peter Hawkins <phawkins@google.com>
260,335
23.01.2021 14:17:22
28,800
a7bfebe4bc1cdeca333675ccdfd19e385dbc864b
improve leak checker flag description
[ { "change_type": "MODIFY", "old_path": "jax/config.py", "new_path": "jax/config.py", "diff": "@@ -174,5 +174,7 @@ flags.DEFINE_integer(\nflags.DEFINE_bool(\n'jax_check_tracer_leaks',\nbool_env('JAX_CHECK_TRACER_LEAKS', False),\n- help='Turn on checking for leaked tracers as soon as a trace completes...
Python
Apache License 2.0
google/jax
improve leak checker flag description
260,628
24.01.2021 16:15:31
0
1524b8218907d826c07f33570f3d1cc044e4f0ef
add support for scipy.stats.poisson.cdf
[ { "change_type": "MODIFY", "old_path": "jax/_src/scipy/stats/poisson.py", "new_path": "jax/_src/scipy/stats/poisson.py", "diff": "@@ -18,7 +18,7 @@ import scipy.stats as osp_stats\nfrom jax import lax\nfrom jax._src.numpy.util import _wraps\nfrom jax._src.numpy import lax_numpy as jnp\n-from jax.sci...
Python
Apache License 2.0
google/jax
add support for scipy.stats.poisson.cdf
260,384
25.01.2021 16:52:38
18,000
7865043341c3b67d280004b6828860bc31f6cbdc
Improve batched collective rule for all_gather_p When an all_gather references a vmapped axis, there is a particularly simple way of implementing it: simply "forget" that the axis was mapped, and return the full array. Conveniently, this doesn't require any explicit broadcasting, and makes it possible to use out_axes=None with the results.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -796,14 +796,7 @@ def _all_gather_batched_collective(frame, vals_in, dims_in, all_gather_dimension\nassert axis_name == frame.name, \"batcher called with wrong axis name\"\n(x,), (d...
Python
Apache License 2.0
google/jax
Improve batched collective rule for all_gather_p When an all_gather references a vmapped axis, there is a particularly simple way of implementing it: simply "forget" that the axis was mapped, and return the full array. Conveniently, this doesn't require any explicit broadcasting, and makes it possible to use out_axes=None with the results.
260,384
25.01.2021 17:27:39
18,000
c6a1bba308ba363f7dfaba70b42810c3f591c9c9
Add evaluation rule for all_gather. This should only be called when an all_gather runs on arguments that are not batch tracers, for instance when all_gather-ing a constant.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -743,6 +743,13 @@ def _all_gather_via_psum(x, *, all_gather_dimension, axis_name, axis_index_group\nouts = tree_util.tree_map(partial(_expand, all_gather_dimension, axis_size, index...
Python
Apache License 2.0
google/jax
Add evaluation rule for all_gather. This should only be called when an all_gather runs on arguments that are not batch tracers, for instance when all_gather-ing a constant.
260,384
25.01.2021 17:47:50
18,000
15b95e3ff5655470d55baafea9907b5be32ae8ca
Use np.shape instead of assuming argument has a shape attr
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -745,7 +745,7 @@ def _all_gather_via_psum(x, *, all_gather_dimension, axis_name, axis_index_group\ndef _all_gather_impl(x, *, all_gather_dimension, axis_name, axis_index_groups, axi...
Python
Apache License 2.0
google/jax
Use np.shape instead of assuming argument has a shape attr
260,509
25.01.2021 17:16:29
28,800
9dccf567ce4c2fef45398683a4e05c5a10ec7846
Clarify tracking Clarify tracing a bit and use wording that does not suggest that JAX executed python program.
[ { "change_type": "MODIFY", "old_path": "docs/jaxpr.rst", "new_path": "docs/jaxpr.rst", "diff": "@@ -104,10 +104,11 @@ inline.\nThe ``reduce_sum`` primitive has named parameters ``axes`` and ``input_shape``, in\naddition to the operand ``e``.\n-Note that JAX traces through Python-level control-flow a...
Python
Apache License 2.0
google/jax
Clarify tracking Clarify tracing a bit and use wording that does not suggest that JAX executed python program.
260,335
26.01.2021 10:59:22
28,800
737c1624314e74dba800d5632e3c4f0f67990abf
relax test tolerance on tpu
[ { "change_type": "MODIFY", "old_path": "tests/xmap_test.py", "new_path": "tests/xmap_test.py", "diff": "@@ -684,14 +684,18 @@ class PDotTests(jtu.JaxTestCase):\nin_axes=(['i', 'j', ...], ['j', 'k', ...]),\nout_axes=['i', 'k', ...])(x, y)\nexpected = np.einsum('ij,jk->ik', x, y)\n- self.assertAllClos...
Python
Apache License 2.0
google/jax
relax test tolerance on tpu
260,510
26.01.2021 12:39:35
28,800
6061b0979a9ff09c664e8a58e59a187ee261b9c1
Allow `jax.custom_gradient` to return vjp with singleton return value
[ { "change_type": "MODIFY", "old_path": "jax/custom_derivatives.py", "new_path": "jax/custom_derivatives.py", "diff": "@@ -22,7 +22,7 @@ from . import core\nfrom . import dtypes\nfrom . import linear_util as lu\nfrom .tree_util import (tree_flatten, tree_unflatten, tree_map, tree_multimap,\n- registe...
Python
Apache License 2.0
google/jax
Allow `jax.custom_gradient` to return vjp with singleton return value
260,335
26.01.2021 17:25:22
28,800
ff66c55709e9199e16a388c109987b7be9ed2c81
add axis_env argument to make_jaxpr fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -2000,6 +2000,7 @@ def linear_transpose(fun: Callable, *primals) -> Callable:\ndef make_jaxpr(fun: Callable,\nstatic_argnums: Union[int, Iterable[int]] = (),\n+ axis_env: Optional[Sequence[Tuple[AxisName, int]...
Python
Apache License 2.0
google/jax
add axis_env argument to make_jaxpr fixes #5522
260,335
26.01.2021 17:03:58
28,800
537c3d5c84e33fe1c0ae5592d7b16db6300b658f
add systematic pdot vjp tests
[ { "change_type": "MODIFY", "old_path": "tests/xmap_test.py", "new_path": "tests/xmap_test.py", "diff": "@@ -650,6 +650,54 @@ class PDotTests(jtu.JaxTestCase):\ntol = 1e-1 if jtu.device_under_test() == \"tpu\" else None\nself.assertAllClose(result, expected, check_dtypes=False,\natol=tol, rtol=tol)\n...
Python
Apache License 2.0
google/jax
add systematic pdot vjp tests
260,335
26.01.2021 19:38:40
28,800
014f9a86b40787921dc0177ce8650f224cefdca1
implement soft_pmap in terms of xmap
[ { "change_type": "MODIFY", "old_path": "jax/__init__.py", "new_path": "jax/__init__.py", "diff": "@@ -69,7 +69,6 @@ from .api import (\nshapecheck,\nShapedArray,\nShapeDtypeStruct,\n- soft_pmap,\n# TODO(phawkins): hide tree* functions from jax, update callers to use\n# jax.tree_util.\ntreedef_is_lea...
Python
Apache License 2.0
google/jax
implement soft_pmap in terms of xmap
260,411
29.01.2021 10:52:29
-3,600
3fa950fe9e180fcd5753a2f4c285cdd070f8a345
Update jax2tf.py Small fix for merge error.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -195,7 +195,7 @@ def convert(fun: Callable, *,\n+ f\"Trace state: {core.thread_local_state.trace_state}\")\ndef check_arg(a):\n- if not _is_tfvalorunit(a):\n+ if n...
Python
Apache License 2.0
google/jax
Update jax2tf.py Small fix for merge error.
260,322
05.01.2021 11:21:21
0
28dd00b010d0dc7a2aded1fd1ec8fcc8685cb2af
Adds support for is_leaf in tree_util.tree_map and tree_util.tree_multimap.
[ { "change_type": "MODIFY", "old_path": "jax/tree_util.py", "new_path": "jax/tree_util.py", "diff": "@@ -167,22 +167,28 @@ def register_pytree_node_class(cls):\nregister_pytree_node(cls, op.methodcaller('tree_flatten'), cls.tree_unflatten)\nreturn cls\n-def tree_map(f: Callable[[Any], Any], tree: Any...
Python
Apache License 2.0
google/jax
Adds support for is_leaf in tree_util.tree_map and tree_util.tree_multimap.
260,411
29.01.2021 12:48:56
-3,600
3c89de6eed72a678adad3c5d93dc0febd340bb08
[jax2tf] Add the JAX-not-implemented to the jax2tf limitations doc
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/g3doc/jax_primitives_coverage.md", "new_path": "jax/experimental/jax2tf/g3doc/jax_primitives_coverage.md", "diff": "@@ -199,10 +199,8 @@ and search for \"limitation\".\n|reduce_window_max|unimplemented in XLA|complex64|tpu|\n|reduce_win...
Python
Apache License 2.0
google/jax
[jax2tf] Add the JAX-not-implemented to the jax2tf limitations doc
260,411
29.01.2021 15:09:44
-3,600
87122fc81363756e7843ec06fa438852cf16df71
Update jax2tf.py mypy fix
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -203,7 +203,7 @@ def convert(fun: Callable, *,\n# Name input tensors\nargs = tuple(\n- tree_util.tree_map(lambda x, i=i: tf.identity(x, f\"jax2tf_arg_{i}\"), a)\n+...
Python
Apache License 2.0
google/jax
Update jax2tf.py mypy fix
260,352
31.01.2021 09:07:55
-39,600
4e48023538ac4939820fc346452211ce211eeec2
update out of date comment in Pmap_Cookbook.ipynb update comment regarding `pmap` not support `in_axes` because it does now.
[ { "change_type": "MODIFY", "old_path": "cloud_tpu_colabs/Pmap_Cookbook.ipynb", "new_path": "cloud_tpu_colabs/Pmap_Cookbook.ipynb", "diff": "\"source\": [\n\"Notice that applying `vmap(f)` to these arguments leads to a `dot_general` to express the batch matrix multiplication in a single primitive, wh...
Python
Apache License 2.0
google/jax
update out of date comment in Pmap_Cookbook.ipynb update comment regarding `pmap` not support `in_axes` because it does now.
260,411
31.01.2021 14:58:14
-7,200
a145e3d414e136015d2df23efc5f74e6ec61c90f
Pin numpy to max version 1.19, to avoid errors with 1.20 Will fix the numpy errors separately.
[ { "change_type": "MODIFY", "old_path": "build/test-requirements.txt", "new_path": "build/test-requirements.txt", "diff": "flake8\n+# For now, we pin the numpy version here, because jaxlib 0.1.59 was built with >=1.12\n+numpy>=1.12,<1.20\n# Must be kept in sync with the minimum jaxlib version in jax/...
Python
Apache License 2.0
google/jax
Pin numpy to max version 1.19, to avoid errors with 1.20 Will fix the numpy errors separately.
260,411
31.01.2021 16:23:39
-7,200
580a8f54cf30d858bf20173313ec3f47a5beac56
Update Pmap_Cookbook.ipynb I am doing this mostly to trigger another run of CI; there was a problem with our CI runs and this PR appears to be failing tests.
[ { "change_type": "MODIFY", "old_path": "cloud_tpu_colabs/Pmap_Cookbook.ipynb", "new_path": "cloud_tpu_colabs/Pmap_Cookbook.ipynb", "diff": "\"source\": [\n\"Notice that applying `vmap(f)` to these arguments leads to a `dot_general` to express the batch matrix multiplication in a single primitive, wh...
Python
Apache License 2.0
google/jax
Update Pmap_Cookbook.ipynb I am doing this mostly to trigger another run of CI; there was a problem with our CI runs and this PR appears to be failing tests.
260,411
31.01.2021 17:10:14
-7,200
cefab2ca5d8c384b13cefac2ff1ffd83dcd54dae
Disable the "with numpy-dispatch" test action. As numpy 1.20 was released recently, and triggers some errors in the GitHub CI, we pin numpy to 1.19. It seems that we still get failures when trying to import numpy-dispatch. We disable it until we figure out the problem.
[ { "change_type": "MODIFY", "old_path": ".github/workflows/ci-build.yaml", "new_path": ".github/workflows/ci-build.yaml", "diff": "@@ -58,14 +58,6 @@ jobs:\nenable-omnistaging: 1\npackage-overrides: \"none\"\nnum_generated_cases: 25\n- - name-prefix: \"with numpy-dispatch\"\n- python-version: 3.9\n- ...
Python
Apache License 2.0
google/jax
Disable the "with numpy-dispatch" test action. As numpy 1.20 was released recently, and triggers some errors in the GitHub CI, we pin numpy to 1.19. It seems that we still get failures when trying to import numpy-dispatch. We disable it until we figure out the problem.
260,411
29.01.2021 19:55:02
-3,600
617d77e0374123b6dee111a03f6d7649d845ac5c
Improve error message for when backward function in custom_vjp does not return a tuple. Prior to this we got an assertion that `py_cts_in is not iterable`.
[ { "change_type": "MODIFY", "old_path": "jax/custom_derivatives.py", "new_path": "jax/custom_derivatives.py", "diff": "@@ -545,12 +545,14 @@ def _flatten_bwd(in_tree, in_avals, out_trees, *args):\n# corresponding subtree of in_tree and with leaves of a non-pytree sentinel\n# object, to be replaced wi...
Python
Apache License 2.0
google/jax
Improve error message for when backward function in custom_vjp does not return a tuple. Prior to this we got an assertion that `py_cts_in is not iterable`.
260,411
31.01.2021 16:58:20
-7,200
f2530010a5a0055ecf021c88f2df1a924c207da4
[jax2tf] Added tests for sharded_jit. These tests are only looking at the HLO sharding annotations.
[ { "change_type": "ADD", "old_path": null, "new_path": "jax/experimental/jax2tf/tests/sharding_test.py", "diff": "+# Copyright 2021 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 obt...
Python
Apache License 2.0
google/jax
[jax2tf] Added tests for sharded_jit. These tests are only looking at the HLO sharding annotations.
260,287
28.01.2021 18:19:36
0
a7f9b84bf1c858f950ac9c73ab23be88b6feda9c
Implement a trivial ppermute collective batcher Splitting a single-dimensional ppermute into multiple permutations is a hard problem in general, but not when we're splitting a size-1 dimension. More importantly, this is the case that's triggered by any `xmap` of a `ppermute`, so we better have an implementation ready!
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -652,9 +652,16 @@ def _ppermute_transpose_rule(t, x, perm, axis_name):\nreturn [ppermute(t, axis_name=axis_name, perm=inverse_perm)]\ndef _ppermute_batcher(frame, vals_in, dims_in, ...
Python
Apache License 2.0
google/jax
Implement a trivial ppermute collective batcher Splitting a single-dimensional ppermute into multiple permutations is a hard problem in general, but not when we're splitting a size-1 dimension. More importantly, this is the case that's triggered by any `xmap` of a `ppermute`, so we better have an implementation ready!
260,484
01.02.2021 14:00:44
-10,800
c71a4f5871bef19d2f9b6e4d56c0209217205691
Try to download bazel as the last resort Resolution order of paths to bazel binary is as follows. 1. Use --bazel_path command line option. 2. Search bazel binary in PATH environment variable. 3. Download required bazel release.
[ { "change_type": "MODIFY", "old_path": "build/build.py", "new_path": "build/build.py", "diff": "@@ -144,44 +144,49 @@ def download_and_verify_bazel():\nreturn os.path.join(\".\", package.file)\n-def get_bazel_path(bazel_path_flag):\n- \"\"\"Returns the path to a Bazel binary, downloading Bazel if no...
Python
Apache License 2.0
google/jax
Try to download bazel as the last resort Resolution order of paths to bazel binary is as follows. 1. Use --bazel_path command line option. 2. Search bazel binary in PATH environment variable. 3. Download required bazel release.
260,709
01.02.2021 16:23:21
28,800
2f6ed3cfeaf0e6ebefb763ec7e38c0ae1a132b99
Initialize variables in LAPACK work size queries to prevent false positives in memory sanitizers. Related prior art in SciPy:
[ { "change_type": "MODIFY", "old_path": "jaxlib/lapack.pyx", "new_path": "jaxlib/lapack.pyx", "diff": "@@ -434,9 +434,9 @@ def getrf(c, a):\n# ?geqrf: QR decomposition\ncdef int lapack_sgeqrf_workspace(int m, int n):\n- cdef float work\n+ cdef float work = 0\ncdef int lwork = -1\n- cdef int info\n+ c...
Python
Apache License 2.0
google/jax
Initialize variables in LAPACK work size queries to prevent false positives in memory sanitizers. Related prior art in SciPy: https://github.com/scipy/scipy/pull/9054
260,411
02.02.2021 10:31:04
-7,200
ec2301a9ce58101e6374af32abd4c400a35b3914
Update limitations docs
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/g3doc/jax_primitives_coverage.md", "new_path": "jax/experimental/jax2tf/g3doc/jax_primitives_coverage.md", "diff": "# Primitives with limited JAX support\n-*Last generated on: 2021-01-29* (YYYY-MM-DD)\n+*Last generated on: 2021-02-02* (...
Python
Apache License 2.0
google/jax
Update limitations docs
260,287
01.02.2021 16:49:46
0
e11c4fffac4c1fe9fad301f6184539e8f7121735
Add support for axis names in jax.scipy.special.logsumexp
[ { "change_type": "MODIFY", "old_path": "jax/_src/scipy/special.py", "new_path": "jax/_src/scipy/special.py", "diff": "@@ -102,26 +102,26 @@ expit.defjvps(lambda g, ans, x: g * ans * (lax._const(ans, 1) - ans))\ndef logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):\nif b is not None...
Python
Apache License 2.0
google/jax
Add support for axis names in jax.scipy.special.logsumexp
260,411
02.02.2021 15:47:13
-7,200
d25d37811551f0bb5bf9756f4fdcb7f946928791
Fixes for numpy 1.20 It seems that `np.ndim` and `np.shape` fail in version 1.20 when used on sequences of Tracers. We avoid invoking these functions in places where this may happen.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/control_flow.py", "new_path": "jax/_src/lax/control_flow.py", "diff": "@@ -662,7 +662,7 @@ def cond(*args, **kwargs):\nreturn _cond(*args, **kwargs)\ndef _cond(pred, true_fun: Callable, false_fun: Callable, operand):\n- if len(np.shape(pred)) != 0...
Python
Apache License 2.0
google/jax
Fixes for numpy 1.20 It seems that `np.ndim` and `np.shape` fail in version 1.20 when used on sequences of Tracers. We avoid invoking these functions in places where this may happen.
260,287
02.02.2021 14:06:42
0
f812402d373e17711efb926b91d813bc5fab2bf3
Add support for named axes in jax.nn.one_hot
[ { "change_type": "MODIFY", "old_path": "jax/_src/nn/functions.py", "new_path": "jax/_src/nn/functions.py", "diff": "\"\"\"Shared neural network activations and other functions.\"\"\"\n+import operator\nimport numpy as np\nfrom typing import Any, Optional, Tuple, Union\n@@ -22,6 +23,8 @@ from jax imp...
Python
Apache License 2.0
google/jax
Add support for named axes in jax.nn.one_hot
260,287
02.02.2021 15:39:23
0
a8b1f5f78fe08e03a953aff6b0a0dc84ab72f768
Add axis_sizes to xmap Right now, all axis sizes have to be inferred from arguments to xmap which is unnecessarily strict. This lets users specify explicit sizes, allowing them to handle e.g. empty dicts that were supposed to contain mapped arguments.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/maps.py", "new_path": "jax/experimental/maps.py", "diff": "@@ -210,6 +210,8 @@ def _prepare_axes(axes, arg_name):\ndef xmap(fun: Callable,\nin_axes,\nout_axes,\n+ *,\n+ axis_sizes: Dict[AxisName, int] = {},\naxis_resources: Dict[AxisName, Unio...
Python
Apache License 2.0
google/jax
Add axis_sizes to xmap Right now, all axis sizes have to be inferred from arguments to xmap which is unnecessarily strict. This lets users specify explicit sizes, allowing them to handle e.g. empty dicts that were supposed to contain mapped arguments.
260,411
03.02.2021 11:06:18
-7,200
d3186b195f814c124ecc05deb0cefbe2c6a0aef8
Tightened the API of some jax.numpy functions Do not accept tuples and lists in lieu of array arguments
[ { "change_type": "MODIFY", "old_path": "docs/CHANGELOG.rst", "new_path": "docs/CHANGELOG.rst", "diff": "@@ -22,6 +22,10 @@ jax 0.2.10 (Unreleased)\n* :func:`jax.numpy.i0` no longer accepts complex numbers. Previously the\nfunction computed the absolute value of complex arguments. This change was\nma...
Python
Apache License 2.0
google/jax
Tightened the API of some jax.numpy functions Do not accept tuples and lists in lieu of array arguments
260,615
03.02.2021 15:09:21
18,000
48864a665b231e5e3994c06089c934ce6cb2dbe1
Add logdf and pdf for chisquare distribution Add tests Lint with flake8 fails. Should pass now newline at end of file for flake8 docs and changes remove whitespace in changeloc
[ { "change_type": "MODIFY", "old_path": "docs/CHANGELOG.rst", "new_path": "docs/CHANGELOG.rst", "diff": "@@ -11,6 +11,7 @@ jax 0.2.10 (Unreleased)\n-----------------------\n* `GitHub commits <https://github.com/google/jax/compare/jax-v0.2.9...master>`__.\n* New features:\n+ * :func:`jax.scipy.stats.c...
Python
Apache License 2.0
google/jax
Add logdf and pdf for chisquare distribution Add tests Lint with flake8 fails. Should pass now newline at end of file for flake8 docs and changes remove whitespace in changeloc
260,287
04.02.2021 12:45:20
0
76e8deb06416ae4088d16044c31ec69777c289ff
Throw in `jax.random.bernoulli` for good measure Because it's useful in implementing dropout over named axes.
[ { "change_type": "MODIFY", "old_path": "jax/_src/random.py", "new_path": "jax/_src/random.py", "diff": "@@ -774,7 +774,7 @@ def _truncated_normal(key, lower, upper, shape, dtype) -> jnp.ndarray:\ndef bernoulli(key: jnp.ndarray,\np: jnp.ndarray = np.float32(0.5),\n- shape: Optional[Sequence[int]] = N...
Python
Apache License 2.0
google/jax
Throw in `jax.random.bernoulli` for good measure Because it's useful in implementing dropout over named axes.
260,424
04.02.2021 13:55:36
0
bea17e573df56ab02e2a2f4dcc22c842b5d6acc4
Fix a _check_arraylike error. Before, if `repeats` was the the non-array arg the error would display the wrong arg position (position 0 -> position 1)
[ { "change_type": "MODIFY", "old_path": "jax/_src/numpy/lax_numpy.py", "new_path": "jax/_src/numpy/lax_numpy.py", "diff": "@@ -3178,8 +3178,7 @@ will be repeated.\n@_wraps(np.repeat, lax_description=_TOTAL_REPEAT_LENGTH_DOC)\ndef repeat(a, repeats, axis: Optional[int] = None, *, total_repeat_length=N...
Python
Apache License 2.0
google/jax
Fix a _check_arraylike error. Before, if `repeats` was the the non-array arg the error would display the wrong arg position (position 0 -> position 1)
260,287
05.02.2021 10:52:54
0
a7d616e3d40824caeab07ff39757a43cb6f75aca
Fix a bug in xmap mesh slicing code The previous version didn't adjust the axes indices after slicing the devices array, leading to out-of-bounds errors when doing the transpose.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -1371,12 +1371,12 @@ class Mesh:\nreturn Mesh(self.devices[subcube_indices], self.axis_names)\ndef __getitem__(self, new_axes):\n- indices = [0] * len(self.axis_names)\naxis_pos = {...
Python
Apache License 2.0
google/jax
Fix a bug in xmap mesh slicing code The previous version didn't adjust the axes indices after slicing the devices array, leading to out-of-bounds errors when doing the transpose.
260,287
05.02.2021 10:50:51
0
1194115e821f08d07a8b50d3409ff3ea1d950380
Make sure that samplers with names don't depend on axis resources
[ { "change_type": "MODIFY", "old_path": "tests/xmap_test.py", "new_path": "tests/xmap_test.py", "diff": "@@ -69,6 +69,8 @@ def tearDownModule():\nos.environ[\"XLA_FLAGS\"] = prev_xla_flags\nxla_bridge.get_backend.cache_clear()\n+# -------------------- Mesh parametrization helpers --------------------...
Python
Apache License 2.0
google/jax
Make sure that samplers with names don't depend on axis resources
260,287
04.02.2021 14:01:56
0
1361ae1247091e404e723e2fcc71a2dfffc8bd5d
Add positional axis handling to the psum transpose rule I must have forgotten to do that in one of the previous patches and apparently we didn't have any tests for it (at least in the `vmap` case)!
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -650,10 +650,20 @@ def _notuple_allreduce_translation_rule(prim, c, *args, named_axes, axis_env,\nreturn xops.Tuple(c, outs)\ndef _psum_transpose_rule(cts, *args, axes, axis_index_g...
Python
Apache License 2.0
google/jax
Add positional axis handling to the psum transpose rule I must have forgotten to do that in one of the previous patches and apparently we didn't have any tests for it (at least in the `vmap` case)!
260,287
04.02.2021 15:45:23
0
45dc712e779557a24a354c34574dede95f034741
Don't require ellipsis at the end of each list axis spec in xmap Skipping the ellipsis will make xmap assert that your inputs are of ranks matching the length of the list.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/maps.py", "new_path": "jax/experimental/maps.py", "diff": "@@ -170,12 +170,18 @@ def fresh_resource_name(tag=None):\n# This is really a Dict[AxisName, int], but we don't define a\n# pytree instance for it, so that it is treated as a leaf.\ncla...
Python
Apache License 2.0
google/jax
Don't require ellipsis at the end of each list axis spec in xmap Skipping the ellipsis will make xmap assert that your inputs are of ranks matching the length of the list.
260,287
05.02.2021 17:12:23
0
6ada0b02a81eb5d237644d8d46a69fa235e3e77c
Hotfix for psum transpose The previous patch has been causing some failures in the `is_undefined_primal` assertion in `broadcast_position`, but it looks like in all of those cases there are no positional axes, so this should fix them. More debugging underway, but I wanted to make sure they're unblocked.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -654,6 +654,7 @@ def _psum_transpose_rule(cts, *args, axes, axis_index_groups):\nfor axis in axes:\naxes_partition[isinstance(axis, int)].append(axis)\n+ if pos_axes:\ndef broadcast...
Python
Apache License 2.0
google/jax
Hotfix for psum transpose The previous patch has been causing some failures in the `is_undefined_primal` assertion in `broadcast_position`, but it looks like in all of those cases there are no positional axes, so this should fix them. More debugging underway, but I wanted to make sure they're unblocked.
260,615
05.02.2021 15:13:09
18,000
a3ad787402ced1a85864783395410c94c4584964
Add betabinomial logpmf/pmf and tests Squash all changes to single commit. Add betabinom Add tests for betabinom. nan where undefefined squash
[ { "change_type": "MODIFY", "old_path": "docs/CHANGELOG.rst", "new_path": "docs/CHANGELOG.rst", "diff": "@@ -12,6 +12,7 @@ jax 0.2.10 (Unreleased)\n* `GitHub commits <https://github.com/google/jax/compare/jax-v0.2.9...master>`__.\n* New features:\n* :func:`jax.scipy.stats.chi2` is now available as a ...
Python
Apache License 2.0
google/jax
Add betabinomial logpmf/pmf and tests Squash all changes to single commit. Add betabinom Add tests for betabinom. nan where undefefined squash
260,335
05.02.2021 16:25:23
28,800
bb4d46c25b93e0bf5ded8b64e3929b8ceeba938a
make vmap-of-cond preserve nan safety Thanks to John Jumper and Jonas Adler!
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/control_flow.py", "new_path": "jax/_src/lax/control_flow.py", "diff": "@@ -754,47 +754,58 @@ def _select_tree(indices, branch_vals):\nassert len(branch_vals) > 0\nif len(branch_vals) == 1:\nreturn branch_vals[0]\n- mid = len(branch_vals) // 2\n- m...
Python
Apache License 2.0
google/jax
make vmap-of-cond preserve nan safety Thanks to John Jumper and Jonas Adler!
260,719
06.02.2021 22:05:06
-19,080
108d078c5f55507330873f6310a1c205f01dcc59
add support for union1d add union1d in jax.numpy which closely follows numpy implementaion
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -362,6 +362,7 @@ Not every function in NumPy is implemented; contributions are welcome!\nuint64\nuint8\nunique\n+ union1d\nunpackbits\nunravel_index\nunsignedinteger\n" }, { "change_typ...
Python
Apache License 2.0
google/jax
add support for union1d add union1d in jax.numpy which closely follows numpy implementaion
260,287
04.02.2021 14:53:38
0
0b7febea390932c7d9e728037c5e91dc188f5381
Add argument donation for xmap Also, pass the body to XLA JIT when no parallel resources are used. There is no reason to not do that given that we already require users to pay the price of making their code jittable.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/maps.py", "new_path": "jax/experimental/maps.py", "diff": "@@ -28,7 +28,8 @@ from .. import linear_util as lu\nfrom ..api import _check_callable, _check_arg\nfrom ..tree_util import (tree_flatten, tree_unflatten, all_leaves,\n_replace_nones, t...
Python
Apache License 2.0
google/jax
Add argument donation for xmap Also, pass the body to XLA JIT when no parallel resources are used. There is no reason to not do that given that we already require users to pay the price of making their code jittable.
260,287
08.02.2021 12:18:33
0
692e31c92401aaf65c546612db32f11a483ab0ea
Small cleanup of xmap tests
[ { "change_type": "MODIFY", "old_path": "tests/xmap_test.py", "new_path": "tests/xmap_test.py", "diff": "@@ -89,6 +89,14 @@ def with_mesh(named_shape: MeshSpec) -> Generator[None, None, None]:\ndef with_mesh_from_kwargs(f):\nreturn lambda *args, **kwargs: with_mesh(kwargs['mesh'])(f)(*args, **kwargs)...
Python
Apache License 2.0
google/jax
Small cleanup of xmap tests
260,287
05.02.2021 11:34:32
0
6965e8bbe3f2f2682fe0b3966ae5b85487256e0c
Add support for named axes in jnp.mean and jnp.std
[ { "change_type": "MODIFY", "old_path": "jax/_src/numpy/lax_numpy.py", "new_path": "jax/_src/numpy/lax_numpy.py", "diff": "@@ -26,6 +26,7 @@ rules for the underlying :code:`lax` primitives.\nimport builtins\nimport collections\n+import collections.abc\nimport operator\nimport os\nimport types\n@@ -50...
Python
Apache License 2.0
google/jax
Add support for named axes in jnp.mean and jnp.std
260,287
08.02.2021 20:09:33
0
b19dd8758198e51c85b31c0c0d11ca674c30b391
Add a pgather primitive, making it possible to index into mapped axes
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -18,6 +18,7 @@ Parallelization primitives.\nimport collections\nimport string\nimport warnings\n+from typing import Union\nimport numpy as np\n@@ -26,13 +27,13 @@ from jax import dt...
Python
Apache License 2.0
google/jax
Add a pgather primitive, making it possible to index into mapped axes
260,335
09.02.2021 11:19:09
28,800
7394048782ed574f2fc6c21ff7d1aec683cb5f1e
make jax.eval_shape duck typing more robust
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -2318,8 +2318,14 @@ def eval_shape(fun: Callable, *args, **kwargs):\n>>> print(out.dtype)\nfloat32\n\"\"\"\n+ def dtype(x):\n+ try:\n+ return dtypes.result_type(x)\n+ except ValueError:\n+ return dtypes.result...
Python
Apache License 2.0
google/jax
make jax.eval_shape duck typing more robust
260,335
08.02.2021 20:24:19
28,800
ffb3873e5aaf759a984eb54b6c0adc7b53884a50
add pargmax, pargmin wrappers
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -180,6 +180,23 @@ def pmin(x, axis_name, *, axis_index_groups=None):\naxis_index_groups=axis_index_groups)\nreturn tree_util.tree_unflatten(treedef, out_flat)\n+# TODO(mattjj): add ...
Python
Apache License 2.0
google/jax
add pargmax, pargmin wrappers
260,287
09.02.2021 17:01:26
0
926b2ad03f65736cc52a409b26cc7dbe7117b23a
Minor fixes for xmap docstring, xeinsum parser The regression loss example from the xmap docstring was broken and the xeinsum parser didn't accept empty parens while it should.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/parallel.py", "new_path": "jax/_src/lax/parallel.py", "diff": "@@ -451,8 +451,8 @@ class XeinsumSpecParser:\naxis_name = self.spec[self.pos:end]\nassert axis_name\n- self.pos = end + 1\n- return axis_name, self.spec[end] == ','\n+ self.pos = end\n...
Python
Apache License 2.0
google/jax
Minor fixes for xmap docstring, xeinsum parser The regression loss example from the xmap docstring was broken and the xeinsum parser didn't accept empty parens while it should.
260,335
11.02.2021 08:30:37
28,800
e47c933fd328a012a5bb4cdecaf15f6a0b360346
fix/skip test failures
[ { "change_type": "MODIFY", "old_path": "tests/pmap_test.py", "new_path": "tests/pmap_test.py", "diff": "@@ -1660,15 +1660,23 @@ class PmapTest(jtu.JaxTestCase):\naxis, collective.__name__.replace(\" \", \"\")),\n\"shape\": shape, \"dtype\": dtype, \"axis\": axis,\n\"collective\": collective, \"bulk_...
Python
Apache License 2.0
google/jax
fix/skip test failures
260,335
12.02.2021 10:30:46
28,800
268493bae899008e87d819377be50a23e91d4e71
specialize standard_primitive back to single-out
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/lax.py", "new_path": "jax/_src/lax/lax.py", "diff": "@@ -1996,43 +1996,53 @@ def _argnum_weak_type(*argnums):\nreturn lambda *args, **_: all(args[i].weak_type for i in argnums)\ndef standard_primitive(shape_rule, dtype_rule, name, translation_rule...
Python
Apache License 2.0
google/jax
specialize standard_primitive back to single-out
260,411
05.02.2021 12:04:25
-7,200
fd2b9b4759816eb0bdd4218f48039269cf9645a8
[call_tf] Add support for DLPack to avoid copying arrays in eager mode
[ { "change_type": "MODIFY", "old_path": "docs/CHANGELOG.md", "new_path": "docs/CHANGELOG.md", "diff": "@@ -13,6 +13,9 @@ PLEASE REMEMBER TO CHANGE THE '..master' WITH AN ACTUAL TAG in GITHUB LINK.\n* New features:\n* {func}`jax.scipy.stats.chi2` is now available as a distribution with logpdf and pdf ...
Python
Apache License 2.0
google/jax
[call_tf] Add support for DLPack to avoid copying arrays in eager mode
260,484
13.02.2021 16:32:21
-10,800
96193cef122212b27ed797c6f8d8714778cc051d
Simplify bazel version check
[ { "change_type": "MODIFY", "old_path": "build/build.py", "new_path": "build/build.py", "diff": "@@ -145,7 +145,7 @@ def download_and_verify_bazel():\ndef get_bazel_paths(bazel_path_flag):\n- \"\"\"Yields a sequence of a guess about bazel path. Some of sequence elements\n+ \"\"\"Yields a sequence of ...
Python
Apache License 2.0
google/jax
Simplify bazel version check
260,411
13.02.2021 15:47:42
-7,200
25dbe9748730b42fff82fe6b23604e7afc18128a
Update gpu_memory_allocation.rst Discovered that the link did not work anymore
[ { "change_type": "MODIFY", "old_path": "docs/gpu_memory_allocation.rst", "new_path": "docs/gpu_memory_allocation.rst", "diff": "@@ -54,7 +54,7 @@ Common causes of OOM failures\nin TF1, which should be set in a :code:`tf.ConfigProto` passed to\n:code:`tf.Session`. See\n`Using GPUs: Limiting GPU memor...
Python
Apache License 2.0
google/jax
Update gpu_memory_allocation.rst Discovered that the link did not work anymore
260,335
13.02.2021 08:19:31
28,800
671fe938bd8d5087889a7971161a6290ee24fe12
make map/unmap aval functions extensible Also, use them in batching.py. This change is needed for the dynamic shapes prototype in since we add new types that can be mapped over.
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -1425,6 +1425,38 @@ named_call_p.def_impl(call_impl)\n# ------------------- Map -------------------\n+def mapped_aval(size: int, axis: int, aval: AbstractValue) -> AbstractValue:\n+ handler, _ = aval_mapping...
Python
Apache License 2.0
google/jax
make map/unmap aval functions extensible Also, use them in batching.py. This change is needed for the dynamic shapes prototype in #5717, since we add new types that can be mapped over.
260,335
17.02.2021 07:31:38
28,800
9b18135b6e0f33766b278f95e001f002c394c2e1
Rollback of due to internal breakage.
[ { "change_type": "MODIFY", "old_path": "jax/_src/lax/lax.py", "new_path": "jax/_src/lax/lax.py", "diff": "@@ -1996,19 +1996,15 @@ def _argnum_weak_type(*argnums):\nreturn lambda *args, **_: all(args[i].weak_type for i in argnums)\ndef standard_primitive(shape_rule, dtype_rule, name, translation_rule...
Python
Apache License 2.0
google/jax
Rollback of #5702 due to internal breakage. PiperOrigin-RevId: 357943850
260,628
18.02.2021 11:08:41
18,000
4c202ad22209f44eed360f585fbfbfe51abaf42b
implement np.polyint
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -283,6 +283,7 @@ Not every function in NumPy is implemented; contributions are welcome!\npiecewise\npolyadd\npolyder\n+ polyint\npolymul\npolysub\npolyval\n" }, { "change_type": "MODIFY...
Python
Apache License 2.0
google/jax
implement np.polyint (#70)
260,335
18.02.2021 09:46:16
28,800
5a97eab2a0e3a4437a0f6cb0209f0de3c335c6a3
improve error messages for grad(..., has_aux=True) fixes
[ { "change_type": "MODIFY", "old_path": "jax/api_util.py", "new_path": "jax/api_util.py", "diff": "@@ -75,7 +75,11 @@ def apply_flat_fun_nokwargs(fun, io_tree, py_args):\n@lu.transformation_with_aux\ndef flatten_fun_nokwargs2(in_tree, *args_flat):\npy_args = tree_unflatten(in_tree, args_flat)\n- ans,...
Python
Apache License 2.0
google/jax
improve error messages for grad(..., has_aux=True) fixes #5776
260,518
19.02.2021 12:37:04
28,800
80a8204fdb90ca5201d9501a6ffe62051293f060
Update thinking_in_jax.ipynb Fix typo in notebook url.
[ { "change_type": "MODIFY", "old_path": "docs/notebooks/thinking_in_jax.ipynb", "new_path": "docs/notebooks/thinking_in_jax.ipynb", "diff": "\"source\": [\n\"# How to Think in JAX\\n\",\n\"\\n\",\n- \"[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.sandbox.g...
Python
Apache License 2.0
google/jax
Update thinking_in_jax.ipynb Fix typo in notebook url.
260,712
19.02.2021 12:57:57
28,800
77905ef5fd72615d2fcbc7ef7eedc37988e03f80
Update build.py with Cloud TPU support Update build.py to have Cloud TPU support by default. b/180656002
[ { "change_type": "MODIFY", "old_path": "build/build.py", "new_path": "build/build.py", "diff": "@@ -271,6 +271,9 @@ build:short_logs --output_filter=DONT_MATCH_ANYTHING\n# Workaround for gcc 10+ warnings related to upb.\n# See https://github.com/tensorflow/tensorflow/issues/39467\nbuild:linux --copt...
Python
Apache License 2.0
google/jax
Update build.py with Cloud TPU support Update build.py to have Cloud TPU support by default. b/180656002
260,518
19.02.2021 21:59:47
28,800
bb5ae556adb60398db532578b142e9d5c44d094a
Update thinking_in_jax.md
[ { "change_type": "MODIFY", "old_path": "docs/notebooks/thinking_in_jax.md", "new_path": "docs/notebooks/thinking_in_jax.md", "diff": "@@ -33,7 +33,7 @@ ipython.showtraceback = minimal_traceback\n# How to Think in JAX\n-[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](http...
Python
Apache License 2.0
google/jax
Update thinking_in_jax.md
260,346
20.02.2021 18:18:32
-3,600
074abba6822a890e53a426b9b77b1fac37cb6a8a
Fix error message string interpolation
[ { "change_type": "MODIFY", "old_path": "jax/_src/numpy/lax_numpy.py", "new_path": "jax/_src/numpy/lax_numpy.py", "diff": "@@ -2568,7 +2568,7 @@ def _broadcast_to_pairs(nvals, nd, name):\nreturn tuple((nvals.flat[0], nvals.flat[0]) for i in range(nd))\nelse:\nraise ValueError(f\"{name} given unexpect...
Python
Apache License 2.0
google/jax
Fix error message string interpolation
260,346
20.02.2021 20:06:47
-3,600
5fc1730eec3c7fd734461bdf391c3fcda253e427
Also print function ID in compile reason logs.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -777,8 +777,8 @@ def parallel_callable(fun: lu.WrappedFun,\nlog_priority = logging.WARNING if FLAGS.jax_log_compiles else logging.DEBUG\nlogging.log(log_priority,\n- f\"Compiling {f...
Python
Apache License 2.0
google/jax
Also print function ID in compile reason logs.