Revision 824ac86620572285b86dd09529f8869ef36883ad authored by Peter Hawkins on 03 April 2020, 19:39:56 UTC, committed by GitHub on 03 April 2020, 19:39:56 UTC
* Reimplement np.cumsum and np.cumprod in terms of a parallel prefix scan.

Unlike the existing implementation based on lax.reduce_window, this implementation is O(n log n) instead of O(n^2) and is arbitrarily differentiable.

Fixes #1212, #2418, #2542.
May help with issue #2380.

* Relax gradient test tolerance.
1 parent 192e908
History
File Mode Size
benchmarks
api_test.py -rw-r--r-- 91.7 KB
array_interoperability_test.py -rw-r--r-- 4.5 KB
batching_test.py -rw-r--r-- 39.2 KB
core_test.py -rw-r--r-- 7.9 KB
debug_nans_test.py -rw-r--r-- 1.5 KB
dtypes_test.py -rw-r--r-- 7.0 KB
fft_test.py -rw-r--r-- 14.4 KB
generated_fun_test.py -rw-r--r-- 7.7 KB
infeed_test.py -rw-r--r-- 2.8 KB
jax_to_hlo_test.py -rw-r--r-- 2.3 KB
jet_test.py -rw-r--r-- 7.4 KB
lax_control_flow_test.py -rw-r--r-- 59.3 KB
lax_numpy_einsum_test.py -rw-r--r-- 8.4 KB
lax_numpy_indexing_test.py -rw-r--r-- 39.1 KB
lax_numpy_test.py -rw-r--r-- 129.4 KB
lax_numpy_vectorize_test.py -rw-r--r-- 7.5 KB
lax_scipy_test.py -rw-r--r-- 7.3 KB
lax_test.py -rw-r--r-- 145.4 KB
linalg_test.py -rw-r--r-- 48.2 KB
loops_test.py -rw-r--r-- 12.7 KB
masking_test.py -rw-r--r-- 15.8 KB
metadata_test.py -rw-r--r-- 3.8 KB
multi_device_test.py -rw-r--r-- 7.1 KB
multibackend_test.py -rw-r--r-- 5.3 KB
nn_test.py -rw-r--r-- 6.2 KB
optimizers_test.py -rw-r--r-- 9.7 KB
optix_test.py -rw-r--r-- 5.1 KB
parallel_test.py -rw-r--r-- 9.5 KB
pmap_test.py -rw-r--r-- 38.0 KB
profiler_test.py -rw-r--r-- 1.7 KB
random_test.py -rw-r--r-- 20.4 KB
scipy_ndimage_test.py -rw-r--r-- 4.8 KB
scipy_stats_test.py -rw-r--r-- 16.0 KB
stax_test.py -rw-r--r-- 10.7 KB
tree_util_tests.py -rw-r--r-- 5.1 KB
util_test.py -rw-r--r-- 2.5 KB
vectorize_test.py -rw-r--r-- 5.1 KB
xla_bridge_test.py -rw-r--r-- 1.6 KB

back to top