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
17.12.2018 22:21:59
28,800
d8388e2d80379051063aef61b9ff06752d9f31ac
complete support for two-operand einsum
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1120,13 +1120,16 @@ def einsum(*operands):\nrhs, rhs_names = sum_repeats(rhs, rhs_names, rhs_counts,\nresult_names + lhs_names)\n- # contract lhs against rhs\ncontracted_names = contra...
Python
Apache License 2.0
google/jax
complete support for two-operand einsum
260,335
18.12.2018 09:06:01
28,800
6261ef729a5cd4b9ad3a9bcfca94a7140cb16d60
more einsum improvements (complete?)
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1060,6 +1060,7 @@ def tensordot(a, b, axes=2):\ndef einsum(*operands):\noperands, contractions = opt_einsum.contract_path(\n*operands, einsum_call=True, use_blas=True)\n+ operands = li...
Python
Apache License 2.0
google/jax
more einsum improvements (complete?)
260,335
18.12.2018 09:12:49
28,800
061d033c2bd82b53c448f4e0d81ccfd4d98e268b
add jit around einsum
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -24,6 +24,7 @@ import opt_einsum\nimport collections\nimport itertools\n+from jax import jit\nfrom .. import core\nfrom ..abstract_arrays import UnshapedArray, ShapedArray, ConcreteArra...
Python
Apache License 2.0
google/jax
add jit around einsum
260,335
18.12.2018 11:33:44
28,800
d7745dd9af8039f558f63b1eeef8044b88ed2055
actually fix py3 str translate
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -16,13 +16,14 @@ from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n-from six.moves import builtins\n+import collections\n+i...
Python
Apache License 2.0
google/jax
actually fix py3 str translate
260,335
17.12.2018 17:20:52
28,800
0a9ee106b382326ccf8373707f8577ba8a2afec9
implement triangular solve lhs jvp (w/
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -328,7 +328,7 @@ defbilinear = partial(defbilinear_broadcasting, lambda g, x: g)\ndef bilinear_transpose(lhs_rule, rhs_rule, cotangent, x, y, **kwargs):\n- assert x is None or y is None...
Python
Apache License 2.0
google/jax
implement triangular solve lhs jvp (w/ @froystig)
260,335
19.12.2018 07:59:00
28,800
997c9c5a50febab1dfd7203cf711a3371993c319
fix einsum tensor product logic (fixes The error was that `lhs_names` and `rhs_names` included `batch_names` as prefixes, but the reshaping logic was written as if they did not include batch_names (and so batch_names had to be prepended).
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1155,14 +1155,16 @@ def _einsum(operands, contractions):\nif lhs_batch != rhs_batch:\nrhs = moveaxis(rhs, rhs_batch, lhs_batch)\nbatch_names = ''.join(lhs_names[i] for i in lhs_batch)\...
Python
Apache License 2.0
google/jax
fix einsum tensor product logic (fixes #37) The error was that `lhs_names` and `rhs_names` included `batch_names` as prefixes, but the reshaping logic was written as if they did not include batch_names (and so batch_names had to be prepended).
260,474
19.12.2018 10:59:13
18,000
87922fdf13b76990b4929be1b6e50e7d74250884
Generalized make_jaxpr to handle python containers
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -227,14 +227,17 @@ def lift_jaxpr(jaxpr, consts, io_tree, pvals, py_args):\nreturn unflatten_fun(fun, io_tree, *py_args)\ndef make_jaxpr(f):\n- # TODO(frostig): handle container trees etc.\ndef pv_like(x):\n- ...
Python
Apache License 2.0
google/jax
Generalized make_jaxpr to handle python containers
260,335
19.12.2018 08:42:29
28,800
b781e4509ab4e617f5673ae45f47ff5697017f88
update jaxlib references to 0.1.3
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -144,7 +144,7 @@ PYTHON_VERSION=py2 # alternatives: py2, py3\nCUDA_VERSION=cuda92 # alternatives: cuda90, cuda92, cuda100\nPLATFORM=linux_x86_64 # alternatives: linux_x86_64\nBASE_URL='https://storage.googleapis...
Python
Apache License 2.0
google/jax
update jaxlib references to 0.1.3
260,335
19.12.2018 09:07:04
28,800
6a9952a939dec83c977508c596093ae4db17308a
jax.numpy.arange should fall back to onp.arange fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -834,29 +834,16 @@ def eye(N, M=None, k=None, dtype=onp.dtype(\"float64\")):\n@_wraps(onp.arange)\ndef arange(*args, **kwargs):\n- nargs = len(args)\n- start, step = 0, 1\n+ # attempt t...
Python
Apache License 2.0
google/jax
jax.numpy.arange should fall back to onp.arange fixes #145
260,335
19.12.2018 09:21:30
28,800
dc1d0c260a4df15bd857faf00e72f4cfbab26b61
always fall back to onp.arange for now
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -835,14 +835,15 @@ def eye(N, M=None, k=None, dtype=onp.dtype(\"float64\")):\n@_wraps(onp.arange)\ndef arange(*args, **kwargs):\n# attempt to generate a lazy IotaConstant, otherwise fal...
Python
Apache License 2.0
google/jax
always fall back to onp.arange for now
260,335
19.12.2018 09:40:40
28,800
43e77acca5e7621fba68c4a5c5dba2494e58b9ff
fix select transpose rule
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -1602,6 +1602,11 @@ def select_dtype_rule(pred, on_true, on_false):\ndef select_transpose_rule(t, pred, on_true, on_false):\nassert pred is not None\n+ if t is ad_util.zero:\n+ return [None,\n+ ad_util.zero if...
Python
Apache License 2.0
google/jax
fix select transpose rule
260,335
19.12.2018 08:49:22
28,800
166f45bf2b3e4b88e8cd1babbb7c242680304f89
add tests for cases tf.einsum doesn't handle from one currently fails
[ { "change_type": "MODIFY", "old_path": "tests/lax_numpy_einsum_test.py", "new_path": "tests/lax_numpy_einsum_test.py", "diff": "@@ -38,136 +38,186 @@ def check(s, *ops):\nclass EinsumTest(jtu.JaxTestCase):\ndef test_three_operands_1(self):\n- x = rng().randn(3)\n- y = rng().randn(4)\n- z = rng().ran...
Python
Apache License 2.0
google/jax
add tests for cases tf.einsum doesn't handle from https://www.tensorflow.org/api_docs/python/tf/einsum one currently fails
260,335
19.12.2018 08:55:59
28,800
9a68bce567b13ebf0ccea4c9bdd44294c66850e2
add comment marking a bug
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1082,7 +1082,7 @@ def _einsum(operands, contractions):\ninput_names = input_str.split(',')\n# switch on the number of operands to be processed in this loop iteration.\n- # every case h...
Python
Apache License 2.0
google/jax
add comment marking a bug
260,335
19.12.2018 10:59:03
28,800
9c722db37304f293180119501c355d1d35431e16
einsum: update id strings after moving batch dims
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1121,20 +1121,21 @@ def _einsum(operands, contractions):\nfor n in batch_names)\nif contracted_names:\n# contract using lax.dot_general\n- lhs_cont, rhs_cont = unzip2((lhs_names.index(...
Python
Apache License 2.0
google/jax
einsum: update id strings after moving batch dims
260,474
19.12.2018 17:47:56
18,000
e6b23dd2b7e78dd123b18392b774d7fc1e85dcb0
Fixed triangular_solve_jvp_rule for transpose_a=True case
[ { "change_type": "MODIFY", "old_path": "jax/lax_linalg.py", "new_path": "jax/lax_linalg.py", "diff": "@@ -112,6 +112,7 @@ def triangular_solve_shape_rule(a, b, left_side=False, **unused_kwargs):\ndef triangular_solve_jvp_rule_a(\ng_a, ans, a, b, left_side, lower, transpose_a, conjugate_a):\ng_a = la...
Python
Apache License 2.0
google/jax
Fixed triangular_solve_jvp_rule for transpose_a=True case
260,335
19.12.2018 16:15:43
28,800
6a138202ef1c32f935cb6ec66c33340d67266466
fix several einsum bugs
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1119,10 +1119,8 @@ def _einsum(operands, contractions):\nbatch_names = set(lhs_names) & set(rhs_names) - contracted_names\nlhs_batch, rhs_batch = unzip2((lhs_names.find(n), rhs_names.f...
Python
Apache License 2.0
google/jax
fix several einsum bugs
260,335
19.12.2018 16:58:31
28,800
6bb9609fb8fd36490557dda3de4da486f3c4430a
disable test, py3 opt_einsum nondeterministic bug?
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1116,10 +1116,16 @@ def _einsum(operands, contractions):\nresult_names + lhs_names)\ncontracted_names = contracted_names & (set(lhs_names) | set(rhs_names))\n- batch_names = set(lhs_na...
Python
Apache License 2.0
google/jax
disable test, py3 opt_einsum nondeterministic bug?
260,335
20.12.2018 10:09:34
28,800
8f1bc997ca0146f4f537ee6418d9b7fc3cee9983
add value-and-grad fun (closes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -58,16 +58,17 @@ 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\n...
Python
Apache License 2.0
google/jax
add value-and-grad fun (closes #149)
260,335
20.12.2018 10:17:42
28,800
565c95582dd0fe77c85f16bf6d537bb9393ef077
add simple value_and_grad test
[ { "change_type": "MODIFY", "old_path": "tests/api_test.py", "new_path": "tests/api_test.py", "diff": "@@ -44,6 +44,15 @@ class APITest(jtu.JaxTestCase):\nassert grad(f, argnums=1)(1.0, 1.0, 1.0, flag=True) == 2.0\nassert grad(f, argnums=(2, 0))(1.0, 1.0, 1.0, flag=True) == (3.0, 1.0)\n+ def value_an...
Python
Apache License 2.0
google/jax
add simple value_and_grad test
260,335
21.12.2018 08:11:36
28,800
43f2e2a70a1d6e976d312561179a851a93aa0532
cover unimplemented add_jaxvals_p batching case
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -229,40 +229,49 @@ def reducer_batcher(prim, batched_args, batch_dims, axes, **kwargs):\nreturn prim.bind(operand, axes=axes, **kwargs), bdim_out\ndef add_batched(batched_ar...
Python
Apache License 2.0
google/jax
cover unimplemented add_jaxvals_p batching case
260,335
23.12.2018 09:28:23
28,800
d48e7ef43d933e9b56dff7bd026f5dd576930543
add batching (vmap) rule for lax.dynamic_slice fixes
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -1752,11 +1752,37 @@ def dynamic_slice_transpose_rule(t, operand, start_indices, slice_sizes,\nzeros = broadcast(_const(t, 0), operand_shape)\nreturn [dynamic_update_slice(zeros, t, start_indices), ad_util.zer...
Python
Apache License 2.0
google/jax
add batching (vmap) rule for lax.dynamic_slice fixes #165
260,335
23.12.2018 11:02:00
28,800
6d6b5263fea9d2549becc6b411d78ca348cc361d
add non-advanced boolean indexing support also don't sub-sample indexing tests (run them all) fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1438,7 +1438,7 @@ def _rewriting_take(arr, idx, axis=0):\n# Handle slice index (only static, otherwise an error is raised)\nelif isinstance(idx, slice):\n- if not _all(elt is None or i...
Python
Apache License 2.0
google/jax
add non-advanced boolean indexing support also don't sub-sample indexing tests (run them all) fixes #166
260,335
23.12.2018 11:21:33
28,800
b900339b879cba9737089abbd5fc061969ef5a60
loosen scipy test tol to fix benign failure
[ { "change_type": "MODIFY", "old_path": "tests/scipy_stats_test.py", "new_path": "tests/scipy_stats_test.py", "diff": "@@ -50,7 +50,8 @@ class LaxBackedScipyStatsTests(jtu.JaxTestCase):\nx, a, b, loc, scale = map(rng, shapes, dtypes)\nreturn [x, onp.abs(a), onp.abs(b), loc, onp.abs(scale)]\n- self._C...
Python
Apache License 2.0
google/jax
loosen scipy test tol to fix benign failure
260,335
24.12.2018 10:30:23
28,800
59142a2494537aa68e6d192416f1d4baa3457556
add error message if Dropout gets no rng key closes (though there's more work to be done here)
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -217,6 +217,12 @@ def Dropout(rate, mode='train'):\ndef init_fun(input_shape):\nreturn input_shape, ()\ndef apply_fun(params, inputs, rng):\n+ if rng is None:\n+ msg = (\"Dropout la...
Python
Apache License 2.0
google/jax
add error message if Dropout gets no rng key closes #170 (though there's more work to be done here)
260,335
30.12.2018 16:51:32
28,800
b4246163ac7c4a6480187d05b5a4c476434f1126
add stax.FanInConcat (fixes
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -212,6 +212,18 @@ def FanInSum():\nFanInSum = FanInSum()\n+def FanInConcat(axis=-1):\n+ \"\"\"Layer construction function for a fan-in concatenation layer.\"\"\"\n+ def init_fun(inp...
Python
Apache License 2.0
google/jax
add stax.FanInConcat (fixes #174)
260,335
30.12.2018 17:49:11
28,800
9c49a9bfe690738d502a48e33d2f421c4694e6ab
add np.append and np.polyval
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1070,6 +1070,27 @@ def diag(v, k=0):\nraise ValueError(\"diag input must be 1d or 2d\")\n+@_wraps(onp.polyval)\n+def polyval(p, x):\n+ if isinstance(p, onp.poly1d):\n+ p = onp.asarray(...
Python
Apache License 2.0
google/jax
add np.append and np.polyval
260,335
30.12.2018 18:07:50
28,800
5d2fc7c05bc103b73e2c6fb52f59fdfc57b4e5a5
only test np.polyval on nonscalar array shapes
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -458,7 +458,7 @@ class JaxTestCase(parameterized.TestCase):\ndef _CheckAgainstNumpy(self, lax_op, numpy_reference_op, args_maker,\ncheck_dtypes=False, tol=1e-5):\nargs = args_maker()\n- lax_ans = l...
Python
Apache License 2.0
google/jax
only test np.polyval on nonscalar array shapes
260,335
30.12.2018 21:42:55
28,800
072e6f78f1aebfa651574e47709d0f9f0e2e17a5
replace PRNGKey class with uint32[2] array
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -29,22 +29,11 @@ from .api import jit\nfrom jax.lib import xla_bridge\nfrom jax import core\n-class PRNGKey(object):\n- \"\"\"A pseudo-random number generator (PRNG) key for use with lax.random.\"\"\"\n-...
Python
Apache License 2.0
google/jax
replace PRNGKey class with uint32[2] array
260,335
30.12.2018 22:26:22
28,800
4ed5df85e3b8145910f31b6d1010034bb1011a98
add batching test for PRNGKeys and random sampling
[ { "change_type": "MODIFY", "old_path": "tests/batching_test.py", "new_path": "tests/batching_test.py", "diff": "@@ -24,6 +24,7 @@ import jax.numpy as np\nfrom jax import test_util as jtu\nfrom jax.abstract_arrays import ShapedArray\nfrom jax import lax\n+from jax import random\nfrom jax.api import j...
Python
Apache License 2.0
google/jax
add batching test for PRNGKeys and random sampling
260,316
31.12.2018 16:08:23
18,000
d85c0dbecbadf8d1aceb1f98e5497f5c130538fd
Added example of automatic differentiation variational inference
[ { "change_type": "ADD", "old_path": null, "new_path": "examples/advi.py", "diff": "+\"\"\"Automatic differentiation variational inference in Numpy and JAX.\n+\n+This demo fits a Gaussian approximation to an intractable, unnormalized\n+density, by differentiating through a Monte Carlo estimate of the...
Python
Apache License 2.0
google/jax
Added example of automatic differentiation variational inference
260,335
02.01.2019 12:52:39
28,800
a627cc80e8de84e3bc0db550d27f9fa4b432c8a4
make random.split return something vmap-compatible (in particular, return an array rather than a tuple, c.f.
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -154,8 +154,7 @@ def split(key, num=2):\nA tuple of length `num` of new PRNGKey instances.\n\"\"\"\ncounts = lax.tie_in(key, lax.iota(onp.uint32, num * 2))\n- bits = lax.reshape(threefry_2x32(key, counts...
Python
Apache License 2.0
google/jax
make random.split return something vmap-compatible (in particular, return an array rather than a tuple, c.f. #181)
260,335
02.01.2019 17:46:46
28,800
c4d32ca2cdcef0f1816bf1a5473184e853abdcfd
support x[[0, 2, 4], [0, 2, 4]] indexing, fix
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1510,7 +1510,7 @@ def _rewriting_take(arr, idx, axis=0):\n# Handle integer array indexing *without* ellipsis/slices/nones\n# https://docs.scipy.org/doc/numpy/reference/arrays.indexing....
Python
Apache License 2.0
google/jax
support x[[0, 2, 4], [0, 2, 4]] indexing, fix #187
260,335
05.01.2019 09:44:34
28,800
77f0fca7fa3ec21ef6a6986ae6427955ae303866
fix np.polyval complex128 bug in x64=True mode Also enable JAX_ENABLE_X64=True tests on Travis to avoid future such issues. (Internal tests catch things like this, but we don't run those automatically.)
[ { "change_type": "MODIFY", "old_path": ".travis.yml", "new_path": ".travis.yml", "diff": "@@ -7,7 +7,8 @@ python:\n- \"2.7\"\n- \"3.6\"\nenv:\n- - DEPS=\"pip nose six protobuf>=3.6.0 absl-py opt_einsum numpy scipy\"\n+ - JAX_ENABLE_X64=0 JAX_NUM_GENERATED_CASES=100\n+ - JAX_ENABLE_X64=1 JAX_NUM_GENE...
Python
Apache License 2.0
google/jax
fix np.polyval complex128 bug in x64=True mode Also enable JAX_ENABLE_X64=True tests on Travis to avoid future such issues. (Internal tests catch things like this, but we don't run those automatically.)
260,335
05.01.2019 10:06:31
28,800
ecaae6bdd001cab5e7e9ce7e395fd7536a7ad79f
add Softmax layer to stax (closes
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -146,6 +146,7 @@ def _elemwise_no_params(fun, **kwargs):\nreturn init_fun, apply_fun\nTanh = _elemwise_no_params(np.tanh)\nRelu = _elemwise_no_params(relu)\n+Exp = _elemwise_no_para...
Python
Apache License 2.0
google/jax
add Softmax layer to stax (closes #182)
260,335
05.01.2019 10:17:11
28,800
555bed74c6bbadd1df017836f1f97cc9bd155073
revert lax_numpy dtype promotion logic
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -149,7 +149,8 @@ def _promote_dtypes(*args):\nif len(args) < 2:\nreturn args\nelse:\n- to_dtype = xla_bridge.canonicalize_dtype(result_type(*args))\n+ from_dtypes = (_dtype(x) for x in ...
Python
Apache License 2.0
google/jax
revert lax_numpy dtype promotion logic
260,335
05.01.2019 10:22:55
28,800
3174b37b487b129b6cc6762a1d271de6f1c5b031
implement softmax directly
[ { "change_type": "MODIFY", "old_path": "jax/experimental/stax.py", "new_path": "jax/experimental/stax.py", "diff": "@@ -47,6 +47,11 @@ def logsoftmax(x, axis=-1):\n\"\"\"Apply log softmax to an array of logits, log-normalizing along an axis.\"\"\"\nreturn x - logsumexp(x, axis, keepdims=True)\n+def ...
Python
Apache License 2.0
google/jax
implement softmax directly
260,316
06.01.2019 09:16:29
14,400
cb7d3550ff4092652258b000a8a624f4884304a9
Updated advi example to map over rngs.
[ { "change_type": "MODIFY", "old_path": "examples/advi.py", "new_path": "examples/advi.py", "diff": "@@ -19,86 +19,84 @@ import jax.scipy.stats.norm as norm\n# ========= Functions to define the evidence lower bound. =========\n-def diag_gaussian_sample(mean, log_std, rng):\n+def diag_gaussian_sample(...
Python
Apache License 2.0
google/jax
Updated advi example to map over rngs.
260,335
03.01.2019 16:14:30
28,800
ad4322c5daea26fb685ec990746a0dc9252f21ee
playing around with flattening functions
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -31,7 +31,9 @@ import numpy as onp\nfrom . import core\nfrom . import linear_util as lu\nfrom .core import pack, eval_jaxpr\n-from .api_util import flatten_fun, unflatten_fun, tree_to_jaxtuples\n+from .api_uti...
Python
Apache License 2.0
google/jax
playing around with flattening functions
260,335
06.01.2019 11:59:33
28,800
0f7c7c4eabc7be7e35f6ed9f86e8c59a71035109
generalize jacfwd and jacrev to handle pytrees
[ { "change_type": "MODIFY", "old_path": "jax/abstract_arrays.py", "new_path": "jax/abstract_arrays.py", "diff": "@@ -157,9 +157,14 @@ def make_shaped_array(x):\ndtype = xla_bridge.canonicalize_dtype(onp.result_type(x))\nreturn ShapedArray(onp.shape(x), dtype)\n+def zeros_like_array(x):\n+ dtype = xla...
Python
Apache License 2.0
google/jax
generalize jacfwd and jacrev to handle pytrees
260,335
06.01.2019 12:51:24
28,800
81788865458c34f07c536b1733c7ede602c00c1e
use distutils.util.str2bool on JAX_ENABLE_X64
[ { "change_type": "MODIFY", "old_path": "jax/lib/xla_bridge.py", "new_path": "jax/lib/xla_bridge.py", "diff": "@@ -25,6 +25,7 @@ from __future__ import print_function\nimport os\nimport warnings\n+from distutils.util import strtobool\nfrom ..config import flags\nimport numpy as onp # 'onp' rather tha...
Python
Apache License 2.0
google/jax
use distutils.util.str2bool on JAX_ENABLE_X64
260,335
06.01.2019 14:05:01
28,800
e177205e98ecdff69b96f5542cfbd5f14a65634a
add split and broadcast methods to ShapedArrays
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1723,5 +1723,7 @@ setattr(DeviceArray, \"astype\", lax.convert_element_type)\n# Extra methods that are handy\n+setattr(ShapedArray, \"broadcast\", core.aval_method(lax.broadcast))\n+se...
Python
Apache License 2.0
google/jax
add split and broadcast methods to ShapedArrays
260,335
07.01.2019 08:34:48
28,800
e4f56d79110dc1c614871da1ff0067060d8c0d82
minor batching bugfixes exposed by general hessian
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -27,7 +27,7 @@ from six.moves import reduce\nfrom .. import core\nfrom ..core import Trace, Tracer, new_master, pack, AbstractTuple, JaxTuple\nfrom ..abstract_arrays import ...
Python
Apache License 2.0
google/jax
minor batching bugfixes exposed by general hessian
260,335
07.01.2019 08:54:14
28,800
ca27f0a2b29bdf5499c4b0ae2a5e812989cbd3e5
add jacobian / hessian pytree tests (fixes
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -427,6 +427,11 @@ class JaxTestCase(parameterized.TestCase):\nself.assertEqual(len(x), len(y))\nfor x_elt, y_elt in zip(x, y):\nself.assertAllClose(x_elt, y_elt, check_dtypes, atol=atol, rtol=rtol)...
Python
Apache License 2.0
google/jax
add jacobian / hessian pytree tests (fixes #173)
260,335
07.01.2019 08:59:56
28,800
75958898f975088d7f80e96b6cd2ec7c3d9a1347
add copyright header to advi.py
[ { "change_type": "MODIFY", "old_path": "examples/advi.py", "new_path": "examples/advi.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...
Python
Apache License 2.0
google/jax
add copyright header to advi.py
260,335
07.01.2019 12:28:52
28,800
df87d5ce43ea07f96b6a573b3c3e6aa3902455cd
make lax.full require concrete shapes improves error message for
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -418,6 +418,13 @@ def tie_in(x, y):\nreturn tie_in_p.bind(x, y)\ndef full(shape, fill_value, dtype):\n+ try:\n+ shape = tuple(map(int, shape))\n+ except TypeError:\n+ msg = (\"`full` requires shapes to be conc...
Python
Apache License 2.0
google/jax
make lax.full require concrete shapes improves error message for #204
260,335
07.01.2019 12:38:46
28,800
47eb8fa17ca2ebc4b91a0e326da2c99e23d82661
add another concreteness check to lax.iota
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -440,7 +440,7 @@ def full(shape, fill_value, dtype):\nreturn broadcast(convert_element_type(fill_value, dtype), shape)\ndef iota(dtype, size):\n- return broadcasted_iota(dtype, (size,), 0)\n+ return broadcaste...
Python
Apache License 2.0
google/jax
add another concreteness check to lax.iota
260,335
07.01.2019 16:47:13
28,800
1e84a3a0fb774955689c72e2b0c1408223d7a680
make tuple unpacking cause a full_lower
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -449,7 +449,7 @@ class JaxTuple(tuple):\nclass AbstractTuple(AbstractValue, tuple):\n@staticmethod\ndef _iter(tracer):\n- return tracer.unpack()\n+ return map(full_lower, tracer.unpack())\ndef _len(self, ign...
Python
Apache License 2.0
google/jax
make tuple unpacking cause a full_lower
260,335
07.01.2019 16:54:51
28,800
280b3fe2fc2b03b1e9d0fb22c4631fee00666f3c
python3 likes list(map(...))
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -2540,7 +2540,7 @@ def _dynamic_slice_indices(operand, start_indices):\nif isinstance(start_indices, (tuple, list)):\nstart_indices = concatenate([reshape(i, [1]) for i in start_indices], 0)\n# map int over op...
Python
Apache License 2.0
google/jax
python3 likes list(map(...))
260,335
12.01.2019 07:19:04
28,800
aaf0e3cfaf88bb71540cf623850c537b505af958
bump jaxlib version for new wheels
[ { "change_type": "MODIFY", "old_path": "build/setup.py", "new_path": "build/setup.py", "diff": "@@ -20,7 +20,7 @@ binary_libs = [os.path.basename(f) for f in glob('jaxlib/*.so*')]\nsetup(\nname='jaxlib',\n- version='0.1.3',\n+ version='0.1.4',\ndescription='XLA library for JAX',\nauthor='JAX team',\...
Python
Apache License 2.0
google/jax
bump jaxlib version for new wheels
260,335
12.01.2019 11:09:15
28,800
6be53c7a0bd0e89c72e380386bd3b6f0a5579361
fix isinstance check in indexing (fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1592,8 +1592,8 @@ def _rewriting_take(arr, idx, axis=0):\naxis += isinstance(elt, slice) # advance axis index if not eliminated\nunexpanded_shape_itr = iter(result.shape)\nresult_shape...
Python
Apache License 2.0
google/jax
fix isinstance check in indexing (fixes #227)
260,335
12.01.2019 12:54:22
28,800
70d1a0044326e67ef5a236379f33e16ccf761770
set behavior when random.randint has invalid range (closes
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -245,6 +245,10 @@ def randint(key, shape, minval, maxval, dtype=onp.int32):\nif nbits not in (32, 64):\nraise TypeError(\"randint only accepts 32- or 64-bit dtypes.\")\n+ # if we don't have minval < maxv...
Python
Apache License 2.0
google/jax
set behavior when random.randint has invalid range (closes #222)
260,335
13.01.2019 11:37:34
28,800
78dbc031b87b262ca28701d5f604a528a5aa1866
double linalg test tolerances to avoid flakiness
[ { "change_type": "MODIFY", "old_path": "tests/linalg_test.py", "new_path": "tests/linalg_test.py", "diff": "@@ -149,6 +149,7 @@ class NumpyLinalgTest(jtu.JaxTestCase):\ndef testSVD(self, m, n, dtype, full_matrices, compute_uv, rng):\nif not hasattr(lapack, \"jax_gesdd\"):\nself.skipTest(\"No singula...
Python
Apache License 2.0
google/jax
double linalg test tolerances to avoid flakiness
260,335
13.01.2019 09:01:01
28,800
5a4713f108ae188f72d209bdf611970a2f1fe7d9
add tests for np.sort (c.f.
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -391,7 +391,7 @@ def sort(operand, dimension=-1):\nreturn sort_p.bind(operand, dimension=dimension)\ndef sort_key_val(keys, values, dimension=-1):\n- # TODO new sort_key_val is variadic\n+ # TODO(mattjj): new ...
Python
Apache License 2.0
google/jax
add tests for np.sort (c.f. #221)
260,335
13.01.2019 11:03:47
28,800
54886bd3109b3b4462e1e72e67cd7ffae69c5399
add sort_key_val batching rule (fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -240,7 +240,7 @@ def vmap(fun, in_axes=0, out_axes=0):\n@wraps(fun, docstr=docstr)\ndef batched_fun(*args, **kwargs):\nif not isinstance(fun, lu.WrappedFun):\n- f = lu.wrap_init(fun)\n+ f = lu.wrap_init(fun, k...
Python
Apache License 2.0
google/jax
add sort_key_val batching rule (fixes #221)
260,335
13.01.2019 11:15:39
28,800
30683f8f4343f81a9b4ef4251710a4668056a50f
add numpy.argsort (c.f.
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -19,6 +19,7 @@ from __future__ import print_function\nimport collections\nimport itertools\nimport string\n+import warnings\nimport numpy as onp\nimport opt_einsum\n@@ -1528,14 +1529,30...
Python
Apache License 2.0
google/jax
add numpy.argsort (c.f. #221)
260,335
12.01.2019 12:48:58
28,800
f7c6284313f4c95c7c1c3d09e8c83eb4fb8360dd
add sort_along_axis, no tests (c.f.
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1553,6 +1553,21 @@ def argsort(a, axis=-1, kind='quicksort', order=None):\nreturn perm\n+@_wraps(onp.take_along_axis)\n+def take_along_axis(arr, indices, axis):\n+ if axis is None and ...
Python
Apache License 2.0
google/jax
add sort_along_axis, no tests (c.f. #220)
260,335
13.01.2019 12:26:37
28,800
4a1d189d0553b32960ea2405f4fc9e9bf58aec82
add tests for numpy.take_along_axis (fixes
[ { "change_type": "MODIFY", "old_path": "tests/lax_numpy_test.py", "new_path": "tests/lax_numpy_test.py", "diff": "@@ -1006,6 +1006,25 @@ class LaxBackedNumpyTests(jtu.JaxTestCase):\nexpected = onp.argsort(x)\nself.assertAllClose(expected, ans, check_dtypes=False)\n+ @parameterized.named_parameters(j...
Python
Apache License 2.0
google/jax
add tests for numpy.take_along_axis (fixes #220)
260,335
14.01.2019 12:56:41
28,800
ade92703ec100d54c04de83daec8660377db4ac2
guard np.take_along_axis test in case of old numpy
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -201,13 +201,13 @@ def _constant_like(x, const):\ndef _wraps(fun):\n\"\"\"Like functools.wraps but works with numpy.ufuncs.\"\"\"\n+ def wrap(op):\n+ try:\ndocstr = \"\"\"\nLAX-backed i...
Python
Apache License 2.0
google/jax
guard np.take_along_axis test in case of old numpy
260,299
16.01.2019 16:51:54
0
38b2da82c5a1874ed65bccbc69150679f5ce5866
Use slots for tracer classes
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -233,6 +233,8 @@ class JVPTrace(Trace):\nclass JVPTracer(Tracer):\n+ __slots__ = ['primal', 'tangent']\n+\ndef __init__(self, trace, primal, tangent):\nself.trace = trace\nself.primal =...
Python
Apache License 2.0
google/jax
Use slots for tracer classes
260,331
16.01.2019 23:05:16
18,000
d707426caae0038609fcc71531fd5d7aa61f4f47
Bump jaxlib version to 0.1.5 in preparation for building new wheels.
[ { "change_type": "MODIFY", "old_path": "build/setup.py", "new_path": "build/setup.py", "diff": "@@ -20,7 +20,7 @@ binary_libs = [os.path.basename(f) for f in glob('jaxlib/*.so*')]\nsetup(\nname='jaxlib',\n- version='0.1.4',\n+ version='0.1.5',\ndescription='XLA library for JAX',\nauthor='JAX team',\...
Python
Apache License 2.0
google/jax
Bump jaxlib version to 0.1.5 in preparation for building new wheels.
260,335
18.01.2019 07:03:12
28,800
42bd253cbb61520383cc4e92300fd38f02d234e0
add prng design doc in markdown format
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -237,11 +237,17 @@ def vmap(fun, in_axes=0, out_axes=0):\ndocstr = (\"Vectorized version of {fun}. Takes similar arguments as {fun} \"\n\"but with additional array axes over which {fun} is mapped.\")\n+ if (no...
Python
Apache License 2.0
google/jax
add prng design doc in markdown format
260,331
18.01.2019 20:48:40
18,000
82ce80f1e12e9fe326771121684810a5ed62a57b
Bump Jaxlib version.
[ { "change_type": "MODIFY", "old_path": "build/setup.py", "new_path": "build/setup.py", "diff": "@@ -20,7 +20,7 @@ binary_libs = [os.path.basename(f) for f in glob('jaxlib/*.so*')]\nsetup(\nname='jaxlib',\n- version='0.1.5',\n+ version='0.1.6',\ndescription='XLA library for JAX',\nauthor='JAX team',\...
Python
Apache License 2.0
google/jax
Bump Jaxlib version.
260,335
22.01.2019 15:34:09
28,800
b95669eb79c1e2148397cd46a4d4b6f2c35c72b8
enable value-and-grad api test
[ { "change_type": "MODIFY", "old_path": "tests/api_test.py", "new_path": "tests/api_test.py", "diff": "@@ -45,7 +45,7 @@ class APITest(jtu.JaxTestCase):\nassert grad(f, argnums=1)(1.0, 1.0, 1.0, flag=True) == 2.0\nassert grad(f, argnums=(2, 0))(1.0, 1.0, 1.0, flag=True) == (3.0, 1.0)\n- def value_and...
Python
Apache License 2.0
google/jax
enable value-and-grad api test
260,335
24.01.2019 13:35:29
28,800
781577226dbddd28b33c8c80e16424ca8a863e7d
clean up parallel_test.py file
[ { "change_type": "MODIFY", "old_path": "tests/parallel_test.py", "new_path": "tests/parallel_test.py", "diff": "@@ -31,115 +31,88 @@ from jax.config import config\nconfig.parse_flags_with_absl()\n-# class PmapTest(jtu.JaxTestCase):\n+class PmapTest(jtu.JaxTestCase):\n-# def testConstantFunction(self...
Python
Apache License 2.0
google/jax
clean up parallel_test.py file
260,335
24.01.2019 14:16:17
28,800
b34c87dc221163d224ced455b61abc8c7fd3a3c8
remove 'chunk' for now
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -220,133 +220,6 @@ scatter_p = PmapPrimitive('scatter')\npmap_primitive_rules[scatter_p] = scatter_pmap_rule\n-### chunk\n-# TODO expreses chunk in terms of a index-split co...
Python
Apache License 2.0
google/jax
remove 'chunk' for now
260,335
24.01.2019 16:08:03
28,800
7e05f94c48c69863f6988e038afb87576764b12d
fix pmap nesting bug, sketch out index splitting
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -116,14 +116,21 @@ class PmapTrace(Trace):\nelse:\nname = next(name for name in names_in if name is not None) # all same\nif primitive in pmap_primitive_rules:\n+ # if it's ...
Python
Apache License 2.0
google/jax
fix pmap nesting bug, sketch out index splitting
260,335
24.01.2019 16:27:34
28,800
ae86b9a640acbed02fc055cc440e908d29ac3386
fix split tracer bugs
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -270,6 +270,18 @@ def pmap(fun, axis_name, in_axes=0, out_axes=0):\nreturn pmap_fun\n+def axisvar_split(fun, name, new_names):\n+ \"\"\"Split axis variable names into new names.\"\"\"\n+ def split_fun(*args, *...
Python
Apache License 2.0
google/jax
fix split tracer bugs
260,335
24.01.2019 16:58:41
28,800
c1be2aa2fa5acee18aa8b0c8e317221161303c79
add basic split test
[ { "change_type": "MODIFY", "old_path": "tests/parallel_test.py", "new_path": "tests/parallel_test.py", "diff": "@@ -23,7 +23,7 @@ from absl.testing import parameterized\nimport jax.numpy as np\nfrom jax import test_util as jtu\nfrom jax import lax\n-from jax.api import pmap, papply, jit, make_jaxpr\...
Python
Apache License 2.0
google/jax
add basic split test
260,335
24.01.2019 17:55:03
28,800
e546f13b03d60ed0c1842dfc6b0baeab2697d7c2
add chunking transform
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -271,7 +271,7 @@ def pmap(fun, axis_name, in_axes=0, out_axes=0):\ndef axisvar_split(fun, name, new_names):\n- \"\"\"Split axis variable names into new names.\"\"\"\n+ \"\"\"Split axis variable names into new ...
Python
Apache License 2.0
google/jax
add chunking transform
260,335
25.01.2019 08:20:33
28,800
d321e2a3700996a55f5c2a0a9732f0d867ff432b
add pjit to api.py
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -43,6 +43,7 @@ from .lib.xla_bridge import canonicalize_dtype\nfrom .abstract_arrays import ShapedArray\nfrom .interpreters import partial_eval as pe\nfrom .interpreters import xla\n+from .interpreters import ...
Python
Apache License 2.0
google/jax
add pjit to api.py
260,335
26.01.2019 05:10:22
28,800
8a6c09491b9264f6eaa947bc59fca2a9d8fb57b6
promising... but why do we need post_process_call?
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -258,7 +258,7 @@ def vmap(fun, in_axes=0, out_axes=0):\nreturn batched_fun\n-def pjit(fun, axis_map, out_axis_map, mesh_spec, mesh_map, static_argnums=()):\n+def pjit(fun, axis_name, in_axes=0, out_axes=0, mes...
Python
Apache License 2.0
google/jax
promising... but why do we need post_process_call?
260,335
26.01.2019 08:10:01
28,800
6494504aed4d8748e9c56dd32e1e84a838ae8f6b
woo post_process_call, it scrolls like butter
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -146,7 +146,13 @@ class PmapTrace(Trace):\nreturn PmapTracer(self, name, val_out, axis_out())\ndef post_process_call(self, _, out_tracer):\n- raise NotImplementedError # TOD...
Python
Apache License 2.0
google/jax
woo post_process_call, it scrolls like butter
260,335
26.01.2019 08:21:20
28,800
8bc579aebc3c150c8fe9b470f7ecca154743e58a
chunk transform outside of xla_parallel_callable
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -233,36 +233,25 @@ def xla_pcall_impl(fun, *args, **params):\nflat_args = concatenate(flat_args)\nfun, out_tree = flatten_fun(fun, in_trees)\n- @HideFromMemoizer\n- def out_axes_thu...
Python
Apache License 2.0
google/jax
chunk transform outside of xla_parallel_callable
260,335
26.01.2019 13:13:29
28,800
da724d315927d0f478e014d62336ad5073c12d88
single-axis-var version runs! and some cleanup
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -33,9 +33,9 @@ from .. import linear_util as lu\nfrom ..abstract_arrays import ShapedArray\nfrom ..util import partial, unzip2, concatenate, safe_map, prod\nfrom ..lib import xla_br...
Python
Apache License 2.0
google/jax
single-axis-var version runs! and some cleanup
260,335
26.01.2019 13:27:04
28,800
80b9bdc449c4f18bfb4f3e78793430ed28ceaabc
cleanup, fix chunksize bug
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -50,20 +50,19 @@ mesh_spec = None\n### util\n-def chunk_transform(fun, name, in_axes, out_axes_dst):\n+def chunk_transform(fun, chunksize, name, in_axes, out_axes_dst):\n\"\"\"Rewri...
Python
Apache License 2.0
google/jax
cleanup, fix chunksize bug
260,335
26.01.2019 13:57:19
28,800
a5661ce1b276ddd1de35364c291214365c524297
hmmm leak bug somewhere
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -58,7 +58,7 @@ def pmap_transform(name, axes, *vals):\nans = yield in_tracers\nout_tracer = trace.full_raise(ans)\nout_val, out_axis = out_tracer.val, out_tracer.axis\n- del...
Python
Apache License 2.0
google/jax
hmmm leak bug somewhere
260,335
26.01.2019 14:16:47
28,800
afc2b9feb4dad75d5c3d5b73a85bd3aab0ce3e8a
add leak_bug.py for repro
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -270,7 +270,6 @@ class SplitTrace(Trace):\nreturn SplitTracer(self, name, new_names, val_out)\ndef process_call(self, call_primitive, f, tracers, params):\n- import ipdb; ip...
Python
Apache License 2.0
google/jax
add leak_bug.py for repro
260,335
28.01.2019 08:37:49
28,800
780106f892406590cf6c974e9c19caf59558e01c
moving pxla flattening/chunking to api.py, wip
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -32,8 +32,8 @@ import numpy as onp\nfrom . import core\nfrom . import linear_util as lu\nfrom .core import pack, eval_jaxpr\n-from .api_util import (pytree_fun_to_jaxtupletree_fun, apply_jaxtree_fun,\n- pytree...
Python
Apache License 2.0
google/jax
moving pxla flattening/chunking to api.py, wip
260,335
28.01.2019 09:35:57
28,800
2487eb2d04725d1d5bcc5d6c39a27e1b270520c1
woo tuple output works
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -86,7 +86,7 @@ def canonicalize_out_axis_spec(out_tree, spec_tree_prefix):\nreturn spec_tree_prefix\nelse:\nspec_tree = build_axis_spec_tree(spec_tree_prefix, out_tree)\n- return tu...
Python
Apache License 2.0
google/jax
woo tuple output works
260,335
28.01.2019 10:09:42
28,800
32cda396892ae4b7f13507eb2e7d33ea76803a29
remove chunk transform from api.py for now
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -306,24 +306,6 @@ def axisvar_split(fun, name, new_names):\nreturn split_fun\n-def chunk(fun, name, chunksize, in_axes=0, out_axes=0):\n- \"\"\"Stage SPMD primitives to first operate on chunks, then use collec...
Python
Apache License 2.0
google/jax
remove chunk transform from api.py for now
260,335
28.01.2019 10:23:00
28,800
1a494d0752c527def252f8c2e0132fed7692a35c
add post_process_call for vmap (untested)
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -131,7 +131,13 @@ class BatchTrace(Trace):\nreturn BatchTracer(self, val_out, dim_out())\ndef post_process_call(self, _, out_tracer):\n- raise NotImplementedError # TODO(mat...
Python
Apache License 2.0
google/jax
add post_process_call for vmap (untested)
260,335
28.01.2019 11:13:34
28,800
1360a7031d4389f2ecdef24ce3190a88e5f8f794
add trivial pjit tests
[ { "change_type": "ADD", "old_path": null, "new_path": "tests/pjit_test.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 at...
Python
Apache License 2.0
google/jax
add trivial pjit tests
260,335
28.01.2019 12:55:24
28,800
5f5baaa4cdea64545d3e546cbf595a3c835e6f4c
tweak tests for internal purposes
[ { "change_type": "MODIFY", "old_path": "jax/test_util.py", "new_path": "jax/test_util.py", "diff": "@@ -63,7 +63,7 @@ def numpy_eq(x, y):\ntesting_tpu = FLAGS.jax_test_dut and FLAGS.jax_test_dut.startswith(\"tpu\")\ntesting_x32 = not FLAGS.jax_enable_x64\nif testing_tpu or testing_x32:\n- return onp...
Python
Apache License 2.0
google/jax
tweak tests for internal purposes
260,335
28.01.2019 14:11:11
28,800
d968e1e5729bee9d6d21a087eb5989e1110a65f6
fix replica_groups logic
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/parallel.py", "new_path": "jax/interpreters/parallel.py", "diff": "@@ -184,7 +184,9 @@ def psum_pmap_rule(val, axis):\nreturn val.sum(axis), None\ndef psum_parallel_translation_rule(c, val, device_groups):\n- # return c.CrossReplicaSum(val, de...
Python
Apache License 2.0
google/jax
fix replica_groups logic
260,554
28.01.2019 14:33:57
28,800
a15bad401f33ff01e9e80df609f70a3bc11b50a0
Added batching rules for convolutions + pooling. Added batching rules: conv_general_dilated_batch_rule select_and_scatter_add_batch_rule reduce_window_max_batch_rule reduce_window_sum_batch_rule
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -1128,13 +1128,61 @@ def conv_general_dilated_translation_rule(\nreturn c.ConvGeneralDilated(lhs, rhs, window_strides, padding, lhs_dilation,\nrhs_dilation, dimension_numbers)\n+def conv_general_dilated_batch_...
Python
Apache License 2.0
google/jax
Added batching rules for convolutions + pooling. Added batching rules: conv_general_dilated_batch_rule select_and_scatter_add_batch_rule reduce_window_max_batch_rule reduce_window_sum_batch_rule
260,554
28.01.2019 14:37:49
28,800
dfced4fcc56670832341fbf911ec1646ad033a6d
Added tests for conv + pooling batching rules.
[ { "change_type": "MODIFY", "old_path": "tests/batching_test.py", "new_path": "tests/batching_test.py", "diff": "@@ -367,6 +367,96 @@ class BatchingTest(jtu.JaxTestCase):\nself.assertAllClose(sv, onp.broadcast_to(v[0, ::-1], (3, 4)),\ncheck_dtypes=True)\n+ def testConvGeneralDilated(self):\n+ W = onp...
Python
Apache License 2.0
google/jax
Added tests for conv + pooling batching rules.
260,554
28.01.2019 15:26:47
28,800
6181560ef026597a0eefd5a1af6e27e40ea3a673
Changed tests to always use float32, for conv compatibility.
[ { "change_type": "MODIFY", "old_path": "tests/batching_test.py", "new_path": "tests/batching_test.py", "diff": "@@ -368,8 +368,8 @@ class BatchingTest(jtu.JaxTestCase):\ncheck_dtypes=True)\ndef testConvGeneralDilated(self):\n- W = onp.random.randn(3, 3, 1, 5)\n- X = onp.random.randn(10, 5, 5, 1)\n+ ...
Python
Apache License 2.0
google/jax
Changed tests to always use float32, for conv compatibility.
260,554
28.01.2019 19:08:05
28,800
3b8d43cefae3e37668c82ea4bd4d9ec61ccabff7
Misc. small fixes.
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -1136,9 +1136,9 @@ def conv_general_dilated_batch_rule(\nlhs_dim, rhs_dim, out_dim = dimension_numbers\nif lhs_bdim is not None and rhs_bdim is not None:\n+ #TODO(#212): use a map construct instead of unrollin...
Python
Apache License 2.0
google/jax
Misc. small fixes.
260,554
28.01.2019 19:30:45
28,800
e538eb1a53700068523b2c5377e868c62e1722d9
Removed comment from test.
[ { "change_type": "MODIFY", "old_path": "tests/batching_test.py", "new_path": "tests/batching_test.py", "diff": "@@ -379,9 +379,6 @@ class BatchingTest(jtu.JaxTestCase):\nreturn y\ngrad_loss = grad(lambda params, x: np.mean(f(params, x) ** 2))\n- # NOTE(schsam): We have to do this reshape thing becau...
Python
Apache License 2.0
google/jax
Removed comment from test.
260,335
30.01.2019 10:39:35
28,800
c293b3775b144f944a665af3329613fdf118160d
add basic lax.stop_gradient primitive
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -485,6 +485,10 @@ def broadcasted_eye(dtype, shape, axes):\nreturn EyeConstant(shape, axes, dtype)\n+def stop_gradient(x):\n+ return stop_gradient_p.bind(x)\n+\n+\n### convenience wrappers around traceables\n@...
Python
Apache License 2.0
google/jax
add basic lax.stop_gradient primitive
260,335
30.01.2019 10:43:57
28,800
26ac350cfd32b5e0cfd2f96c4b51f9a70aad4fdf
add higher-order test for stop_gradient
[ { "change_type": "MODIFY", "old_path": "tests/lax_test.py", "new_path": "tests/lax_test.py", "diff": "@@ -2196,7 +2196,10 @@ class LaxAutodiffTest(jtu.JaxTestCase):\nx = 3.14\nans = api.grad(f)(x)\nexpected = api.grad(f2)(x, x)\n+ self.assertAllClose(ans, expected, check_dtypes=True)\n+ ans = api.gr...
Python
Apache License 2.0
google/jax
add higher-order test for stop_gradient
260,268
31.01.2019 12:57:43
28,800
89e3b3a1051fda175ea7bcafebe00a544c55a50c
Add and numpy functions.
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -493,6 +493,16 @@ def flip(m, axis):\nreturn lax.rev(m, [axis])\n+@_wraps(onp.fliplr)\n+def fliplr(m):\n+ return flip(m, 1)\n+\n+\n+@_wraps(onp.flipup)\n+def flipup(m):\n+ return flip(m...
Python
Apache License 2.0
google/jax
Add and numpy functions.
260,268
31.01.2019 20:30:38
28,800
4c37d2491d4aef52e0887fa4ea65d7484b28d1bf
Add support for negative indices and tests of rank 3 tensors.
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -490,6 +490,12 @@ def rot90(m, k=1, axes=(0, 1)):\n@_wraps(onp.flip)\ndef flip(m, axis):\n+ # Negative axes wrap around\n+ if axis < 0:\n+ rank = len(m.shape)\n+ assert axis >= -rank, \...
Python
Apache License 2.0
google/jax
Add support for negative indices and tests of rank 3 tensors.
260,268
31.01.2019 21:47:05
28,800
a9b221a1d362c8ee2d6ee1d7ce9c5a4d8d375a3a
Add batching rule for rev.
[ { "change_type": "MODIFY", "old_path": "jax/lax.py", "new_path": "jax/lax.py", "diff": "@@ -1657,8 +1657,15 @@ def rev_shape_rule(operand, dimensions):\nraise TypeError(msg.format(dimensions, operand.ndim))\nreturn operand.shape\n+def rev_batch_rule(batched_args, batch_dims, dimensions):\n+ operand,...
Python
Apache License 2.0
google/jax
Add batching rule for rev.
260,335
29.01.2019 18:22:15
28,800
da620a8edf605f89f0ec0faf9da29ff73bd4f9a5
working on nested pjit, misc bug fixes
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -266,7 +266,7 @@ def pjit(fun, axis_name, in_axes=0, out_axes=0, mesh_axis=0):\nargs_flat, in_tree = tree_flatten(args)\nf, out_tree = pytree_fun_to_flatjaxtuple_fun(f, in_tree)\nin_axes_ = pxla.canonicalize_i...
Python
Apache License 2.0
google/jax
working on nested pjit, misc bug fixes
260,335
29.01.2019 19:38:04
28,800
41c98ddcc0e255745eb613908f8143797d6f3ac0
add basic pjit_nesting.py work file
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -224,7 +224,7 @@ def replicated_jaxpr_computation(jaxpr, axis_env, const_vals, freevar_shapes,\nin_nodes = map(read, eqn.invars)\nif eqn.primitive in parallel_translation_rules:\nru...
Python
Apache License 2.0
google/jax
add basic pjit_nesting.py work file
260,335
29.01.2019 20:23:41
28,800
6efb7b1c8f3142f7f28d8de1430c2f1b1c009078
basic nested pjit works
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -37,11 +37,12 @@ from ..tree_util import leaf\nfrom ..lib import xla_bridge as xb\nfrom .xla import (flatten_fun, tree_flatten, build_tree, xla_shape,\nxla_destructure, translation_...
Python
Apache License 2.0
google/jax
basic nested pjit works
260,335
29.01.2019 21:42:33
28,800
9fa8077901909988dad2620f4bb41e541a37dd3a
tweak batching.moveaxis behavior
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -309,18 +309,19 @@ def moveaxis(sz, dst, src, x):\nelse:\nreturn pack(map(partial(moveaxis, sz, dst, src), x))\nelif isinstance(aval, ShapedArray):\n- dst = (dst % aval.ndim...
Python
Apache License 2.0
google/jax
tweak batching.moveaxis behavior
260,335
29.01.2019 22:04:41
28,800
2c447b98289b0b9104bbbce588ebf22fde7f47df
add temp axis name class
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/pxla.py", "new_path": "jax/interpreters/pxla.py", "diff": "@@ -43,21 +43,25 @@ from .parallel import parallel_translation_rules\nfrom .batching import moveaxis\nfrom . import parallel\nfrom . import xla\n+from . import partial_eval as pe\nmap ...
Python
Apache License 2.0
google/jax
add temp axis name class
260,335
30.01.2019 07:51:20
28,800
893ec5151a347acc58639602736844682eb2498a
jaxtuple flattening problems...
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -267,7 +267,7 @@ def pjit(fun, axis_name, in_axes=0, out_axes=0, mesh_axis=0):\nf, out_tree = pytree_fun_to_flatjaxtuple_fun(f, in_tree)\nin_axes_ = pxla.canonicalize_in_axis_spec(in_tree, in_axes)\nout_axes_ ...
Python
Apache License 2.0
google/jax
jaxtuple flattening problems...