author
int64
658
755k
date
stringdate
2012-06-12 08:34:29
2024-07-22 14:51:21
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
listlengths
1
16
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
260,335
20.05.2019 17:19:20
25,200
dcb8584b07c953200c98f8a40584ec55b0b54fd1
handle tensordot with zero contracting dims fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1585,6 +1585,11 @@ def tensordot(a, b, axes=2):\nraise TypeError(msg.format(ndim(a), ndim(b)))\nif type(axes) is int:\n+ if axes == 0:\n+ a, b = _promote_dtypes(a, b)\n+ return lax.mul...
Python
Apache License 2.0
google/jax
handle tensordot with zero contracting dims fixes #740
260,335
21.05.2019 07:08:13
25,200
f3c1a5cafd1865df5de549b7a65ff54c788cb874
improve scan error messages, add test (fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -464,9 +464,21 @@ def _promote_aval_rank(n, xs):\ndef _leading_dim_size(xs):\nif isinstance(xs, core.JaxTuple):\n- return _leading_dim_size(xs[0])\n+ sizes = set(map(_leading_...
Python
Apache License 2.0
google/jax
improve scan error messages, add test (fixes #744)
260,335
21.05.2019 11:18:44
25,200
d01e6a96e2972752ad626a83dd5552744fcd43ea
improve scan error message test
[ { "change_type": "MODIFY", "old_path": "tests/lax_control_flow_test.py", "new_path": "tests/lax_control_flow_test.py", "diff": "@@ -633,7 +633,7 @@ class LaxControlFlowTest(jtu.JaxTestCase):\nself.assertRaisesRegexp(\nValueError,\n- '.*no leading.*',\n+ 'scan got value with no leading axis to scan o...
Python
Apache License 2.0
google/jax
improve scan error message test
260,335
21.05.2019 13:54:37
25,200
cf996730cedf3782443ad49f41e1eca5d20bcc0e
add test showing bug in scan higher-order autodiff
[ { "change_type": "MODIFY", "old_path": "tests/lax_control_flow_test.py", "new_path": "tests/lax_control_flow_test.py", "diff": "@@ -636,6 +636,17 @@ class LaxControlFlowTest(jtu.JaxTestCase):\n'scan got value with no leading axis to scan over.*',\nlambda: lax.scan(plus_one, p0, list(range(5))))\n+ d...
Python
Apache License 2.0
google/jax
add test showing bug in scan higher-order autodiff
260,335
21.05.2019 15:14:28
25,200
8c00df1d61d2fec72d7261c924432f5d131d076e
finer-grained passing and failing tests
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -152,20 +152,32 @@ def check_vjp(f, f_vjp, args, atol=ATOL, rtol=RTOL, eps=EPS):\ncheck_close(ip, ip_expected, atol=atol, rtol=rtol)\n-def check_grads(f, args, order, atol=None, rtol=None, eps=None...
Python
Apache License 2.0
google/jax
finer-grained passing and failing tests
260,335
21.05.2019 17:22:33
25,200
1ecf75770b770c02d560ae49e3bde4baa37c55cb
make check_grads check all orders <= given order
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -152,33 +152,32 @@ def check_vjp(f, f_vjp, args, atol=ATOL, rtol=RTOL, eps=EPS):\ncheck_close(ip, ip_expected, atol=atol, rtol=rtol)\n-def check_grads(f, args, order, modes=[\"fwd\", \"rev\"],\n- a...
Python
Apache License 2.0
google/jax
make check_grads check all orders <= given order
260,335
21.05.2019 18:07:22
25,200
096dfb9b203c13b151cc5a121033812d0a1b5615
fixed scan differentiation!
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -187,7 +187,11 @@ def backward_pass(jaxpr, consts, freevar_vals, args, cotangent_in):\nif cts_out is zero:\ncts_out = [zero for _ in eqn.invars]\n+ if not eqn.restructure:\nmap(write_co...
Python
Apache License 2.0
google/jax
fixed scan differentiation!
260,335
21.05.2019 18:19:42
25,200
6c47c9f2a1ba1ceb501bdeb6cc867736d2badede
loosen tolerance on testLuGrad
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -499,8 +499,7 @@ class ScipyLinalgTest(jtu.JaxTestCase):\n@jtu.skip_on_devices(\"gpu\", \"tpu\")\ndef testLuGrad(self, shape, dtype, rng):\na = rng(shape, dtype)\n-\n- jtu.check_grads(jsp.l...
Python
Apache License 2.0
google/jax
loosen tolerance on testLuGrad
260,506
21.05.2019 21:34:42
14,400
8ea5eff3b1eaf59e45c8a003994f5c03a6f76591
Fix vmap() when there are empty tuples in the input
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -291,9 +291,9 @@ def dimsize(dim, x):\ndef _dimsize(dim, aval, x):\nif type(aval) is AbstractTuple:\nif type(dim) is tuple:\n- return reduce(set.union, map(_dimsize, dim, av...
Python
Apache License 2.0
google/jax
Fix vmap() when there are empty tuples in the input
260,335
21.05.2019 18:51:32
25,200
e04f344ca524c3b3c0b4feaa93ea7f9d57d5df04
fix typo in lax.scan autodiff test (cf.
[ { "change_type": "MODIFY", "old_path": "tests/lax_control_flow_test.py", "new_path": "tests/lax_control_flow_test.py", "diff": "@@ -646,7 +646,8 @@ class LaxControlFlowTest(jtu.JaxTestCase):\nas_ = np.arange(6.).reshape((3, 2))\nc = 1.\n- jtu.check_grads(lambda c: lax.scan(f, c, as_), (c,), modes=[\...
Python
Apache License 2.0
google/jax
fix typo in lax.scan autodiff test (cf. #749)
260,335
21.05.2019 19:18:29
25,200
ec6e39b9b253b708a4b893455523cfa6dd494527
fix negative index handling in index_take fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -662,6 +662,7 @@ def scatter(operand, scatter_indices, updates, dimension_numbers):\ndef index_take(src, idxs, axes):\nindices = concatenate([reshape(i, [i.shape[0], 1]) for i in idxs], 1)\n+ indices =...
Python
Apache License 2.0
google/jax
fix negative index handling in index_take fixes #751
260,335
21.05.2019 21:37:52
25,200
14d16b2d660d648f944ca3695369a43da8c53ce1
support both .reshape(*shape) and .reshape(shape) fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -649,6 +649,20 @@ def _reshape(a, newshape, order=\"C\"):\nelse:\nraise ValueError(\"Unexpected value for 'order' argument: {}.\".format(order))\n+def _reshape_method(a, *newshape, **kw...
Python
Apache License 2.0
google/jax
support both .reshape(*shape) and .reshape(shape) fixes #746
260,335
15.05.2019 07:25:03
25,200
140699ed7de017918f7049b35bae3e3f0ef4d080
scan of vmap sketched out! cf.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -557,9 +557,6 @@ def map_transpose(primitive, params, jaxpr, consts, freevar_vals, args, ct):\nfreevar_cts = tree_map(lambda x: x.sum(0), freevar_cts)\nreturn cts_out, freevar_cts\n-def...
Python
Apache License 2.0
google/jax
scan of vmap sketched out! cf. #716
260,335
16.05.2019 07:40:31
25,200
7065cb6374b06ca54969826c1e68b73f937faba5
move control flow batching tests
[ { "change_type": "MODIFY", "old_path": "tests/batching_test.py", "new_path": "tests/batching_test.py", "diff": "@@ -889,66 +889,6 @@ class BatchingTest(jtu.JaxTestCase):\nH = hessian(f)(R) # don't crash on UnshapedArray\n- def testWhileLoop(self):\n- def fun(x):\n- return lax.while_loop(lambda x: x ...
Python
Apache License 2.0
google/jax
move control flow batching tests
260,335
16.05.2019 10:18:53
25,200
4fe2bcfe4131e0c7e0d756f0ca051a58a1f82db2
add vmap-of-scan tests, fix minor bugs
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -368,6 +368,8 @@ def handle_scalar_broadcasting(nd, x, bdim):\nreturn x.reshape(x.shape + (1,) * (nd - x.ndim))\n+# TODO(mattjj): try to de-duplicate utility functions with ...
Python
Apache License 2.0
google/jax
add vmap-of-scan tests, fix minor bugs
260,335
22.05.2019 13:33:51
25,200
0307ce5825cee480356f3333f283e6d9c34b2238
compare binary lattice prefixes in scan fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -19,6 +19,8 @@ from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n+import operator\n+\nimport numpy as onp\nfrom j...
Python
Apache License 2.0
google/jax
compare binary lattice prefixes in scan fixes #757
260,335
22.05.2019 14:38:49
25,200
a193b3592bba6cc62a7ad4076f37f2f18507a8d6
when xla_computation sees no kwargs, don't make ()
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -175,8 +175,14 @@ def xla_computation(fun, static_argnums=()):\n@wraps(fun)\ndef computation_maker(*args, **kwargs):\nwrapped = lu.wrap_init(fun)\n- jax_kwargs, kwargs_tree = pytree_to_jaxtupletree(kwargs)\nja...
Python
Apache License 2.0
google/jax
when xla_computation sees no kwargs, don't make ()
260,335
22.05.2019 15:59:30
25,200
09b229969f16beb507e6437c7db6cbc8411ee5de
patch utility functions in batching.py fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -252,14 +252,16 @@ def reducer_batcher(prim, batched_args, batch_dims, axes, **params):\ndef add_batched(batched_args, batch_dims):\nbdx, bdy = batch_dims\n- xs, ys = batche...
Python
Apache License 2.0
google/jax
patch utility functions in batching.py fixes #758
260,335
22.05.2019 16:04:16
25,200
86ad8e0456351dd9ae1ddaf8060d8e5f407703fe
make a batching.py utility function more defensive
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -413,9 +413,11 @@ def instantiate_bdim(size, axis, instantiate, bdim, x):\nif type(instantiate) is tuple:\nif type(bdim) is tuple:\nreturn core.pack(map(_inst, instantiate, ...
Python
Apache License 2.0
google/jax
make a batching.py utility function more defensive
260,335
22.05.2019 16:22:12
25,200
93e201f85ba2721ef51ac7f06d0e30c794290f37
make jax.random default dtypes 64-bit fixes
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -226,19 +226,21 @@ def _check_shape(name, shape):\nraise ValueError(msg.format(name, shape))\n-def uniform(key, shape, dtype=onp.float32, minval=0., maxval=1.):\n+def uniform(key, shape, dtype=onp.float6...
Python
Apache License 2.0
google/jax
make jax.random default dtypes 64-bit fixes #756
260,335
23.05.2019 06:51:16
25,200
c30667941a6226572b79ff12097d324e25112a56
improve scan error message when output is not pair
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -570,7 +570,11 @@ def scan(f, init, xs):\njaxpr, pval_out, consts = pe.trace_to_jaxpr(\nf, (carry_pval, x_pval), instantiate=True)\npv_out, const_out = pval_out\n- assert isin...
Python
Apache License 2.0
google/jax
improve scan error message when output is not pair
260,335
23.05.2019 09:07:44
25,200
92e5f93a290ec8146ab6a667abe54adbf39d61ff
tweak docstrings in mnist examples
[ { "change_type": "ADD", "old_path": null, "new_path": "examples/fluidsim.py", "diff": "+# Copyright 2018 Google LLC\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License ...
Python
Apache License 2.0
google/jax
tweak docstrings in mnist examples
260,335
23.05.2019 11:28:15
25,200
8ffb9417e7a49201195704ede4b8731fd4975c3d
fix stax initialization rng bug, remove temp file
[ { "change_type": "DELETE", "old_path": "examples/spmd_spatially_sharded_conv_net.py", "new_path": null, "diff": "-# Copyright 2019 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
fix stax initialization rng bug, remove temp file
260,335
23.05.2019 12:57:58
25,200
913bc6b508daf0121ef4307fa607dede5b2ccfd8
fix stax dtype breakage
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -60,8 +60,9 @@ def fastvar(x, axis, keepdims):\ndef randn(stddev=1e-2):\n\"\"\"An initializer function for random normal coefficients.\"\"\"\n+ stddev = lax.convert_element_type(std...
Python
Apache License 2.0
google/jax
fix stax dtype breakage
260,335
24.05.2019 10:44:33
25,200
2802c8f51434403fad17a8407848597d799a433d
try pinning travis to jaxlib==0.1.15 Currently Travis CI builds are failing in a way we can't reproduce locally.
[ { "change_type": "MODIFY", "old_path": ".travis.yml", "new_path": ".travis.yml", "diff": "@@ -21,7 +21,7 @@ before_install:\n- conda config --add channels conda-forge\ninstall:\n- conda install --yes python=$TRAVIS_PYTHON_VERSION pip six protobuf>=3.6.0 absl-py opt_einsum numpy scipy pytest-xdist\n-...
Python
Apache License 2.0
google/jax
try pinning travis to jaxlib==0.1.15 Currently Travis CI builds are failing in a way we can't reproduce locally.
260,335
24.05.2019 19:02:40
25,200
6fe6cb0dbe3c55ebffe260f596896bafa3b24367
try fixing travis by using only one pytest job
[ { "change_type": "MODIFY", "old_path": ".travis.yml", "new_path": ".travis.yml", "diff": "@@ -21,7 +21,7 @@ before_install:\n- conda config --add channels conda-forge\ninstall:\n- conda install --yes python=$TRAVIS_PYTHON_VERSION pip six protobuf>=3.6.0 absl-py opt_einsum numpy scipy pytest-xdist\n-...
Python
Apache License 2.0
google/jax
try fixing travis by using only one pytest job
260,314
25.05.2019 16:56:22
14,400
e9ec30c096af45c420bd52d98a7908e2df753ba3
promote args for special functions
[ { "change_type": "MODIFY", "old_path": "jax/scipy/special.py", "new_path": "jax/scipy/special.py", "diff": "@@ -27,12 +27,34 @@ from ..numpy.lax_numpy import (_wraps, asarray, _reduction_dims, _constant_like,\n_promote_args_like)\n-# need to create new functions because _wraps sets the __name__ attr...
Python
Apache License 2.0
google/jax
promote args for special functions
260,314
25.05.2019 22:45:01
14,400
57aac741ac7c5f1066168f08a8f2353d16ba569b
fix typos when getting output of promote_args
[ { "change_type": "MODIFY", "old_path": "jax/scipy/special.py", "new_path": "jax/scipy/special.py", "diff": "@@ -29,31 +29,31 @@ from ..numpy.lax_numpy import (_wraps, asarray, _reduction_dims, _constant_like,\n@_wraps(osp_special.gammaln)\ndef gammaln(x):\n- x = _promote_args_like(osp_special.gammal...
Python
Apache License 2.0
google/jax
fix typos when getting output of promote_args
260,335
28.05.2019 20:25:38
25,200
743727325f4da4c2344fd3b9a9a0784eabeb76c4
improve error message for grad of non-scalar funs
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -303,7 +303,7 @@ def _check_scalar(x):\nraise TypeError(msg(x))\nelse:\nif not (isinstance(aval, ShapedArray) and aval.shape == ()):\n- raise TypeError(msg(x))\n+ raise TypeError(msg(aval))\ndef jacfwd(fun, ar...
Python
Apache License 2.0
google/jax
improve error message for grad of non-scalar funs
260,335
28.05.2019 21:07:13
25,200
2bf9d5aae919098e2c8afd3b64c402c48a821387
loosen tolerance on tanh grad test
[ { "change_type": "MODIFY", "old_path": "tests/lax_test.py", "new_path": "tests/lax_test.py", "diff": "@@ -82,7 +82,8 @@ LAX_OPS = [\nop_record(lax.expm1, 1, float_dtypes + complex_dtypes, jtu.rand_small()),\nop_record(lax.log, 1, float_dtypes + complex_dtypes, jtu.rand_positive()),\nop_record(lax.lo...
Python
Apache License 2.0
google/jax
loosen tolerance on tanh grad test
260,335
28.05.2019 21:10:09
25,200
5a049feea9cdf88948b5a4b5f05222ac869153de
further improve grad-of-nonscalar error message
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -296,14 +296,17 @@ def value_and_grad(fun, argnums=0, has_aux=False, holomorphic=False):\nreturn value_and_grad_f\ndef _check_scalar(x):\n- msg = \"Gradient only defined for scalar-output functions. Output was...
Python
Apache License 2.0
google/jax
further improve grad-of-nonscalar error message
260,335
28.05.2019 21:36:34
25,200
3b290457c483f60bb224131dc0176f48baac6acc
move stax randn init convert_element_type later
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -60,8 +60,8 @@ def fastvar(x, axis, keepdims):\ndef randn(stddev=1e-2):\n\"\"\"An initializer function for random normal coefficients.\"\"\"\n- stddev = lax.convert_element_type(std...
Python
Apache License 2.0
google/jax
move stax randn init convert_element_type later
260,335
28.05.2019 21:48:15
25,200
9fab325a675b84da13d4788ccae88b9e820cef84
loosen tanh grad test tolerance (2bf9d5a fix)
[ { "change_type": "MODIFY", "old_path": "tests/lax_test.py", "new_path": "tests/lax_test.py", "diff": "@@ -82,8 +82,7 @@ LAX_OPS = [\nop_record(lax.expm1, 1, float_dtypes + complex_dtypes, jtu.rand_small()),\nop_record(lax.log, 1, float_dtypes + complex_dtypes, jtu.rand_positive()),\nop_record(lax.lo...
Python
Apache License 2.0
google/jax
loosen tanh grad test tolerance (2bf9d5a fix)
260,335
28.05.2019 22:38:06
25,200
9c931ddebe4ae52877f0404c55e9d6f4a97a274e
allow more types to be jaxpr literals, fixes
[ { "change_type": "MODIFY", "old_path": "jax/abstract_arrays.py", "new_path": "jax/abstract_arrays.py", "diff": "@@ -199,3 +199,7 @@ def raise_to_shaped(aval):\nreturn ShapedArray(aval.shape, aval.dtype)\nelse:\nraise TypeError(type(aval))\n+\n+def is_scalar(x):\n+ return isinstance(x, tuple(scalar_t...
Python
Apache License 2.0
google/jax
allow more types to be jaxpr literals, fixes #772
260,335
28.05.2019 22:50:52
25,200
310103f578e078f55e70618e03fb782f76c9be2e
try a tweak on Literal for more cache hits
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -100,7 +100,23 @@ def jaxpr_as_fun(typed_jaxpr, *args):\nJaxprEqn = namedtuple('JaxprEqn', ['invars', 'outvars', 'primitive',\n'bound_subjaxprs', 'restructure',\n'destructure', 'params'])\n-class Literal(Wra...
Python
Apache License 2.0
google/jax
try a tweak on Literal for more cache hits
260,335
29.05.2019 08:12:05
25,200
778435a90b01762b6f207f352e8f8e5c013318b3
undo in favor of new literal staging method
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -118,6 +118,9 @@ class Literal(object):\ndef __eq__(self, other):\nreturn self.val == other.val if self.hashable else self.val is other.val\n+ def __repr__(self):\n+ return 'Literal(val={}, hashable={})'.for...
Python
Apache License 2.0
google/jax
undo #503 in favor of new literal staging method
260,389
29.05.2019 11:25:42
25,200
c9b2e79bd131f65dd659c6affc76a2d37c26f68b
Drop dead compiled_call code
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -614,7 +614,5 @@ def jvp_jaxpr(jaxpr, nonzeros, instantiate):\nprimitive_transposes[core.call_p] = partial(call_transpose, call_p)\n-primitive_transposes[pe.compiled_call_p] = partial(c...
Python
Apache License 2.0
google/jax
Drop dead compiled_call code
260,409
29.05.2019 16:35:39
14,400
58c02215052e68dc9fd60e93cccf1fc0f584ad85
Updating GP regression example
[ { "change_type": "MODIFY", "old_path": "examples/gaussian_process_regression.py", "new_path": "examples/gaussian_process_regression.py", "diff": "@@ -20,77 +20,98 @@ from __future__ import division\nfrom __future__ import print_function\nfrom absl import app\nfrom absl import flags\n+from functools ...
Python
Apache License 2.0
google/jax
Updating GP regression example
260,409
30.05.2019 12:13:10
14,400
06d41fbad1d8a5df938babd734b44d1a41c68fc5
Added a note about squared distances
[ { "change_type": "MODIFY", "old_path": "examples/gaussian_process_regression.py", "new_path": "examples/gaussian_process_regression.py", "diff": "@@ -56,6 +56,9 @@ def main(unused_argv):\ndef softplus(x):\nreturn np.logaddexp(x, 0.)\n+ # Note, writing out the vectorized form of the identity\n+ # ||x...
Python
Apache License 2.0
google/jax
Added a note about squared distances
260,335
31.05.2019 09:20:45
25,200
0a8810d9bc9cfe62307d47f7d71d62dc0a6d8a94
abstract_eval_fun should instantiate output pval
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -212,8 +212,9 @@ def partial_eval_wrapper(avals, *consts):\ndef abstract_eval_fun(fun, *avals, **params):\npvs_in = [PartialVal((a, unit)) for a in avals]\n- _, pvou...
Python
Apache License 2.0
google/jax
abstract_eval_fun should instantiate output pval
260,335
31.05.2019 14:04:04
25,200
8377224b905b1fa3cbd2eaa9be52f749058581bc
ppermute (aka collective_permute) jvp + transpose
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_parallel.py", "new_path": "jax/lax/lax_parallel.py", "diff": "@@ -214,12 +214,12 @@ def _ppermute_translation_rule(c, x, replica_groups, perm):\nreturn c.CollectivePermute(x, full_perm)\ndef _ppermute_transpose_rule(t, perm, axis_name):\n- sources,...
Python
Apache License 2.0
google/jax
ppermute (aka collective_permute) jvp + transpose
260,335
31.05.2019 14:11:38
25,200
dffe49153700055e1d0c344dad2bb3d0edf07525
add another ppermute test, remove extra print call
[ { "change_type": "MODIFY", "old_path": "tests/pmap_test.py", "new_path": "tests/pmap_test.py", "diff": "@@ -303,7 +303,19 @@ class PmapTest(jtu.JaxTestCase):\nx = onp.arange(device_count, dtype=onp.float32)\nans = grad(g)(x)\nexpected = onp.concatenate([onp.pi + onp.arange(1, device_count), [0]])\n-...
Python
Apache License 2.0
google/jax
add another ppermute test, remove extra print call
260,335
01.06.2019 08:30:25
25,200
93e114337334fd0e42ac5bf0d5caecdab5344383
improve disable_jit docstring
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -128,16 +128,17 @@ def _jit(fun, static_argnums, device_values=True):\n@contextmanager\ndef disable_jit():\n- \"\"\"Context manager that disables `jit`.\n+ \"\"\"Context manager that disables `jit` behavior un...
Python
Apache License 2.0
google/jax
improve disable_jit docstring
260,335
01.06.2019 09:34:33
25,200
11c512a194add25ade20dbfacf635d6e0834eba3
add jax.eval_shape, fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1062,3 +1062,54 @@ def _make_graphviz(fun):\ngraphviz_maker.__name__ = \"make_graphviz({})\".format(graphviz_maker.__name__)\nreturn graphviz_maker\n+\n+\n+def eval_shape(fun, *args, **kwargs):\n+ \"\"\"Compu...
Python
Apache License 2.0
google/jax
add jax.eval_shape, fixes #798
260,335
01.06.2019 09:48:28
25,200
dda95df519f3f421241e3fcda050e690524c012f
fix duck typing in jax.eval_shape (cf.
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1083,21 +1083,26 @@ def eval_shape(fun, *args, **kwargs):\nArgs:\n*args: a positional argument tuple of arrays, scalars, or (nested) standard\n- Python containers (pytrees) of those types. Since only the ``sh...
Python
Apache License 2.0
google/jax
fix duck typing in jax.eval_shape (cf. #798)
260,335
01.06.2019 09:53:32
25,200
ffec059f0ef4ebb27973868167bd13011ed321ab
add jax.eval_shape to reference docs via jax.rst
[ { "change_type": "MODIFY", "old_path": "docs/jax.rst", "new_path": "docs/jax.rst", "diff": "@@ -19,6 +19,6 @@ Module contents\n---------------\n.. automodule:: jax\n- :members: jit, disable_jit, grad, value_and_grad, vmap, pmap, jacfwd, jacrev, hessian, jvp, linearize, vjp, make_jaxpr\n+ :members: j...
Python
Apache License 2.0
google/jax
add jax.eval_shape to reference docs via jax.rst
260,335
03.06.2019 07:22:32
25,200
fadd18b36c32ed3a2903dee745e68513d250f013
namedtuple subclass transparency (fixes
[ { "change_type": "MODIFY", "old_path": "jax/tree_util.py", "new_path": "jax/tree_util.py", "diff": "@@ -247,7 +247,7 @@ def _get_node_type(maybe_tree):\nreturn node_types.get(t) or _namedtuple_node(t)\ndef _namedtuple_node(t):\n- if t.__bases__ == (tuple,) and hasattr(t, '_fields'):\n+ if issubclass...
Python
Apache License 2.0
google/jax
namedtuple subclass transparency (fixes #806)
260,335
04.06.2019 13:17:41
25,200
a12ca881a363354b07affadda86f92227be3a6ef
add future to macos wheel build script
[ { "change_type": "MODIFY", "old_path": "build/build_jaxlib_wheels_macos.sh", "new_path": "build/build_jaxlib_wheels_macos.sh", "diff": "@@ -27,7 +27,7 @@ build_jax () {\npyenv activate \"${VENV}\"\n# We pin the Numpy wheel to a version < 1.16.0, because Numpy extensions built\n# at 1.16.0 are not ba...
Python
Apache License 2.0
google/jax
add future to macos wheel build script
260,335
04.06.2019 18:33:52
25,200
e1f32d0d1e98b2b55d8b0ceefdfe14f7182f84e6
add process_map to vmap tracer, i.e. vmap-of-pmap
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -124,6 +124,8 @@ class BatchTrace(Trace):\nreturn BatchTracer(self, val_out, dim_out)\ndef process_call(self, call_primitive, f, tracers, params):\n+ if call_primitive in pe...
Python
Apache License 2.0
google/jax
add process_map to vmap tracer, i.e. vmap-of-pmap
260,335
03.06.2019 07:17:37
25,200
35e5e64416a0c1ab9376eccc7b1ce1f9278235a9
make custom_transforms handle pytrees, add api.defvjp With advice from
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -26,6 +26,7 @@ from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n+import collections\nimport itertools\nimport operator as op\nimport os\n@@ -38,6 ...
Python
Apache License 2.0
google/jax
make custom_transforms handle pytrees, add api.defvjp With advice from @dougalm!
260,335
05.06.2019 13:20:44
25,200
372d60bb08232e171a9480c6b1e66827b72c439e
add docstring to custom_transforms
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -73,8 +73,8 @@ def jit(fun, static_argnums=()):\nArgs:\nfun: Function to be jitted. Should be a pure function, as side-effects may\n- only be executed once. Its positional arguments and return value should be\...
Python
Apache License 2.0
google/jax
add docstring to custom_transforms
260,335
05.06.2019 13:48:04
25,200
720dec4072ed9c0ead049ce90321d600110192f1
add custom_gradient
[ { "change_type": "MODIFY", "old_path": "docs/jax.rst", "new_path": "docs/jax.rst", "diff": "@@ -19,6 +19,6 @@ Module contents\n---------------\n.. automodule:: jax\n- :members: jit, disable_jit, grad, value_and_grad, vmap, pmap, jacfwd, jacrev, hessian, jvp, linearize, vjp, make_jaxpr, eval_shape\n+...
Python
Apache License 2.0
google/jax
add custom_gradient
260,335
05.06.2019 17:04:33
25,200
9e49500c54b7a51eb379b4625275e30ec9b0921c
simplify gather shape rule
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -2631,22 +2631,11 @@ def _gather_shape_rule(operand, start_indices, dimension_numbers, slice_sizes,\nmsg = (\"slice_sizes must have rank equal to the gather operand; \"\n\"operand.shape={}, slice_sizes...
Python
Apache License 2.0
google/jax
simplify gather shape rule Co-authored-by: Roy Frostig <frostig@google.com>
260,335
05.06.2019 16:56:43
25,200
ab20f0292ca22ee68c7c7debe12467ff932d8ce3
add docstring for defjvp_all
[ { "change_type": "MODIFY", "old_path": "docs/jax.rst", "new_path": "docs/jax.rst", "diff": "@@ -19,6 +19,6 @@ Module contents\n---------------\n.. automodule:: jax\n- :members: jit, disable_jit, grad, value_and_grad, vmap, pmap, jacfwd, jacrev, hessian, jvp, linearize, vjp, make_jaxpr, eval_shape, c...
Python
Apache License 2.0
google/jax
add docstring for defjvp_all
260,335
05.06.2019 17:56:18
25,200
948ec8fbe8ef887935cbf53ec0d83265cafcaa8a
add docstrings for defjvp and defjvp2
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1082,8 +1082,15 @@ def defjvp_all(fun, custom_jvp):\n``custom_jvp`` represents a function with signature ``a -> T a -> (b, Tb)``,\nwhere we use ``T x`` to represent a tangent type for the type ``x``.\n- Defin...
Python
Apache License 2.0
google/jax
add docstrings for defjvp and defjvp2
260,335
05.06.2019 18:02:15
25,200
cfaa49f8843f2c1bfa18dc4d42f291ad72be362f
improve custom_gradient docstring
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1326,6 +1326,14 @@ def custom_gradient(fun):\nIf the function to be differentiated has type signature ``a -> b``, then the\nPython callable ``fun`` should have signature ``a -> (b, CT b -> CT a)`` where\nwe u...
Python
Apache License 2.0
google/jax
improve custom_gradient docstring
260,335
05.06.2019 19:13:33
25,200
a6c41a323c1c9a4bd737fae31de889d7828b401d
finish drafting defvjp/defjvp docstrings
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1076,7 +1076,7 @@ def _check_custom_transforms_type(name, fun):\nraise TypeError(msg.format(name, type(fun)))\ndef defjvp_all(fun, custom_jvp):\n- \"\"\"Define a custom JVP rule for a custom_transforms functi...
Python
Apache License 2.0
google/jax
finish drafting defvjp/defjvp docstrings
260,288
05.06.2019 18:43:58
25,200
305127d814b5b282190f166cd8b911b3fc749a0e
Changes to jax optimizers.py to facilitate serialization of optimizer state.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/optimizers.py", "new_path": "jax/experimental/optimizers.py", "diff": "@@ -423,3 +423,51 @@ def clip_grads(grad_tree, max_norm):\nnorm = l2_norm(grad_tree)\nnormalize = lambda g: np.where(norm < max_norm, g, g * (max_norm / norm))\nreturn tree...
Python
Apache License 2.0
google/jax
Changes to jax optimizers.py to facilitate serialization of optimizer state. Co-authored-by: Matthew Johnson <mattjj@google.com>
260,335
06.06.2019 10:12:07
25,200
121d78129b8705d7b0bdd55d5bff87ab79b06b40
docstring improvements from comments
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -979,26 +979,10 @@ def custom_transforms(fun):\ntransformations like ``jax.jit`` and ``jax.vmap``. Custom differentiation\nrules can be supplied using the ``jax.defjvp`` and ``jax.defvjp`` functions.\n- JAX tr...
Python
Apache License 2.0
google/jax
docstring improvements from @skye comments
260,335
07.06.2019 16:00:11
25,200
d622e78e82a408a98334ea2548c0bf9b0e4787ff
fix broken travis path from previous commit
[ { "change_type": "MODIFY", "old_path": ".travis.yml", "new_path": ".travis.yml", "diff": "@@ -11,9 +11,9 @@ env:\n- JAX_ENABLE_X64=1 JAX_NUM_GENERATED_CASES=100\nbefore_install:\n- if [[ \"$TRAVIS_PYTHON_VERSION\" == \"2.7\" ]]; then\n- wget https://repo.continuum.io/miniconda/Miniconda2-0.1.18-Linu...
Python
Apache License 2.0
google/jax
fix broken travis path from previous commit
260,335
08.06.2019 08:57:34
25,200
35de70472933a10030111dad75dadff9a63fc4b1
add pswapaxes lowering (fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_parallel.py", "new_path": "jax/lax/lax_parallel.py", "diff": "@@ -106,6 +106,9 @@ def ppermute(x, axis_name, perm):\ndef pswapaxes(x, axis_name, axis):\n\"\"\"Swap the pmapped axis ``axis_name`` with the unmapped axis ``axis``.\n+ The mapped axis s...
Python
Apache License 2.0
google/jax
add pswapaxes lowering (fixes #827)
260,335
08.06.2019 09:03:55
25,200
d7c7df1bfd3f520dd55e18bcc70e905333b289b8
temporarily disable a check in pswapaxes
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_parallel.py", "new_path": "jax/lax/lax_parallel.py", "diff": "@@ -124,11 +124,12 @@ def pswapaxes(x, axis_name, axis):\nwhere ``axis_size`` is the size of the mapped axis named ``axis_name`` in\nthe input ``x``.\n\"\"\"\n- axis_size = psum(1, axis_...
Python
Apache License 2.0
google/jax
temporarily disable a check in pswapaxes
260,335
08.06.2019 09:11:25
25,200
c061fd7b058759133aa56d48130fad1a0a0a311b
improve error for unimplemented parallel primitive
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -229,6 +229,8 @@ def xla_unshard(c, replica_groups, x):\n### the main pmap machinery lowers SPMD jaxprs to multi-replica XLA computations\n+class PmapPrimitive(core.Primitive): pass...
Python
Apache License 2.0
google/jax
improve error for unimplemented parallel primitive
260,335
09.06.2019 09:49:16
25,200
4ab89084f1e1764e65e60ff2f3dce1f2c8f328f0
fix DeviceTuple constant handler (fixes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -470,9 +470,8 @@ pytype_aval_mappings[DeviceTuple] = op.attrgetter('aval')\ncanonicalize_dtype_handlers[DeviceTuple] = identity\ndef _device_tuple_constant_handler(c, val, canonicaliz...
Python
Apache License 2.0
google/jax
fix DeviceTuple constant handler (fixes #831)
260,335
09.06.2019 20:18:18
25,200
1829508b28b4386ac5511f4d668cbbef308b48b0
np.arange shouldn't pop its kwargs (fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1379,7 +1379,7 @@ def identity(n, dtype=None):\n@_wraps(onp.arange)\ndef arange(*args, **kwargs):\n- dtype = kwargs.pop(\"dtype\", None)\n+ dtype = kwargs.get(\"dtype\", None)\nif not ...
Python
Apache License 2.0
google/jax
np.arange shouldn't pop its kwargs (fixes #830)
260,335
10.06.2019 12:17:20
25,200
aebf7eb0884c695b0d4950667c03c1e251d5ab0f
fix jax.numpy.transpose arg name 'axes'
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -512,9 +512,9 @@ def sinc(x):\n@_wraps(onp.transpose)\n-def transpose(x, axis=None):\n- axis = onp.arange(ndim(x))[::-1] if axis is None else axis\n- return lax.transpose(x, axis)\n+def...
Python
Apache License 2.0
google/jax
fix jax.numpy.transpose arg name 'axes'
260,335
11.06.2019 06:52:55
25,200
bbf625e0df781a8420f35621e1c99a46cf37130a
fix jax.rst docs (remove defvjp2 / defjvp2)
[ { "change_type": "MODIFY", "old_path": "docs/jax.rst", "new_path": "docs/jax.rst", "diff": "@@ -19,6 +19,6 @@ Module contents\n---------------\n.. automodule:: jax\n- :members: jit, disable_jit, grad, value_and_grad, vmap, pmap, jacfwd, jacrev, hessian, jvp, linearize, vjp, make_jaxpr, eval_shape, c...
Python
Apache License 2.0
google/jax
fix jax.rst docs (remove defvjp2 / defjvp2)
260,335
11.06.2019 14:56:21
25,200
a56a7d02ffba288f1b5f6dbfb54fa89a3bcb9ec2
make threefry_2x32 not do any op-by-op stuff
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -146,7 +146,7 @@ def _promote_shapes(*args):\nshapes = [shape(arg) for arg in args]\nnd = len(lax.broadcast_shapes(*shapes))\nreturn [lax.reshape(arg, (1,) * (nd - len(shp)) + shp)\n- i...
Python
Apache License 2.0
google/jax
make threefry_2x32 not do any op-by-op stuff
260,335
14.06.2019 11:49:07
25,200
191206db90088a3c4f6628b6ce0a8fa35860886a
fix the david sussillo bug
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -405,9 +405,8 @@ def trace_to_subjaxpr(master, instantiate, pvals):\nin_tracers = map(trace.new_arg, pvals)\nout_tracer = yield in_tracers, {}\nout_tracer = trace.fu...
Python
Apache License 2.0
google/jax
fix the david sussillo bug Co-authored-by: Dougal Maclaurin <dougalm@google.com>
260,335
15.06.2019 12:01:20
25,200
1262ca9b309580eed69c8d7179a58db2c76b71a1
improve conv rhs batching, add systematic test
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1843,15 +1843,13 @@ def _conv_general_dilated_batch_rule(\nreturn outputs, 0\nelif rhs_bdim is not None:\n- #TODO(#212): use a map construct instead of unrolling.\n- rhs = batching.move_dim_to_front(r...
Python
Apache License 2.0
google/jax
improve conv rhs batching, add systematic test
260,335
15.06.2019 13:38:55
25,200
ff29d582e8f287954ba446fb08924bae5eba2857
t # This is a combination of 2 commits. make all conv vmap rules generate a single call also plumb feature_group_count and batch_group_count everywhere
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -371,7 +371,8 @@ def concatenate(operands, dimension):\noperand_shapes=tuple(o.shape for o in operands))\ndef conv_general_dilated(lhs, rhs, window_strides, padding, lhs_dilation=None,\n- rhs_dilation=...
Python
Apache License 2.0
google/jax
t # This is a combination of 2 commits. make all conv vmap rules generate a single call also plumb feature_group_count and batch_group_count everywhere
260,273
17.06.2019 12:18:58
-7,200
077d56529fcfd98f773a0cfeb6315e22273427ed
grouped convolution support
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -438,6 +438,18 @@ def conv_general_dilated(lhs, rhs, window_strides, padding, lhs_dilation=None,\nlhs_dilation = (1,) * (lhs.ndim - 2)\nif rhs_dilation is None:\nrhs_dilation = (1,) * (rhs.ndim - 2)\n+...
Python
Apache License 2.0
google/jax
grouped convolution support
260,335
17.06.2019 11:49:54
25,200
fef68deef62157baaed3d5e4672dfca4ae593611
fix reshape transpose bug (and add tests) This version of reshape (taking a `dimensions` argument, which effectively fuses in a transpose) seems only to be used in the JVP rule for lax._reduce_prod (basically np.product), but its transpose rule was totally busted and untested.
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1600,7 +1600,7 @@ ad.defjvp(sub_p,\nad.primitive_transposes[sub_p] = _sub_transpose\nmul_p = standard_binop([_num, _num], 'mul')\n-ad.defbilinear_broadcasting(_brcast, mul_p, mul, mul) # TODO\n+ad.def...
Python
Apache License 2.0
google/jax
fix reshape transpose bug (and add tests) This version of reshape (taking a `dimensions` argument, which effectively fuses in a transpose) seems only to be used in the JVP rule for lax._reduce_prod (basically np.product), but its transpose rule was totally busted and untested.
260,273
17.06.2019 20:40:31
-7,200
e3462fd8b177bca761aface385e76867830e0a41
write out batch_feature_groups to simplify and correct implementation
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -372,7 +372,7 @@ def concatenate(operands, dimension):\ndef conv_general_dilated(lhs, rhs, window_strides, padding, lhs_dilation=None,\nrhs_dilation=None, dimension_numbers=None,\n- feature_group_count...
Python
Apache License 2.0
google/jax
write out batch_feature_groups to simplify and correct implementation
260,335
17.06.2019 14:23:26
25,200
96775a4d40cf2e06c68fe69a8cd0f6f0b7cc2242
add tuple simplification logic
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -260,6 +260,9 @@ class JaxprTracer(Tracer):\nreturn self\ndef unpack(self):\n+ if type(self.recipe) is JaxprEqn and self.recipe.primitive is core.pack_p:\n+ return t...
Python
Apache License 2.0
google/jax
add tuple simplification logic Co-authored-by: Dougal Maclaurin <dougalm@google.com>
260,335
17.06.2019 19:39:14
25,200
6dd54236665ed1ade1574e453f22a320bc5e9e94
manually fuse a transpose into a reshape
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1903,7 +1903,7 @@ def _reshape_axis_into(src, dst, x):\nperm.insert(dst, src)\nnew_shape = list(onp.delete(x.shape, src))\nnew_shape[dst] *= x.shape[src]\n- return reshape(transpose(x, perm), new_shap...
Python
Apache License 2.0
google/jax
manually fuse a transpose into a reshape
260,335
18.06.2019 08:09:37
25,200
221426fadcfd99cc4e95f562b51ff33a18621630
de-duplicate constants staged into jaxprs
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -119,6 +119,9 @@ class Literal(object):\nreturn self.val == other.val if self.hashable else self.val is other.val\ndef __repr__(self):\n+ if self.hashable:\n+ return '{}'.format(self.val)\n+ else:\nreturn 'L...
Python
Apache License 2.0
google/jax
de-duplicate constants staged into jaxprs Co-authored-by: Peter Hawkins <phawkins@google.com> Co-authored-by: Dougal Maclaurin <dougalm@google.com>
260,335
18.06.2019 09:18:44
25,200
eb01b8bfef577ea94125ee77137d02eb539be5f9
improve linearize error message fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -762,13 +762,23 @@ def linearize(fun, *primals):\nout_primal, out_pval, jaxpr, consts = ad.linearize(jaxtree_fun, *primals_flat)\nout_tree = out_tree()\nout_primal_py = build_tree(out_tree, out_primal)\n- lift...
Python
Apache License 2.0
google/jax
improve linearize error message fixes #871
260,335
18.06.2019 21:23:52
25,200
e939e7291a6c07ad41fddc7f0325e62540f46457
lower args in JaxprTrace.process_eval
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -94,6 +94,9 @@ class JaxprTrace(Trace):\npartial_eval = custom_partial_eval_rules[primitive]\nreturn partial_eval(self, *tracers, **params)\nelse:\n+ pvs, consts = u...
Python
Apache License 2.0
google/jax
lower args in JaxprTrace.process_eval
260,335
18.06.2019 21:51:51
25,200
b53bccc5d07436e3aedc28a220e43675fb60b607
make more literals nontrivially hashable
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -20,9 +20,11 @@ from operator import attrgetter\nfrom contextlib import contextmanager\nfrom collections import namedtuple, Counter, defaultdict\nfrom weakref import ref\n-import six\nimport types\n+import n...
Python
Apache License 2.0
google/jax
make more literals nontrivially hashable
260,335
19.06.2019 07:44:46
25,200
0a040fcba0659908dca5f3e6ac10dc392e475fb6
fix parallel axis_index w/ custom partial_eval
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -399,11 +399,17 @@ def axis_index(axis_name):\nreturn axis_index_p.bind(trace.pure(core.unit),\naxis_size=axis_size, axis_name=axis_name)\n+def _axis_index_partial_eval(trace, _, **...
Python
Apache License 2.0
google/jax
fix parallel axis_index w/ custom partial_eval
260,335
19.06.2019 10:32:55
25,200
5aef18f897dfff50b9c9604b1181c0ff55e2f97d
improve literal hashing logic This fixes a bug where scalar ndarray literals with different dtypes could hash to the same value. It also makes scalar DeviceArray literals hashable after
[ { "change_type": "MODIFY", "old_path": "jax/abstract_arrays.py", "new_path": "jax/abstract_arrays.py", "diff": "@@ -200,6 +200,4 @@ def raise_to_shaped(aval):\nelse:\nraise TypeError(type(aval))\n-def is_scalar(x):\n- return isinstance(x, tuple(scalar_types)) and onp.shape(x) == ()\n-scalar_types = ...
Python
Apache License 2.0
google/jax
improve literal hashing logic This fixes a bug where scalar ndarray literals with different dtypes could hash to the same value. It also makes scalar DeviceArray literals hashable after #884.
260,335
19.06.2019 12:43:35
25,200
7c7031384b55f60ecc943251b1a34e2f7350021d
skip some conv vmap tests on cpu and tpu
[ { "change_type": "MODIFY", "old_path": "tests/lax_test.py", "new_path": "tests/lax_test.py", "diff": "@@ -2219,6 +2219,10 @@ class LaxVmapTest(jtu.JaxTestCase):\nif (lhs_bdim, rhs_bdim) != (None, None)\nfor rng in [jtu.rand_default()]\n))\n+ # TODO(mattjj): some cases fail on CPU with the latest XLA...
Python
Apache License 2.0
google/jax
skip some conv vmap tests on cpu and tpu
260,512
19.06.2019 19:20:14
25,200
d420517d7ba0a68848226cb80feb201a257faf52
Add link to XLA header in jax_to_hlo
[ { "change_type": "MODIFY", "old_path": "jax/tools/jax_to_hlo.py", "new_path": "jax/tools/jax_to_hlo.py", "diff": "@@ -61,7 +61,7 @@ This generates two BUILD targets:\n//your/thing:prog_hlo.txt\nYou can then depend on one of these as a data dependency and invoke it using\n-XLA's public C++ APIs.\n+XL...
Python
Apache License 2.0
google/jax
Add link to XLA header in jax_to_hlo
260,335
20.06.2019 07:23:14
25,200
37fd8efa42ed3c0598ab9e75bf39cafc4076b18e
fix a case of const instantiation for scan
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -424,7 +424,7 @@ def instantiate_const_at(trace, instantiate, tracer):\nreturn pack(map(partial(instantiate_const_at, trace), instantiate, tracer))\nelif t is bool:\...
Python
Apache License 2.0
google/jax
fix a case of const instantiation for scan
260,535
20.06.2019 16:23:13
25,200
8b163628fdb504ee51975383d35c2d43bdc3085f
map stop_gradient over data structure. otherwise it is silently a no-op
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -45,7 +45,7 @@ from ..interpreters import ad\nfrom ..interpreters import batching\nfrom ..interpreters import parallel\nfrom ..util import curry, memoize, safe_zip, unzip2, prod\n-from ..tree_util impo...
Python
Apache License 2.0
google/jax
map stop_gradient over data structure. otherwise it is silently a no-op
260,547
23.06.2019 16:26:51
-3,600
2bde78a808eb6b2ca14c6abd6e8de010fe892a15
Add sigmoid into stax
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -41,6 +41,7 @@ import jax.numpy as np\ndef relu(x): return np.maximum(x, 0.)\ndef softplus(x): return np.logaddexp(x, 0.)\n+def sigmoid(x): return 1. / (1. + np.exp(-x))\ndef logsof...
Python
Apache License 2.0
google/jax
Add sigmoid into stax
260,335
23.06.2019 15:31:13
25,200
fe7329e8087c23e87d741ed112f410837358bcf8
iniital soft_pmap implementation
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -597,6 +597,10 @@ def pmap(fun, axis_name=None):\nf_pmapped.__name__ = namestr(f_pmapped.__name__, axis_name)\nreturn f_pmapped\n+class _TempAxisName(object):\n+ def __repr__(self):\n+ return '<temp axis {}>'....
Python
Apache License 2.0
google/jax
iniital soft_pmap implementation
260,335
23.06.2019 16:41:59
25,200
e36613da908cca4b5689c4f089d4fd21ed4ffdae
add basic soft_pmap tests
[ { "change_type": "MODIFY", "old_path": "tests/pmap_test.py", "new_path": "tests/pmap_test.py", "diff": "@@ -27,7 +27,8 @@ import jax.numpy as np\nfrom jax import test_util as jtu\nfrom jax import core\nfrom jax import lax\n-from jax.api import pmap, jit, vmap, jvp, grad, make_jaxpr, linearize, devic...
Python
Apache License 2.0
google/jax
add basic soft_pmap tests
260,335
24.06.2019 08:17:15
25,200
80f6eee865ce190422cfd2ae683e87eeda269799
added broken test for broadcasting papply
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -170,6 +170,7 @@ def broadcasting_papply(prim, name, size, vals, axes, **params):\nx, y = vals\nxdim, ydim = axes\n+ # TODO vectors! these asserts are wrong\nif xdim is None...
Python
Apache License 2.0
google/jax
added broken test for broadcasting papply
260,335
24.06.2019 11:10:45
25,200
40bbf068d8c1e0e5d8360ba191a81187aaf3b1a6
fix broadcasting papply rule, move to lax_parallel
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -138,72 +138,3 @@ class PapplyTrace(Trace):\nname = tuple(t.name for t in tracers)\nsize = tuple(t.axis_size for t in tracers)\nreturn PapplyTracer(self, name, size, vals, a...
Python
Apache License 2.0
google/jax
fix broadcasting papply rule, move to lax_parallel
260,335
24.06.2019 11:18:56
25,200
c118b5cf136736a17de3114242266097ec3f7afc
associate papply rules with more primitives
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_parallel.py", "new_path": "jax/lax/lax_parallel.py", "diff": "@@ -338,14 +338,47 @@ def _defidentity(prim, argnum=0):\nparallel.papply_primitive_rules[prim] = partial(_identity_papply, prim, argnum)\n+_defvectorized(lax.neg_p)\n+_defvectorized(lax....
Python
Apache License 2.0
google/jax
associate papply rules with more primitives
260,335
24.06.2019 11:48:33
25,200
9783fad6aa676cd32e037fc29bb986a045cdb5d1
more fixes to broadcasting papply rule, tests
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_parallel.py", "new_path": "jax/lax/lax_parallel.py", "diff": "@@ -269,6 +269,13 @@ pxla.split_axis_rules[all_to_all_p] = _all_to_all_split_axis_rule\ndef _drop(x, dim, axis_name):\nreturn lax.dynamic_index_in_dim(x, axis_index(axis_name), dim, Fals...
Python
Apache License 2.0
google/jax
more fixes to broadcasting papply rule, tests
260,335
24.06.2019 14:53:24
25,200
cf29492335d48f068dca313af61e06d6a2bcaea3
soft_pmap device persistence via lazy reshape
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -64,7 +64,7 @@ def shard_arg(device_ordinals, axis_size, arg):\nnrep = len(device_ordinals)\nassignments = assign_shards_to_replicas(nrep, axis_size)\nif (type(arg) in (ShardedDevic...
Python
Apache License 2.0
google/jax
soft_pmap device persistence via lazy reshape
260,335
24.06.2019 17:24:09
25,200
73c0458ddaf8b1162a07cbee93414a8f92407026
remove unneeded code, fix bug
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -256,8 +256,8 @@ class JVPTrace(Trace):\nprimals = [t.primal for t in tracers]\ntangents = [t.tangent for t in tracers]\nnonzero_tangents, in_tree_def = tree_to_jaxtuples(tangents)\n- f...
Python
Apache License 2.0
google/jax
remove unneeded code, fix bug
260,335
24.06.2019 19:45:18
25,200
a663486148e24f8152e98dce740df98248063fdc
fixes from rebase onto master
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -138,3 +138,6 @@ class PapplyTrace(Trace):\nname = tuple(t.name for t in tracers)\nsize = tuple(t.axis_size for t in tracers)\nreturn PapplyTracer(self, name, size, vals, ax...
Python
Apache License 2.0
google/jax
fixes from rebase onto master
260,335
25.06.2019 06:37:40
25,200
ae550c102bf915992941989c4237dd9aae08f29c
roll back soft_pmap device persistence (bc broken)
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -515,40 +515,17 @@ class ShardedDeviceArray(xla.DeviceArray):\nrepresent distinct logical shards. The correspondence can be computed with\nthe assign_shards_to_replicas function.\n\...
Python
Apache License 2.0
google/jax
roll back soft_pmap device persistence (bc broken)
260,299
26.06.2019 14:21:03
-3,600
9ad18a8a54f05a46a110ea025947e2dbb9a2fad2
Add failing custom_transforms closure test
[ { "change_type": "MODIFY", "old_path": "tests/api_test.py", "new_path": "tests/api_test.py", "diff": "@@ -614,6 +614,17 @@ class APITest(jtu.JaxTestCase):\nexpected = {'hi': 2 * onp.arange(3), 'bye': 2 * onp.ones((3, 2))}\nself.assertAllClose(ans, expected, check_dtypes=False)\n+ def test_custom_tra...
Python
Apache License 2.0
google/jax
Add failing custom_transforms closure test
260,299
26.06.2019 16:22:21
-3,600
3cdcd9ce930e7f6ead20125820a8fb9db7ce800b
Draft fix for custom_transform of closure
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -983,12 +983,20 @@ class CustomTransformsFunction(object):\nreturn '<jax.custom_transforms function {fun}>'.format(fun=self.__name__)\ndef __call__(self, *args, **kwargs):\n+ def pv_like(x):\n+ aval = x.aval i...
Python
Apache License 2.0
google/jax
Draft fix for custom_transform of closure
260,299
26.06.2019 16:49:04
-3,600
3d1ba30f2e8b2d444fcbae83c7f5bf57456bd7cb
A few custom_transforms fix-ups
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -986,16 +986,14 @@ class CustomTransformsFunction(object):\ndef pv_like(x):\naval = x.aval if hasattr(x, 'aval') else xla.abstractify(x)\nreturn pe.PartialVal((aval, core.unit))\n- wrapped = lu.wrap_init(self....
Python
Apache License 2.0
google/jax
A few custom_transforms fix-ups