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,389
23.08.2019 11:02:19
25,200
7830cedea64b1f8b1db5c2dd2a07668361cac75d
batching rule for cond
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -164,7 +164,7 @@ def while_loop(cond_fun, body_fun, init_val):\nraise TypeError(msg.format(cond_tree))\nif cond_jaxpr.out_avals != [ShapedArray((), onp.bool_)]:\nmsg = \"cond_...
Python
Apache License 2.0
google/jax
batching rule for cond Co-authored-by: Matthew Johnson <mattjj@google.com>
260,335
23.08.2019 15:47:42
25,200
e66582e877df99b270d47fd22f5e1f048c242d9f
restore the behavior that Nones are pytrees
[ { "change_type": "MODIFY", "old_path": "jaxlib/pytree.cc", "new_path": "jaxlib/pytree.cc", "diff": "@@ -159,6 +159,7 @@ class PyTreeDef {\nprivate:\nenum class Kind {\nkLeaf, // An opaque leaf node\n+ kNone, // None.\nkTuple, // A tuple\nkNamedTuple, // A collections.namedtuple\nkList, // A list\n@@...
Python
Apache License 2.0
google/jax
restore the behavior that Nones are pytrees
260,403
23.08.2019 15:51:59
25,200
dbb68bd13ae499c0951a450a2f80696cc63ec978
be careful with params.pop
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -448,7 +448,7 @@ translations[ad_util.add_jaxvals_p] = add_jaxvals_translation_rule\ndef lower_fun(fun, instantiate=False, initial_style=False):\n\"\"\"Build a translation rule for a ...
Python
Apache License 2.0
google/jax
be careful with params.pop
260,335
23.08.2019 16:40:49
25,200
050ce59a42723f6c1bcb2115d1e95fca77120aa1
fix an overzealous error message w/ const cond_fun
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -54,7 +54,7 @@ def _initial_style_jaxpr(fun, in_tree, in_avals):\nin_pvals = [pe.PartialVal((aval, core.unit)) for aval in in_avals]\nfun, out_tree = flatten_fun_nokwargs(lu.w...
Python
Apache License 2.0
google/jax
fix an overzealous error message w/ const cond_fun
260,403
23.08.2019 16:51:59
25,200
ba572231691047d4713bd0b8715044249a0817be
fix last mistake
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -448,7 +448,7 @@ translations[ad_util.add_jaxvals_p] = add_jaxvals_translation_rule\ndef lower_fun(fun, instantiate=False, initial_style=False):\n\"\"\"Build a translation rule for a ...
Python
Apache License 2.0
google/jax
fix last mistake
260,445
23.08.2019 16:54:59
25,200
b1604459efcb072a3cffa6f4a8c3aab646317bba
Clarify the intended purpose of tree_util. Most importantly, this removes the initial paragraph which was easy to misinterpret to imply that this module was not JAX-specific.
[ { "change_type": "MODIFY", "old_path": "jax/tree_util.py", "new_path": "jax/tree_util.py", "diff": "\"\"\"Utilities for working with tree-like container data structures.\n-The code here is independent of JAX. The only dependence is on jax.util, which\n-itself has no JAX-specific code.\n-\nThis modul...
Python
Apache License 2.0
google/jax
Clarify the intended purpose of tree_util. Most importantly, this removes the initial paragraph which was easy to misinterpret to imply that this module was not JAX-specific.
260,403
23.08.2019 17:29:30
25,200
bd35ef23668fe0b38a7b9e3975a3650d7913777d
refactor backend check in central dispatch logic
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -234,6 +234,19 @@ def jaxpr_computation(jaxpr, backend, axis_env, const_vals, freevar_shapes, *arg\n*arg_shapes)\nreturn c.Build(c.Tuple(*out_nodes))\n+\n+def check_backend_params(par...
Python
Apache License 2.0
google/jax
refactor backend check in central dispatch logic
260,335
23.08.2019 17:05:32
25,200
d700716e1909434aed41f7ca97d554d32be9017b
add option to disable rank-promotion broadcasting fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -27,12 +27,14 @@ from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n+from distutils.util import strtobool\nimport collection...
Python
Apache License 2.0
google/jax
add option to disable rank-promotion broadcasting fixes #1236
260,403
23.08.2019 18:39:26
25,200
229fdfe919e2bf517603018f20692d5beefd6828
just say no to pop
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -140,7 +140,8 @@ def xla_primitive_callable(prim, *abstract_args, **params):\n@cache()\ndef primitive_computation(prim, *xla_shapes, **params):\n- backend = params.pop('backend', None...
Python
Apache License 2.0
google/jax
just say no to pop
260,403
23.08.2019 19:01:37
25,200
ee2c6ccac768bbf5d5945544bc97f766badf09fb
uff actually finish last change
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -147,16 +147,16 @@ def primitive_computation(prim, *xla_shapes, **params):\nxla_args = map(c.ParameterWithShape, xla_shapes)\nif prim in backend_specific_translations[platform]:\nrule...
Python
Apache License 2.0
google/jax
uff actually finish last change
260,403
23.08.2019 21:41:55
25,200
a57a1a3943aeaacd56e445fa47a122039dd27b0f
increase minimum jaxlib version and remove some janky feature detection
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -643,13 +643,7 @@ def _device_array_constant_handler(c, val, canonicalize_types=True):\nreturn c.Constant(onp.asarray(val), canonicalize_types=canonicalize_types)\nxb.register_constan...
Python
Apache License 2.0
google/jax
increase minimum jaxlib version and remove some janky feature detection
260,403
23.08.2019 23:42:08
25,200
91a23116013ff8a35d1ae7ce1f969711d05b0c2e
clean up multibackend tests
[ { "change_type": "MODIFY", "old_path": "tests/multibackend_test.py", "new_path": "tests/multibackend_test.py", "diff": "@@ -24,6 +24,7 @@ from absl.testing import parameterized\nimport numpy as onp\nimport numpy.random as npr\nimport six\n+from unittest import SkipTest\nfrom jax import api\nfrom jax...
Python
Apache License 2.0
google/jax
clean up multibackend tests
260,335
22.08.2019 09:22:57
25,200
e90457d737ba287d46a063aff467f2079a92b722
add dtype warnings to array-creation routines fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax/__init__.py", "new_path": "jax/lax/__init__.py", "diff": "@@ -18,7 +18,7 @@ from .lax import (_reduce_sum, _reduce_max, _reduce_min, _reduce_or,\n_reduce_and, _reduce_window_sum, _reduce_window_max,\n_reduce_window_min, _reduce_window_prod, _float, _co...
Python
Apache License 2.0
google/jax
add dtype warnings to array-creation routines fixes #1230
260,335
25.08.2019 13:02:18
25,200
434d175381b653d8bb65e201b0a7babff091cbcb
fix device_constant instantiation bug, fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -656,4 +656,5 @@ def _instantiate_device_constant(const, device_num=0, cutoff=1e6):\ncompiled = c.Build(xla_const).Compile((), opts, backend=xb.get_backend())\nreturn compiled.Execute...
Python
Apache License 2.0
google/jax
fix device_constant instantiation bug, fixes #1241
260,335
25.08.2019 14:28:53
25,200
3c2a73592c407a0a44d7df3273594a41fbd7ce4b
improve rank promotion warning, add doc page
[ { "change_type": "MODIFY", "old_path": "docs/index.rst", "new_path": "docs/index.rst", "diff": "@@ -15,6 +15,7 @@ For an introduction to JAX, start at the\nconcurrency\ngpu_memory_allocation\nprofiling\n+ rank_promotion_warning\n.. toctree::\n:maxdepth: 3\n" }, { "change_type": "ADD", "o...
Python
Apache License 2.0
google/jax
improve rank promotion warning, add doc page
260,335
25.08.2019 14:36:23
25,200
c6f430a83173ada92c3eaba675f3f7f4befdf0e5
tweak rank promotion warning docs
[ { "change_type": "MODIFY", "old_path": "docs/rank_promotion_warning.rst", "new_path": "docs/rank_promotion_warning.rst", "diff": "@@ -24,6 +24,8 @@ allowed just like regular NumPy. The configuration option is named\n:code:`jax_numpy_rank_promotion` and it can take on string values\n:code:`allow`, :c...
Python
Apache License 2.0
google/jax
tweak rank promotion warning docs
260,335
25.08.2019 19:59:50
25,200
f639b808c44cca35ebc27308a7821159a1d86a8a
instantiate zeros for custom vjp rules
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -376,6 +376,7 @@ def defvjp_all(prim, custom_vjp):\ndef fun_lin_transpose(cts, *args, **kwargs):\nnum_res, trans_jaxpr = kwargs['num_res'], kwargs['trans_jaxpr']\nres, _ = split_list(ar...
Python
Apache License 2.0
google/jax
instantiate zeros for custom vjp rules
260,314
26.08.2019 01:32:18
14,400
28df8a666b8c99f7ea46842e9b8fc7ca81e0b6c9
cast float64 to canonical dtype in np.cov
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -2729,7 +2729,7 @@ def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None,\nif m.ndim > 2:\nraise ValueError(\"m has more than 2 dimensions\") # same as numpy error\n- X =...
Python
Apache License 2.0
google/jax
cast float64 to canonical dtype in np.cov
260,335
26.08.2019 12:35:39
25,200
94b1dda42ff5ade2a287341bb06c144d38ce837e
fix notebook link (fixes
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -92,7 +92,7 @@ And for a deeper dive into JAX:\n- [The Autodiff Cookbook, Part 1: easy and powerful automatic differentiation in JAX](https://colab.research.google.com/github/google/jax/blob/master/notebooks/aut...
Python
Apache License 2.0
google/jax
fix notebook link (fixes #1252)
260,335
26.08.2019 13:38:08
25,200
6a81d81d9b8e752c2a983f151eb947ecfe08dd54
fix for custom-transforms vjp nones bug
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1481,7 +1481,7 @@ def defvjp_all(fun, custom_vjp):\ncts = tree_unflatten(out_tree, cts_flat)\nargs_cts_flat, in_tree2 = tree_flatten(vjp(cts))\nassert in_tree == in_tree2\n- return [None] * num_consts + list(...
Python
Apache License 2.0
google/jax
fix for custom-transforms vjp nones bug Co-authored-by: Dougal Maclaurin <dougalm@google.com>
260,335
26.08.2019 14:05:17
25,200
dbe56c30ac6fdc84b2729c4790ad160474081f64
leave todos for better error messages
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1476,11 +1476,11 @@ def defvjp_all(fun, custom_vjp):\nargs = tree_unflatten(params['in_tree'], args_flat)\nout, vjp = custom_vjp(*args)\nout_flat, out_tree = tree_flatten(out)\n- assert out_tree == params['ou...
Python
Apache License 2.0
google/jax
leave todos for better error messages
260,335
27.08.2019 11:21:50
25,200
1cd37bd97707ef660d4e7fdcd8147baf69060e9c
reset jax_numpy_rank_promotion to "allow" default
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -53,7 +53,7 @@ from ..lib import xla_client\nFLAGS = flags.FLAGS\nflags.DEFINE_enum(\n- 'jax_numpy_rank_promotion', os.getenv('JAX_NUMPY_RANK_PROMOTION', 'warn'),\n+ 'jax_numpy_rank_pro...
Python
Apache License 2.0
google/jax
reset jax_numpy_rank_promotion to "allow" default
260,335
27.08.2019 15:56:45
25,200
fd9e0333a6430bb06bd7a0c9faa650c66fdf2a21
add try/finally to pxla global state management
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -16,7 +16,6 @@ from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n-from contextlib import contextmanager\nfrom f...
Python
Apache License 2.0
google/jax
add try/finally to pxla global state management
260,646
28.08.2019 03:37:15
0
9d4fab5c8fc0cfaecc47133e8f4d1ee2a1a0f19a
Pass check_vjp, add VJP grad and Jac, use fun(y0, t, *args) syntax
[ { "change_type": "MODIFY", "old_path": "jax/experimental/ode.py", "new_path": "jax/experimental/ode.py", "diff": "@@ -18,6 +18,8 @@ Integrate systems of ordinary differential equations (ODEs) using the JAX\nautograd/diff library and the Dormand-Prince method for adaptive integration\nstepsize calcul...
Python
Apache License 2.0
google/jax
Pass check_vjp, add VJP grad and Jac, use fun(y0, t, *args) syntax
260,268
29.08.2019 19:18:50
25,200
4ceebcf4065405e31ba978e134f941bb74bb7852
with vectorize
[ { "change_type": "ADD", "old_path": null, "new_path": "jax/experimental/vectorize.py", "diff": "+from jax import grad, jit, vmap\n+import jax.numpy as jnp\n+import numpy as np\n+import re\n+\n+# See http://docs.scipy.org/doc/numpy/reference/c-api.generalized-ufuncs.html\n+_DIMENSION_NAME = r'\\w+'\n...
Python
Apache License 2.0
google/jax
with vectorize
260,314
29.08.2019 22:28:03
14,400
92d85a8962c8582f06f207802ef86285bf103e83
fix cond batching rule issues
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -38,6 +38,7 @@ from jax.interpreters import xla\nfrom jax.interpreters import ad\nfrom jax.lib import xla_bridge as xb\nfrom jax.lib import xla_client\n+import jax.numpy as np...
Python
Apache License 2.0
google/jax
fix cond batching rule issues
260,314
30.08.2019 00:21:50
14,400
16bd27258d01aa28a55c1d3771a6b6b82aa8f475
use lax instead of numpy to avoid circular import
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -38,7 +38,6 @@ from jax.interpreters import xla\nfrom jax.interpreters import ad\nfrom jax.lib import xla_bridge as xb\nfrom jax.lib import xla_client\n-import jax.numpy as np...
Python
Apache License 2.0
google/jax
use lax instead of numpy to avoid circular import
260,268
30.08.2019 20:36:54
0
54f28ed5bcf470aa472e869e82aca33708399b36
fixing issues with tests
[ { "change_type": "MODIFY", "old_path": "tests/vectorize_test.py", "new_path": "tests/vectorize_test.py", "diff": "@@ -64,7 +64,7 @@ class VectorizeTest(jtu.JaxTestCase):\n]))\ndef test_matmat(self, left_shape, right_shape, result_shape):\nself.assertEqual(matmat(np.zeros(left_shape),\n- np.zeros(rig...
Python
Apache License 2.0
google/jax
fixing issues with tests
260,268
30.08.2019 22:46:26
0
e6854009a83ed83bcf21520c760a2f4df5ca8fac
Changed axis kwarg in wrapper for py2 compat.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/vectorize.py", "new_path": "jax/experimental/vectorize.py", "diff": "@@ -252,7 +252,8 @@ def vectorize(signature):\ndef decorator(func):\n@functools.wraps(func)\n- def wrapper(*args, axis=None):\n+ def wrapper(*args, **kwargs):\n+ axis = kwarg...
Python
Apache License 2.0
google/jax
Changed axis kwarg in wrapper for py2 compat.
260,677
31.08.2019 02:13:12
-3,600
ae2c39d081d29b6abe8eefff5c755f0f0abaad57
Added custom jvp for np.linalg.det For faster gradient computation for determinants, added closed-form expressing for Jacobian-vector product. Still needs a test.
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -86,9 +86,11 @@ def slogdet(a):\n@_wraps(onp.linalg.det)\n+@custom_transforms\ndef det(a):\nsign, logdet = slogdet(a)\nreturn sign * np.exp(logdet)\n+defjvp(det, lambda g, ans, x: np.trace(np...
Python
Apache License 2.0
google/jax
Added custom jvp for np.linalg.det For faster gradient computation for determinants, added closed-form expressing for Jacobian-vector product. Still needs a test.
260,677
31.08.2019 03:18:24
-3,600
1c264db3a35c92cf987bc588a37f6b9a0dbc1177
Slightly cleaner implementation of jvp for det Replaced np.dot/np.linalg.inv with a single np.linalg.solve
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -90,7 +90,7 @@ def slogdet(a):\ndef det(a):\nsign, logdet = slogdet(a)\nreturn sign * np.exp(logdet)\n-defjvp(det, lambda g, ans, x: np.trace(np.dot(g, np.linalg.inv(x)))*ans)\n+defjvp(det, l...
Python
Apache License 2.0
google/jax
Slightly cleaner implementation of jvp for det Replaced np.dot/np.linalg.inv with a single np.linalg.solve
260,335
29.08.2019 20:25:02
25,200
478832c944e03f9df12ab0428965878e07c255f8
avoid Calls inside While/Cond fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -491,22 +491,21 @@ xla_pmap = partial(core.call_bind, xla_pmap_p)\nxla_pmap_p.def_custom_bind(xla_pmap)\nxla_pmap_p.def_impl(xla_pmap_impl)\n-def _xla_pmap_translation_rule(c, jaxpr...
Python
Apache License 2.0
google/jax
avoid Calls inside While/Cond fixes #1267
260,335
29.08.2019 22:21:31
25,200
2815c55bb1bcc42bfc9fb28d8549100dd7b6cd2e
switch rolled/unrolled loops in prng hash
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -127,19 +127,54 @@ def threefry_2x32(keypair, count):\nonp.array([17, 29, 16, 24], dtype=onp.uint32)]\nks = [key1, key2, key1 ^ key2 ^ onp.uint32(0x1BD11BDA)]\n- def rotate_list(xs):\n- return xs[1:] + [...
Python
Apache License 2.0
google/jax
switch rolled/unrolled loops in prng hash
260,335
31.08.2019 08:04:51
25,200
c0627d81c34489e41b61616c5073afa0cfc6922e
remove jaxlib import (broke google3 pulldown)
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -39,7 +39,6 @@ from ..lib import xla_bridge as xb\nfrom ..lib import xla_client as xc\nfrom . import partial_eval as pe\nfrom . import ad\n-import jaxlib\nFLAGS = flags.FLAGS\nflags.D...
Python
Apache License 2.0
google/jax
remove jaxlib import (broke google3 pulldown)
260,335
31.08.2019 12:51:21
25,200
f5c152b71b75424fbe181a8e0c54df6edcdfb71d
if we hit an XLA Build error, it's a JAX bug
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -162,9 +162,10 @@ def primitive_computation(prim, *xla_shapes, **params):\ntry:\nreturn c.Build()\nexcept RuntimeError as e:\n- # try for a better error message by using the abstract_...
Python
Apache License 2.0
google/jax
if we hit an XLA Build error, it's a JAX bug
260,335
31.08.2019 21:23:39
25,200
422585716635fde8ae1f5664a43b61245352a96f
add special value grad tests, sinh failing
[ { "change_type": "MODIFY", "old_path": "tests/lax_test.py", "new_path": "tests/lax_test.py", "diff": "@@ -1399,6 +1399,18 @@ class LaxTest(jtu.JaxTestCase):\napi.jit(f)(1.) # doesn't crash\n+ def testReshapeWithUnusualShapes(self):\n+ ans = lax.reshape(onp.ones((3,), onp.float32), (lax.add(1, 2), 1)...
Python
Apache License 2.0
google/jax
add special value grad tests, sinh failing
260,335
31.08.2019 22:08:03
25,200
cac042c34a55ad8683828e1d24dabc2c5bb485ac
move asinh/acosh/atanh to lax_numpy.py only
[ { "change_type": "MODIFY", "old_path": "docs/jax.lax.rst", "new_path": "docs/jax.lax.rst", "diff": "@@ -26,11 +26,8 @@ Operators\nabs\nadd\nacos\n- acosh\nasin\n- asinh\natan\n- atanh\natan2\nbatch_matmul\nbitcast_convert_type\n" }, { "change_type": "MODIFY", "old_path": "jax/lax/__init_...
Python
Apache License 2.0
google/jax
move asinh/acosh/atanh to lax_numpy.py only
260,335
02.09.2019 07:25:06
25,200
c760b05f9bffa3b6b79beaa54d6848fde2eee149
update jaxlib version in readme fixes will update notebooks in
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -122,7 +122,7 @@ PYTHON_VERSION=cp37 # alternatives: cp27, cp35, cp36, cp37\nCUDA_VERSION=cuda92 # alternatives: cuda90, cuda92, cuda100\nPLATFORM=linux_x86_64 # alternatives: linux_x86_64\nBASE_URL='https://sto...
Python
Apache License 2.0
google/jax
update jaxlib version in readme fixes #1297 will update notebooks in #1260
260,335
02.09.2019 07:47:56
25,200
a0095e346e847190f90cdb1107ed8ac84e6222b5
reviewer comments: no 'install' text needed
[ { "change_type": "MODIFY", "old_path": "notebooks/Common_Gotchas_in_JAX.ipynb", "new_path": "notebooks/Common_Gotchas_in_JAX.ipynb", "diff": "\"colab_type\": \"text\"\n},\n\"source\": [\n- \"### Installs and Imports\"\n+ \"### Imports\"\n]\n},\n{\n" }, { "change_type": "MODIFY", "old_pat...
Python
Apache License 2.0
google/jax
reviewer comments: no 'install' text needed
260,335
02.09.2019 07:55:25
25,200
c52027691b4651e8b43fd8147866f3ac95690cbd
jax.numpy.stack and concatenate work on array args fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1352,7 +1352,7 @@ def pad(array, pad_width, mode='constant', constant_values=0):\n@_wraps(onp.stack)\ndef stack(arrays, axis=0):\n- if not arrays:\n+ if not len(arrays):\nraise ValueEr...
Python
Apache License 2.0
google/jax
jax.numpy.stack and concatenate work on array args fixes #1271
260,646
30.08.2019 22:23:11
0
3427d2cb20abdc01b4398036285d89f2894eb6f1
Add `build_odeint` for odeint VJP setup, plus a test
[ { "change_type": "MODIFY", "old_path": "jax/experimental/ode.py", "new_path": "jax/experimental/ode.py", "diff": "@@ -35,6 +35,7 @@ from jax.flatten_util import ravel_pytree\nimport jax.lax\nimport jax.numpy as np\nimport jax.ops\n+from jax.test_util import check_vjp\nimport matplotlib.pyplot as plt...
Python
Apache License 2.0
google/jax
Add `build_odeint` for odeint VJP setup, plus a test
260,335
23.08.2019 10:28:27
25,200
5879dbc223609ef37427e89a6ba9bb5bc3206242
trying out ideas
[ { "change_type": "ADD", "old_path": null, "new_path": "mask.py", "diff": "+from functools import partial\n+import operator\n+\n+import numpy as onp\n+\n+from jax import core\n+from jax.core import Trace, Tracer\n+from jax.util import unzip2, prod\n+from jax import linear_util as lu\n+from jax.abstra...
Python
Apache License 2.0
google/jax
trying out ideas Co-authored-by: Dougal Maclaurin <dougalm@google.com>
260,335
27.08.2019 17:09:55
25,200
f5ee804a6f679ac715ab37b93adb521c708c1fcc
fix bug in scan masking rule
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -133,13 +133,13 @@ def scan_masking_rule(shape_env, vals, shape_exprs, forward, length, jaxpr,\nconst_shapes, init_shapes, xs_shapes = split_list(shape_exprs, [num_consts, num_carry])\n_, y_avals = split_list(jaxpr....
Python
Apache License 2.0
google/jax
fix bug in scan masking rule
260,335
27.08.2019 17:32:21
25,200
bd86d41abbbc5fafb9b06142fe2ff54268ed0e7c
add flattening, jit test
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -7,6 +7,7 @@ import numpy as onp\nfrom jax import core\nfrom jax.core import Trace, Tracer\nfrom jax.util import unzip2, prod, safe_map, safe_zip, split_list\n+from jax.api_util import tree_flatten, tree_unflatten, ...
Python
Apache License 2.0
google/jax
add flattening, jit test
260,335
27.08.2019 18:25:29
25,200
9bd5d37aae18c890e5bdf3c818bca516913f6d1b
split shape rules and masking rules
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -42,6 +42,8 @@ class ShapeExpr(object):\nself.shape = tuple(shape)\ndef __iter__(self):\nreturn iter(self.shape)\n+ def __getitem__(self, idx):\n+ return list(self)[idx]\ndef __repr__(self):\nreturn 'ShapeExpr({})'....
Python
Apache License 2.0
google/jax
split shape rules and masking rules
260,335
27.08.2019 21:43:56
25,200
75eb9b2ee46054bb5a7a2a578bfb36ed87c43d02
add part of a dot masking rule
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -131,17 +131,46 @@ def reduce_sum_masking_rule(padded_vals, logical_shapes, axes, input_shape):\nmasking_rules[lax.reduce_sum_p] = reduce_sum_masking_rule\n-def add_shape_rule(shape_exprs):\n+def defbinop(prim):\n+ ...
Python
Apache License 2.0
google/jax
add part of a dot masking rule
260,335
28.08.2019 07:05:55
25,200
cf637fd484764b2390541e6b5dc48e77fc7517de
note next steps
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -359,3 +359,10 @@ print(onp.dot(x[:2, :2], y[:2, :2]))\n# - we should probably pass the max size explicitly rather than getting it off\n# the values, e.g. the iota problem, should think of it as an independent type\...
Python
Apache License 2.0
google/jax
note next steps
260,335
28.08.2019 07:09:58
25,200
983b83f1c2be1a738828db952d87a5e92cebede8
todo: test setup
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -362,6 +362,7 @@ print(onp.dot(x[:2, :2], y[:2, :2]))\n# next steps:\n+# 0. generic test setup\n# 1. clean up shape expression language (maybe handle reshape/conat)\n# 2. write example colab with two applications:\n...
Python
Apache License 2.0
google/jax
todo: test setup
260,335
28.08.2019 18:39:54
25,200
976ff5f010caded8c1125f286ebc418f24305d46
try out a ShapeExpr with polynomials
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -705,7 +705,7 @@ def scan_bind(*args, **kwargs):\nxs_avals = _map(partial(_promote_aval_rank, length), x_avals)\nassert all(_map(typecheck, consts_avals, consts))\nassert all(...
Python
Apache License 2.0
google/jax
try out a ShapeExpr with polynomials
260,335
30.08.2019 09:31:21
25,200
a609ae7071ed088af3c40d438da7e0ba587d11e3
set up a small shape language
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -4,6 +4,7 @@ from collections import defaultdict, Counter\nfrom functools import partial\nimport itertools as it\nimport operator as op\n+import string\nimport numpy as onp\nimport six\n@@ -46,27 +47,26 @@ def mask_...
Python
Apache License 2.0
google/jax
set up a small shape language
260,335
30.08.2019 16:06:43
25,200
fbc85af54f654e5f8489f8220c3b8d0f4a94d0f5
made polymorphic jaxprs, reshape fail
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -580,7 +580,8 @@ def reshape(operand, new_sizes, dimensions=None):\n<https://www.tensorflow.org/xla/operation_semantics#reshape>`_\noperator.\n\"\"\"\n- new_sizes = _canonicalize_shape(new_sizes)\n+ # ...
Python
Apache License 2.0
google/jax
made polymorphic jaxprs, reshape fail
260,335
30.08.2019 18:03:18
25,200
20299270a38bc49a15534bc8ca4563f940fe0653
concat is cool (packed not striped)
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -102,12 +102,13 @@ class ShapeError(Exception): pass\n# data Dim = Id Str\n# | Lit Int\n# | Mul Dim Dim\n+# | Add Dim Dim\n# We'll also make a simple concrete syntax for annotation. The grammar is\n#\n# shape_spec :...
Python
Apache License 2.0
google/jax
concat is cool (packed not striped)
260,335
30.08.2019 18:26:41
25,200
f4d6591ff34bd0814fca04600f46503fb9fc0253
revive dot example
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "@@ -114,7 +114,7 @@ def parse_spec(spec=''):\nif not spec:\nreturn ShapeExpr(())\nif spec[0] == '(':\n- if spec[-1] != ')': raise SyntaxError\n+ if spec[-1] != ')': raise SyntaxError(spec)\nspec = spec[1:-1]\ndims = ma...
Python
Apache License 2.0
google/jax
revive dot example
260,335
30.08.2019 21:35:56
25,200
e12c8b0340e5508d16cc5d370ce8244e757eb7d6
experiments in import-time shape checking
[ { "change_type": "MODIFY", "old_path": "mask.py", "new_path": "mask.py", "diff": "from __future__ import print_function\nfrom collections import defaultdict, Counter, namedtuple\n-from functools import partial\n+from functools import partial, wraps\nimport itertools as it\nimport operator as op\nimp...
Python
Apache License 2.0
google/jax
experiments in import-time shape checking
260,335
03.09.2019 17:18:23
25,200
96b8bb2d4dffecd805b9b733a75d4f6056b94369
fix lax._canonicalize_shape for ShapeExprs
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -81,6 +81,9 @@ def _canonicalize_shape(shape):\nReturns:\nA tuple of integers.\n\"\"\"\n+ # TODO(mattjj): this next check is a temporary workaround for masking\n+ if type(shape) is ShapeExpr or any(typ...
Python
Apache License 2.0
google/jax
fix lax._canonicalize_shape for ShapeExprs
260,335
03.09.2019 21:56:45
25,200
c3db5d71a7ddbfb9e0e632809ac445c3c40f158d
fix dtype issue, python3 issue, sorting issue
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -99,6 +99,12 @@ class Mon(Counter): # type Mon = Map Id Int -- ids to degrees\nreturn ' '.join('{}**{}'.format(k, v) if v != 1 else str(k)\nfor k, v in sorted(self.items()))\n...
Python
Apache License 2.0
google/jax
fix dtype issue, python3 issue, sorting issue
260,677
05.09.2019 15:22:36
-3,600
b819bff1d3afe74320eba451dd3d79fc6854c8d6
Imports for custom_transforms and defjvp Can't really do this if we don't have the right imports...
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -27,6 +27,7 @@ from .. import lax_linalg\nfrom .lax_numpy import _not_implemented\nfrom .lax_numpy import _wraps\nfrom . import lax_numpy as np\n+from ..api import custom_transforms, defjvp\n...
Python
Apache License 2.0
google/jax
Imports for custom_transforms and defjvp Can't really do this if we don't have the right imports...
260,309
05.09.2019 15:10:48
25,200
8f5cfef407ccd9aa8bf6c1cc4d4d6d24af434b2b
improve numerical stability of softplus grads
[ { "change_type": "MODIFY", "old_path": "jax/nn/functions.py", "new_path": "jax/nn/functions.py", "diff": "@@ -28,7 +28,7 @@ from jax import jarrett\n# activations\ndef relu(x): return np.maximum(x, 0)\n-def softplus(x): return np.logaddexp(x, 0)\n+def softplus(x): return np.log1p(np.exp(x))\ndef sof...
Python
Apache License 2.0
google/jax
improve numerical stability of softplus grads
260,296
06.09.2019 20:30:30
25,200
dbea4b6f976d9963854017bb5f5c30d84a27c022
Fix typos Hit these when trying to debug NaNs, appear to be just typos.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -197,7 +197,7 @@ def compile_jaxpr(jaxpr, device_assignment, backend, axis_env, const_vals, *abst\nif axis_env.nreps > xb.device_count(backend):\nmsg = (\"compiling computation that r...
Python
Apache License 2.0
google/jax
Fix typos Hit these when trying to debug NaNs, appear to be just typos.
260,296
06.09.2019 20:47:02
25,200
302dcc7e741ba18176ffaa92aefddbb44277b412
Fix `check_nans` method
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -174,12 +174,12 @@ def _execute_compiled_primitive(prim, compiled, backend, result_handler, *args):\nif FLAGS.jax_debug_nans: check_nans(prim, out_buf)\nreturn result_handler(out_buf)...
Python
Apache License 2.0
google/jax
Fix `check_nans` method
260,554
08.09.2019 14:19:10
25,200
6f2d22fddfee26cdb1952d4589d568bbfeac5021
Tiny change to enable vmap with dimension numbers.
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -2526,7 +2526,6 @@ def _reshape_batch_rule(batched_args, batch_dims, new_sizes, dimensions, **unuse\nbdim, = batch_dims\noperand = batching.moveaxis(operand, bdim, 0)\nif dimensions is not None:\n- rai...
Python
Apache License 2.0
google/jax
Tiny change to enable vmap with dimension numbers.
260,646
09.09.2019 19:54:10
0
bcad02ff8a3aa6b60d88786614fd8d123e1baf36
Remove 64-bit mode for GPU performance
[ { "change_type": "MODIFY", "old_path": "jax/experimental/ode.py", "new_path": "jax/experimental/ode.py", "diff": "@@ -30,7 +30,6 @@ import functools\nimport time\nimport jax\n-from jax.config import config\nfrom jax.flatten_util import ravel_pytree\nimport jax.lax\nimport jax.numpy as np\n@@ -40,8 +...
Python
Apache License 2.0
google/jax
Remove 64-bit mode for GPU performance
260,335
09.09.2019 17:47:15
25,200
74f6269ee945276ccc3fdaf7089cce3638a3bc18
make jvp only form JVPTracers with nonzero tangent fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -61,7 +61,9 @@ def jvp_subtrace(master, primals, tangents):\nfor x in list(primals) + list(tangents):\nif isinstance(x, Tracer):\nassert x.trace.level < trace.level\n- ans = yield map(p...
Python
Apache License 2.0
google/jax
make jvp only form JVPTracers with nonzero tangent fixes #1316
260,403
10.09.2019 23:25:12
25,200
53d4283df5327474da0b8f88daead556042039d9
fix xla shape-checking error message
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -162,7 +162,7 @@ def primitive_computation(prim, *xla_shapes, **params):\ntry:\nreturn c.Build()\nexcept RuntimeError as e:\n- msg = (e.message + \"\\n\"\n+ msg = (\" \".join(map(str,...
Python
Apache License 2.0
google/jax
fix xla shape-checking error message
260,335
11.09.2019 06:01:32
25,200
6f0e244e9abf949ee2a0f801f36a3b15a1b28d5e
fix vmap-of-pmap bug thanks and
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -139,10 +139,11 @@ class BatchTrace(Trace):\nis_batched = tuple(d is not not_mapped for d in dims)\nvals = [moveaxis(x, d, 1) if d is not not_mapped and d != 1 else x\nfor x...
Python
Apache License 2.0
google/jax
fix vmap-of-pmap bug thanks @romanngg and @inoryy
260,335
11.09.2019 06:22:25
25,200
37323c13ff3abbc8e140142755de809249d2cbff
check output shape in testVmapOfPmap2
[ { "change_type": "MODIFY", "old_path": "tests/pmap_test.py", "new_path": "tests/pmap_test.py", "diff": "@@ -488,7 +488,8 @@ class PmapTest(jtu.JaxTestCase):\nkeys = np.broadcast_to(keys, (N_DEVICES,) + keys.shape)\nreturn g(keys)\n- s(keys)\n+ ans = s(keys) # doesn't crash\n+ self.assertEqual(ans.sh...
Python
Apache License 2.0
google/jax
check output shape in testVmapOfPmap2
260,403
11.09.2019 14:15:38
25,200
4ee28cf95af6d59731725e5b4bd2ba462e013db0
Make pxla.axis_index return signed indices for type compatibility with other jax indices.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -274,15 +274,19 @@ def _axis_index_partial_eval(trace, _, **params):\n# This partial_eval rule adds the axis_index primitive into the jaxpr formed\n# during pmap lowering. It is lik...
Python
Apache License 2.0
google/jax
Make pxla.axis_index return signed indices for type compatibility with other jax indices.
260,335
29.08.2019 14:29:49
25,200
0c3e9ce22a3f79139738376ab294f9649b9261b4
sketch of root w/ parameterized solvers
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -822,3 +822,27 @@ def _memcpy(axis, num, src, dst, offset):\nreturn fori_loop(0, num, body, dst)\nmasking.masking_rules[lax.concatenate_p] = _concat_masking_rule\n+\n+\n+def r...
Python
Apache License 2.0
google/jax
sketch of root w/ parameterized solvers Co-authored-by: Stephan Hoyer <shoyer@google.com>
260,677
14.09.2019 14:30:45
-3,600
c2750c1be91a9e5f68c29ff92a5c95f07fa47006
Extended jvp for det to handle inputs with >2 dims
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -86,12 +86,16 @@ def slogdet(a):\nreturn sign, np.real(logdet)\n+def _jvp_det(g, ans, x):\n+ return np.trace(np.linalg.solve(x, g), axis1=-1, axis2=-2)*ans\n+\n+\n@_wraps(onp.linalg.det)\n@cu...
Python
Apache License 2.0
google/jax
Extended jvp for det to handle inputs with >2 dims
260,677
14.09.2019 14:35:27
-3,600
0171eb7c68fc80c38a8f2eacd6ad48c3a7976631
Replace jvp for det with jvp for slogdet
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -60,7 +60,14 @@ def svd(a, full_matrices=True, compute_uv=True):\nreturn lax_linalg.svd(a, full_matrices, compute_uv)\n+def _jvp_slogdet(g, ans, x):\n+ jvp_sign = np.zeros(x.shape[:-2])\n+ jv...
Python
Apache License 2.0
google/jax
Replace jvp for det with jvp for slogdet
260,335
15.09.2019 08:45:58
25,200
5b6b72c2fb38c331199afef391a498662d4565f7
fix broadcasting bug in rem jvp, fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1725,7 +1725,7 @@ ad.primitive_transposes[div_p] = _div_transpose_rule\nrem_p = standard_binop([_num, _num], 'rem')\nad.defjvp(rem_p,\nlambda g, x, y: _brcast(g, y),\n- lambda g, x, y: mul(neg(g), flo...
Python
Apache License 2.0
google/jax
fix broadcasting bug in rem jvp, fixes #1350
260,335
15.09.2019 09:24:00
25,200
e945c9c11eb8b00d7c5fa80b472c181950aed946
add some 'manual' lax.rem autodiff tests
[ { "change_type": "MODIFY", "old_path": "tests/lax_test.py", "new_path": "tests/lax_test.py", "diff": "@@ -1501,8 +1501,6 @@ LAX_GRAD_OPS = [\ndtypes=[onp.float64]),\ngrad_test_spec(lax.round, nargs=1, order=2, rng=jtu.rand_default(),\ndtypes=[onp.float64]),\n- # grad_test_spec(lax.rem, nargs=2, orde...
Python
Apache License 2.0
google/jax
add some 'manual' lax.rem autodiff tests
260,335
11.09.2019 21:57:54
25,200
78c70ecd0ccacc64531ddc22f2eab161bd0218fc
add dynamic shape envs
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -872,22 +872,25 @@ def _parallelize(fun):\ndef mask(fun, in_shapes, out_shape):\n- in_shapes_flat, in_shapes_tree = tree_flatten(in_shapes)\n- out_shapes_flat, out_shapes_tree = tree_flatten(out_shape)\n+ in_s...
Python
Apache License 2.0
google/jax
add dynamic shape envs
260,335
13.09.2019 14:36:33
25,200
283299649b6cb82cda846350b973105f5a4aded7
add a 'monomorphic dim' symbol, bug fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -60,7 +60,7 @@ from .interpreters import ad\nfrom .interpreters import batching\nfrom .interpreters import parallel\nfrom .interpreters import masking\n-from .interpreters.masking import Shape, s_, shapecheck\...
Python
Apache License 2.0
google/jax
add a 'monomorphic dim' symbol, bug fixes
260,335
13.09.2019 16:30:22
25,200
b71181d3c08eb3c89403e14068843aeb401144ad
start writing nesting test
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -55,10 +55,16 @@ def extend_shape_envs(logical_env, padded_env):\nshape_envs = prev\ndef shape_as_value(expr):\n+ if type(expr) is ShapeExpr:\nreturn eval_shape_expr(shape_env...
Python
Apache License 2.0
google/jax
start writing nesting test
260,335
15.09.2019 14:11:15
25,200
6e22b418e3b625efa5b58a41b29c84476dbca486
skip problematic tests on tpu
[ { "change_type": "MODIFY", "old_path": "tests/lax_numpy_indexing_test.py", "new_path": "tests/lax_numpy_indexing_test.py", "diff": "@@ -856,6 +856,7 @@ class IndexedUpdateTest(jtu.JaxTestCase):\nfor update_shape in _broadcastable_shapes(_update_shape(shape, indexer))\nfor update_dtype in ([dtype] if...
Python
Apache License 2.0
google/jax
skip problematic tests on tpu
260,677
16.09.2019 21:27:55
-3,600
3e5f7869eaaeab1691f4b3c843c53f8d19bd0bab
Fixed prefix for np.linalg.solve
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -62,7 +62,7 @@ def svd(a, full_matrices=True, compute_uv=True):\ndef _jvp_slogdet(g, ans, x):\njvp_sign = np.zeros(x.shape[:-2])\n- jvp_logdet = np.trace(np.linalg.solve(x, g), axis1=-1, axis...
Python
Apache License 2.0
google/jax
Fixed prefix for np.linalg.solve
260,627
16.09.2019 14:30:28
25,200
0e7ea7e37938b91f6fc833387a929a1faa5ad9a3
Reduce memory usage for argmax (fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -2232,8 +2232,9 @@ def argmin(a, axis=None):\ndef _argminmax(op, a, axis):\nshape = [1] * a.ndim\nshape[axis] = a.shape[axis]\n- idxs = onp.arange(a.shape[axis]).reshape(shape)\n+ idxs ...
Python
Apache License 2.0
google/jax
Reduce memory usage for argmax (fixes #1330)
260,335
16.09.2019 14:49:31
25,200
13b1bca94fef09b2399b5597d69ca61e0d79b995
prevent device_put from being staged into jaxprs
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -681,8 +681,7 @@ def _device_put_impl(x, device_num=0, backend=None):\ndevice_put_p = core.Primitive('device_put')\ndevice_put_p.def_impl(_device_put_impl)\n-device_put_p.def_abstract...
Python
Apache License 2.0
google/jax
prevent device_put from being staged into jaxprs
260,335
16.09.2019 15:47:43
25,200
6662da827591aba302995fb39c66e342cdefbf55
tweaks to simplify masked jaxprs, rnn test
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -98,6 +98,11 @@ def mask_subtrace(master, in_vals, shape_exprs):\nclass ShapeExpr(tuple): # type ShapeExpr = [Poly]\ndef __str__(self):\nreturn 'ShapeExpr({})'.format(', '.joi...
Python
Apache License 2.0
google/jax
tweaks to simplify masked jaxprs, rnn test
260,335
16.09.2019 16:30:42
25,200
99b9e48580d62da65f13bf533687c4d337e37902
python2 fix for ShapeExpr slicing
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -57,12 +57,18 @@ def extend_shape_envs(logical_env, padded_env):\ndef shape_as_value(expr):\nif type(expr) is ShapeExpr:\nreturn eval_shape_expr(shape_envs.logical, expr)\n+ e...
Python
Apache License 2.0
google/jax
python2 fix for ShapeExpr slicing
260,677
17.09.2019 18:55:11
-3,600
dda0c806c18f057fc734a0e6ec800584c334c365
Added test case for sloget gradient
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -117,6 +117,18 @@ class NumpyLinalgTest(jtu.JaxTestCase):\ncheck_dtypes=True, tol=1e-3)\nself._CompileAndCheck(np.linalg.slogdet, args_maker, check_dtypes=True)\n+ @parameterized.named_para...
Python
Apache License 2.0
google/jax
Added test case for sloget gradient
260,677
17.09.2019 18:57:51
-3,600
3c18245e64856eb8ffb7b859f8d29246c055a869
Removed complex types from slogdet grad test
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -122,7 +122,7 @@ class NumpyLinalgTest(jtu.JaxTestCase):\n\"_shape={}\".format(jtu.format_shape_dtype_string(shape, dtype)),\n\"shape\": shape, \"dtype\": dtype, \"rng\": rng}\nfor shape in...
Python
Apache License 2.0
google/jax
Removed complex types from slogdet grad test
260,677
17.09.2019 18:58:34
-3,600
7a347dede9beba964c15144bc42da6cfe988d18b
Added TODO to fix slogdet grad for complex types
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -60,6 +60,7 @@ def svd(a, full_matrices=True, compute_uv=True):\nreturn lax_linalg.svd(a, full_matrices, compute_uv)\n+# TODO(pfau): make this work for complex types\ndef _jvp_slogdet(g, ans,...
Python
Apache License 2.0
google/jax
Added TODO to fix slogdet grad for complex types
260,677
17.09.2019 19:03:50
-3,600
1e8746ab1f2fb0da55be53475571de09b2ddfb85
Shrink largest test in slogdet grad
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -121,7 +121,7 @@ class NumpyLinalgTest(jtu.JaxTestCase):\n{\"testcase_name\":\n\"_shape={}\".format(jtu.format_shape_dtype_string(shape, dtype)),\n\"shape\": shape, \"dtype\": dtype, \"rng\...
Python
Apache License 2.0
google/jax
Shrink largest test in slogdet grad
260,677
18.09.2019 11:05:17
-3,600
f25cfafef00663a2d2cd9d20f5fe1deef92662ab
Reduced tolerance for slogdet grad test
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -127,7 +127,7 @@ class NumpyLinalgTest(jtu.JaxTestCase):\ndef testSlogdetGrad(self, shape, dtype, rng):\n_skip_if_unsupported_type(dtype)\na = rng(shape, dtype)\n- jtu.check_grads(np.linalg...
Python
Apache License 2.0
google/jax
Reduced tolerance for slogdet grad test
260,677
18.09.2019 12:28:57
-3,600
fd4c3029d8e42fd1244ccdc075c9571428f4d464
Further relaxed the tolerance of slogdet grad test
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -127,7 +127,7 @@ class NumpyLinalgTest(jtu.JaxTestCase):\ndef testSlogdetGrad(self, shape, dtype, rng):\n_skip_if_unsupported_type(dtype)\na = rng(shape, dtype)\n- jtu.check_grads(np.linalg...
Python
Apache License 2.0
google/jax
Further relaxed the tolerance of slogdet grad test
260,677
18.09.2019 13:08:27
-3,600
daf5b1cbdedfcd408e86c37d8ac920ddb68534ce
Relaxed test tolerance even more
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -127,7 +127,7 @@ class NumpyLinalgTest(jtu.JaxTestCase):\ndef testSlogdetGrad(self, shape, dtype, rng):\n_skip_if_unsupported_type(dtype)\na = rng(shape, dtype)\n- jtu.check_grads(np.linalg...
Python
Apache License 2.0
google/jax
Relaxed test tolerance even more
260,389
18.09.2019 23:55:31
25,200
b39179c88723742b89ba05e6e789b53bf5737e0f
better abs jvp
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1636,9 +1636,14 @@ ad.primitive_jvps[conj_p] = partial(ad.linear_jvp, conj_p)\nad.primitive_transposes[conj_p] = _conj_transpose_rule\nabs_p = unop(_complex_basetype, _num, 'abs')\n-ad.defjvp2(abs_p,\...
Python
Apache License 2.0
google/jax
better abs jvp
260,389
18.09.2019 23:55:40
25,200
942d4e721758b7bfe5ef339a57595ae2e0117497
restore more stable softplus
[ { "change_type": "MODIFY", "old_path": "jax/nn/functions.py", "new_path": "jax/nn/functions.py", "diff": "@@ -28,7 +28,7 @@ from jax import jarrett\n# activations\ndef relu(x): return np.maximum(x, 0)\n-def softplus(x): return np.log1p(np.exp(x))\n+def softplus(x): return np.logaddexp(x, 0)\ndef sof...
Python
Apache License 2.0
google/jax
restore more stable softplus
260,685
20.09.2019 10:25:16
-3,600
6fd938d8a02f066680d9c354b868d76769589b9e
no more nested loops of dynamic_update_slice!
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1714,12 +1714,11 @@ def _repeat_scalar(a, repeats, axis=None):\ndef repeat(a, repeats, axis=None):\n'''\n:param repeats: int or array of ints\n- largely same logic as `PyArray_Repeat` ...
Python
Apache License 2.0
google/jax
no more nested loops of dynamic_update_slice!
260,335
20.09.2019 15:35:43
25,200
36b5af517e4dafcd1158152bb2829d74f4e4759c
don't over-instantiate literals, fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -36,18 +36,15 @@ def identity(x): return x\n# A partial value (pval) is modeled as a pair (pv, const), as per\n# type PVal = (PV, Const)\n-# data PV = NonePV | Abstr...
Python
Apache License 2.0
google/jax
don't over-instantiate literals, fixes #1361 Co-authored-by: Dougal Maclaurin <dougalm@google.com>
260,716
14.03.2019 14:47:41
-14,400
12de81456bf8a41853033b53fbd3bafccc4d9425
Simplify nanmean with logical not
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1228,6 +1228,26 @@ nanmax = _make_nan_reduction(onp.nanmax, max, -inf, nan_if_all_nan=True)\nnansum = _make_nan_reduction(onp.nansum, sum, 0, nan_if_all_nan=False)\nnanprod = _make_nan...
Python
Apache License 2.0
google/jax
Simplify nanmean with logical not
260,716
21.09.2019 01:24:48
25,200
949e1ddf43c9971d9e37ef8df038c56c50364d27
Weird Cherry Pick Remnant
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1228,8 +1228,6 @@ nanmax = _make_nan_reduction(onp.nanmax, max, -inf, nan_if_all_nan=True)\nnansum = _make_nan_reduction(onp.nansum, sum, 0, nan_if_all_nan=False)\nnanprod = _make_nan_...
Python
Apache License 2.0
google/jax
Weird Cherry Pick Remnant
260,296
22.09.2019 15:32:12
25,200
58ed2e31d898c2c64e778c2378e576d97799cf76
Make `assertAllClose` work with non-array types. In our application this would make comparing trees with other entries like Nones and enums easier. I may be missing some other issues though, let me know if this change makes sense!
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -516,6 +516,8 @@ class JaxTestCase(parameterized.TestCase):\nx = onp.asarray(x)\ny = onp.asarray(y)\nself.assertArraysAllClose(x, y, check_dtypes, atol=atol, rtol=rtol)\n+ elif x == y:\n+ return\ne...
Python
Apache License 2.0
google/jax
Make `assertAllClose` work with non-array types. In our application this would make comparing trees with other entries like Nones and enums easier. I may be missing some other issues though, let me know if this change makes sense!
260,716
22.09.2019 21:38:34
25,200
c312729d62d0c4fd9177c231802e97b7842f49e0
Refactor and Test based on comments from old PR
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1232,17 +1232,16 @@ nanprod = _make_nan_reduction(onp.nanprod, prod, 1, nan_if_all_nan=False)\ndef nanmean(a, axis=None, dtype=None, out=None, keepdims=False):\nif out is not None:\nra...
Python
Apache License 2.0
google/jax
Refactor and Test based on comments from old PR
260,716
23.09.2019 08:53:49
25,200
3d21393d0ca87f7058c82ea1b8a77a4e4ac436e1
PR Response Changes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1235,15 +1235,13 @@ def nanmean(a, axis=None, dtype=None, out=None, keepdims=False):\nif (onp.issubdtype(lax._dtype(a), onp.bool_) or\nonp.issubdtype(lax._dtype(a), onp.integer)):\nret...
Python
Apache License 2.0
google/jax
PR Response Changes
260,716
23.09.2019 10:04:31
25,200
03fb88e49e7e0349a294dbb3fd20933fce3edc67
TODOs and wrong name
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1240,7 +1240,7 @@ def nanmean(a, axis=None, dtype=None, out=None, keepdims=False):\nnan_mask = logical_not(isnan(a))\nnormalizer = sum(nan_mask, axis=axis, dtype=int32, keepdims=keepdi...
Python
Apache License 2.0
google/jax
TODOs and wrong name
260,299
24.09.2019 19:20:12
-7,200
f9b9146a92617b825d119ed14706fe182cd483a0
Ensure lax.scatter cache hits in op-by-op mode
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -785,6 +785,9 @@ def scatter_max(operand, scatter_indices, updates, dimension_numbers):\nupdate_consts=consts, dimension_numbers=dimension_numbers,\nupdates_shape=updates.shape)\n+# Define this outside...
Python
Apache License 2.0
google/jax
Ensure lax.scatter cache hits in op-by-op mode
260,299
25.09.2019 15:59:52
-7,200
7c979e7c28a1a141dee66f0502caf7c15189710d
Always test for cache misses on second op-by-op call
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -35,6 +35,7 @@ from .config import flags\nfrom .util import partial\nfrom .tree_util import tree_multimap, tree_all, tree_map, tree_reduce\nfrom .lib import xla_bridge\n+from .interpreters import x...
Python
Apache License 2.0
google/jax
Always test for cache misses on second op-by-op call