66 Commits

Author SHA1 Message Date
Nicholas Vadivelu
c4a08aff45 document setting default device and array creation 2020-09-26 17:36:40 -07:00
Stephen Tu
3b68fab2d8
Update faq.rst (#3934) 2020-08-01 11:12:59 -07:00
Matthew Johnson
062ce297dd
removed stale faq entries (#3565) 2020-06-25 19:17:24 -07:00
8bitmp3
f8570ec049
Update JAX FAQ.rst, jax.device_put (#3496) 2020-06-22 10:08:03 -07:00
Skye Wanderman-Milne
8f4ba7e679
Allow specifying both devices and axis_size to pmap. (#3475)
This allows providing custom device assignments to nested pmaps or pmap-of-sharded_jit when running on a multi-host platform.
2020-06-19 15:51:12 -07:00
Peter Hawkins
96d72fca56
Edit documentation. (#3358)
Use :func:, :class: and :meth: when referring to Python objects.
Use :ref: for hyperlinks.
Fix some bad formatting.
2020-06-08 10:37:50 -04:00
George Necula
b071b12a13
Fixed link in FAQ (#3129) 2020-05-18 16:02:49 +03:00
Jamie Townsend
670fab59cf
Test code in docs and api.py docstrings (#2994)
Also remove jaxpr doc tests from api_test.py.
2020-05-16 16:19:24 +03:00
George Necula
d315564ebf
Fixed a few more places where device commitment was lost. (#2913)
* trivial jit computations were forcing commitment to the default device
* a device_put with a device specification would not set the commitment
  if the data was already (uncommitted) on the specified device.
* added tests for the above
* once the above were fixed the LaztTest.test_zeros_ones_compilation
  stated to fail because the `sticky` parameter to lazy_force_computation
  was changing. Fixed this by removing stickyness from the compilation key.
* Expanded docstring for jax.device_put; expanded the
  device placement FAQ entry.
2020-05-04 11:30:28 +03:00
George Necula
ac023bf28f
Fixed a few places where device sticky-ness was lost. Added FAQ (#2882)
* Fixed a few places where device sitckyness was lost. Added FAQ for device
placement.

I have also added a new test (multi_device_test.test_computation_follows_data),
written more as part of the documentation. It is shorted than the
old test_computation_follows_data (which is still there, renamed
as test_computation_follows_data_old). I believe there is no
extra coverage in test_computation_follows_data_old w.r.t. all the
other tests we have.

* Fix mypy annotations and updates based on comments

* Undid some changes, will make another PR
2020-05-01 10:06:59 +03:00
George Necula
a2c06d6113
Added clearer error message for tracers in numpy.split (#2508)
* Added clearer error message for tracers in numpy.split

Now we print:

ConcretizationTypeError: Abstract tracer value where concrete value is expected (in
jax.numpy.split argument 1).
Use transformation parameters such as `static_argnums` for `jit` to avoid
tracing input values.
See `https://jax.readthedocs.io/en/latest/faq.html#abstract-tracer-value-where-concrete-value-is-expected-error`.
Encountered value: Traced<ShapedArray>

* Fixed tests, slight change to the error message

* Expanded the FAQ entry about abstract tracers for higher-order primitives

* Added clarification for tracers inside jit of grad

* Updated FAQ language in response to reviews
2020-04-22 09:25:06 +02:00
George Necula
ff24f9a2f7
Added FAQ entry about relationship between VJP and JVP (#2762) 2020-04-20 10:30:52 +02:00
George Necula
3ca7f6e4f1
Fixes in the FAQ for RST (#2761) 2020-04-19 11:13:07 +02:00
George Necula
f88d49b43c Added FAQ entry about creating JAX arrays 2020-03-25 11:55:24 +02:00
George Necula
86e3046e21 Added a FAQ for impure functions 2020-03-25 11:55:24 +02:00
George Necula
6f2f779a3d Started a FAQ for JAX 2020-03-25 11:55:24 +02:00