16448 Commits

Author SHA1 Message Date
Yash Katariya
6007698f4e Allow None to be passed to in_shardings and out_shardings. The default is still UNSPECIFIED to handle edge cases around the old semantics where None is treated as fully replicated.
The semantics are as follow:

* if the mesh context manager is not provided, None will be treated as UNSPECIFIED for both in_shardings and out_shardings

* If the mesh context manager is provided, None will be treated as fully replicated as per the old semantics.

This will make sure that we don't break existing code depending on None meaning replicated but also start making the transition to None meaning UNSPECIFIED for jit and pjit.

PiperOrigin-RevId: 540705660
2023-06-15 15:22:22 -07:00
jax authors
904b46a2d7 Merge pull request #16392 from cloudhan:fix-multi-line
PiperOrigin-RevId: 540691816
2023-06-15 14:38:25 -07:00
jax authors
57e5d088a7 Merge pull request #16407 from hawkinsp:p2
PiperOrigin-RevId: 540691526
2023-06-15 14:29:30 -07:00
Cloud Han
7b8bdfbe0f Avoid using os.linesep 2023-06-16 00:06:04 +08:00
jax authors
94674b9ae1 Merge pull request #16050 from patrick-kidger:linearize-aux
PiperOrigin-RevId: 540520135
2023-06-15 02:57:01 -07:00
jax authors
6d7da07c30 Merge pull request #16423 from patrick-kidger:efficient-scatter-transpose
PiperOrigin-RevId: 540520052
2023-06-15 02:48:46 -07:00
jax authors
ef91a8d55e Merge pull request #16425 from gnecula:fix_shape_refinement
PiperOrigin-RevId: 540512472
2023-06-15 02:12:42 -07:00
George Necula
6e09d4a71c [shape_poly] Change lowering for shape polymorphism to simplify shape refinement
We insert a ConvertOp as the only use of an input argument in a shape polymorphic
`main` function. This helps the downstream shape refinement because it will set the type
of input arguments to static shapes, and this can invalidate the
module if the argument appears as the result of a function, or if
it appears as the input to a custom_call with output_operand_alias
attribute.
See b/287386268.
2023-06-15 11:58:02 +03:00
Patrick Kidger
f2d64f6afb Added argument jax.linearize(..., has_aux=...) 2023-06-14 22:34:13 -07:00
Patrick Kidger
0f39d59ef0 Made scatter-transpose more efficient 2023-06-14 22:25:35 -07:00
jax authors
bfe8acb31e Merge pull request #16401 from jakevdp:faq-format
PiperOrigin-RevId: 540464037
2023-06-14 21:29:13 -07:00
jax authors
c6e36e00ea Merge pull request #16399 from jakevdp:error-docs
PiperOrigin-RevId: 540463941
2023-06-14 21:21:29 -07:00
Peter Hawkins
d2d30bc4fd Fix test failure in back_compat_test under CUDA 12.
PiperOrigin-RevId: 540355756
2023-06-14 13:00:36 -07:00
Peter Hawkins
119661ce6b Remove older plugin device integration.
Users of this mechanism should migrate to the newer PJRT plugin registration mechanism (see the comments on discover_plugins() in this file).
2023-06-14 15:26:58 -04:00
Brian Patton
b42282d30d Ensure effect indices are updated when constvars are modified. This resolves a bug where conditional Read<N> effect indices N were sometimes referring to the incorrect invars.
Fixes #16370

PiperOrigin-RevId: 540304925
2023-06-14 10:09:54 -07:00
Yash Katariya
38b9bf8cac Raise a good error message when a ShapeDtypeStruct is closed over as a const which is not a valid arg during execution.
PiperOrigin-RevId: 540296131
2023-06-14 09:40:37 -07:00
jax authors
0089749f54 Merge pull request #16410 from hawkinsp:winci2
PiperOrigin-RevId: 540287172
2023-06-14 09:04:58 -07:00
Peter Hawkins
758f93723a Tag the wheels generated by the Windows CI as dev versions. 2023-06-14 11:50:33 -04:00
George Necula
b147e7521e [shape_poly] Add shape polymorphism support for LU on TPU
PiperOrigin-RevId: 540276889
2023-06-14 08:22:44 -07:00
jax authors
fae1d2fe57 Merge pull request #16408 from hawkinsp:winci2
PiperOrigin-RevId: 540270979
2023-06-14 07:58:17 -07:00
Peter Hawkins
0c441574c4 Add NumPy as a test requirement.
The Windows CI currently installs all of the test requirements before building jaxlib, but NumPy is needed to build jaxlib.
Previously this came transitively via matplotlib.
2023-06-14 10:14:56 -04:00
jax authors
07b5612656 Merge pull request #16405 from hawkinsp:winlobpcg
PiperOrigin-RevId: 540260228
2023-06-14 07:09:09 -07:00
jax authors
fc323c9000 Merge pull request #16400 from jakevdp:nightly-wheel-loc
PiperOrigin-RevId: 540252600
2023-06-14 06:40:51 -07:00
jax authors
10e2b86f75 Merge pull request #16335 from JoeyTeng:add-comments-for-lax-switch-under-vmap
PiperOrigin-RevId: 540252546
2023-06-14 06:33:05 -07:00
Peter Hawkins
6b76937c53 Remove matplotlib from the test requirements.
In the Windows CI, we seem to be hitting the following error:

```
=================================== ERRORS ====================================
____________________ ERROR collecting tests/lobpcg_test.py ____________________
tests\lobpcg_test.py:28: in <module>
    from matplotlib import pyplot as plt
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\pyplot.py:52: in <module>
    import matplotlib.colorbar
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\colorbar.py:19: in <module>
    from matplotlib import _api, cbook, collections, cm, colors, contour, ticker
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\contour.py:13: in <module>
    from matplotlib.backend_bases import MouseButton
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\backend_bases.py:45: in <module>
    from matplotlib import (
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\text.py:16: in <module>
    from .font_manager import FontProperties
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\font_manager.py:1548: in <module>
    fontManager = _load_fontmanager()
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\font_manager.py:1543: in _load_fontmanager
    json_dump(fm, fm_path)
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\font_manager.py:957: in json_dump
    with cbook._lock_path(filename), open(filename, 'w') as fh:
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\contextlib.py:119: in __enter__
    return next(self.gen)
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\matplotlib\cbook\__init__.py:1804: in _lock_path
    with lock_path.open("xb"):
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\pathlib.py:1252: in open
    return io.open(self, mode, buffering, encoding, errors, newline,
C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\pathlib.py:1120: in _opener
    return self._accessor.open(self, flags, mode)
E   PermissionError: [Errno 13] Permission denied: 'C:\\Users\\runneradmin\\.matplotlib\\fontlist-v330.json.matplotlib-lock'
```

The use of matplotlib is only for an optional debugging feature anyway, so just make it an optional dependency.
2023-06-14 09:02:49 -04:00
jax authors
9ba1f8e002 Merge pull request #16393 from hawkinsp:winci2
PiperOrigin-RevId: 540246519
2023-06-14 06:01:09 -07:00
Jake VanderPlas
d7a19442b6 DOC: fix formatting in FAQ 2023-06-14 03:17:08 -07:00
Jake VanderPlas
bc0cbd9b3b CI nightly: update nightly wheel location 2023-06-14 02:30:56 -07:00
Jake VanderPlas
c3e9f85cfa jax errors: improve leading info in error docs 2023-06-14 02:07:00 -07:00
jax authors
90159204ba Merge pull request #16344 from JoeyTeng:cleanup-test-lax_control_flow_test
PiperOrigin-RevId: 540164431
2023-06-13 22:00:50 -07:00
Peter Hawkins
638cdf5d95 Fix test failure in LaxBackedNumpyTest.testFrexp4 on Windows.
NumPy is inconsistent between platforms on what it returns for the exponent of an infinite input. On Linux/Mac it returns 0, and on Windows it returns -1. Normalize the test reference result to use 0 in this case.
2023-06-13 20:46:06 -04:00
jax authors
4d512c95e2 Merge pull request #16390 from cloudhan:win-fix-cache-threading
PiperOrigin-RevId: 540123680
2023-06-13 17:42:42 -07:00
jax authors
068abc4ca1 Merge pull request #16391 from hawkinsp:winci2
PiperOrigin-RevId: 540119435
2023-06-13 17:21:23 -07:00
Peter Hawkins
7025800b3f Windows CI: don't fail-fast.
We expect some of the tests to fail at the moment, and we'd like all of the builds to run to completion even if one of them fails.
2023-06-13 20:09:51 -04:00
Cloud Han
0974b5a4ba Fix FileExistsError for tests/gfile_cache_test.py::FileSystemCacheTest::test_threads
Use os.replace() for cross-platform renaming with overwriting.
See https://bugs.python.org/issue8828.
Note, per the implementation, it is not atomic on Windows as for UNIX.
2023-06-14 08:07:22 +08:00
jax authors
38b8e77363 Merge pull request #16389 from hawkinsp:winci2
PiperOrigin-RevId: 540090709
2023-06-13 15:26:00 -07:00
Peter Hawkins
2c71349502 Window CI: fix syntax error.
Try escaping backslashes in bazel override path.

Upload wheels even if tests fail, since they may be useful for debugging.
2023-06-13 18:19:40 -04:00
jax authors
163bb99cb3 Merge pull request #16388 from hawkinsp:winci2
PiperOrigin-RevId: 540082605
2023-06-13 14:57:47 -07:00
Peter Hawkins
7c1fb60d11 Windows CI fixes:
* try single-quoting the bazel override path to avoid \ substitution.
* use a second github checkout action to checkout the XLA repository.
2023-06-13 17:46:00 -04:00
jax authors
c8c6155ac6 Merge pull request #16387 from hawkinsp:winci2
PiperOrigin-RevId: 540071288
2023-06-13 14:19:40 -07:00
Peter Hawkins
00a086a07d Windows CI: fix bazel repository override command. 2023-06-13 17:12:30 -04:00
jax authors
0e8ddebfa0 Merge pull request #16385 from hawkinsp:winci2
PiperOrigin-RevId: 540067532
2023-06-13 14:07:14 -07:00
Peter Hawkins
48f32a6b70 Fix Windows CI build. 2023-06-13 17:00:01 -04:00
jax authors
a6e2b99660 Merge pull request #16384 from hawkinsp:winci2
PiperOrigin-RevId: 540062827
2023-06-13 13:51:49 -07:00
Peter Hawkins
0a70d42fb9 Windows CI improvements:
* upload wheel artifacts to the github workflow.
* use XLA from github head in CI builds.
* update release builds to match the CI build configuration.
2023-06-13 16:46:20 -04:00
jax authors
600ecfa6da Merge pull request #16373 from hawkinsp:winmet
PiperOrigin-RevId: 540052175
2023-06-13 13:16:03 -07:00
jax authors
4dbbb2717b Merge pull request #16324 from axch:ragged-broadcast
PiperOrigin-RevId: 540034699
2023-06-13 12:10:52 -07:00
jax authors
e9f2e40a3e Merge pull request #16211 from gnecula:poly_checks
PiperOrigin-RevId: 540030091
2023-06-13 11:54:50 -07:00
jax authors
16d44ae3f5 Merge pull request #16383 from hawkinsp:winci2
PiperOrigin-RevId: 540024773
2023-06-13 11:36:03 -07:00
Peter Hawkins
e47c475fe4 Windows CI: write wheel into usual location.
Should fix installation failure.
2023-06-13 14:23:59 -04:00