22 Commits

Author SHA1 Message Date
Peter Hawkins
ba557d5e1b Change JAX's copyright attribution from "Google LLC" to "The JAX Authors.".
See https://opensource.google/documentation/reference/releasing/contributions#copyright for more details.

PiperOrigin-RevId: 476167538
2022-09-22 12:27:19 -07:00
Matthew Johnson
58826507cc [dynamic-shapes] add basic vmap-of-indexing support
The main changes here are only indirectly related to gather: we just had to
update some other rules (e.g. for comparison, and squeeze) for a simple
dynamic-batch-shape gather to work.

I also skipped two tests and deleted some old dynamic shape slicing logic
because we want to handle that differently. We didn't have to do that removal
in this PR, but it's just convenient given I'm looking at indexing again.
2022-09-08 17:52:12 -07:00
jax authors
4aa96c0e90 Merge pull request #12121 from hawkinsp:iree
PiperOrigin-RevId: 470229054
2022-08-26 06:10:48 -07:00
Peter Hawkins
813ee0d0ce Update IREE backend name from "dylib" to "llvm-cpu". 2022-08-26 12:53:58 +00:00
Peter Hawkins
5527966b27 [JAX] Deprecate .to_py() property on arrays. Implement __array__ instead.
.to_py() was something of an accidental export from the JAX array classes. There are other mechanisms to turn a JAX array into a NumPy array, including `np.asarray(x)` and `jax.device_get(x)`. Deprecate this mechanism because it is redundant.

PiperOrigin-RevId: 469984029
2022-08-25 07:28:27 -07:00
hauntsaninja
ed7f4a74c9 Use --no-implicit-optional for type checking
This makes type checking PEP 484 compliant (as of 2018).
mypy will change its defaults soon.

See:
https://github.com/python/mypy/issues/9091
https://github.com/python/mypy/pull/13401
2022-08-12 19:07:21 -07:00
Peter Hawkins
c9b03df556 Fix bitrot in IREE Python client. 2022-08-11 15:27:24 +00:00
Matthew Johnson
98e71fe31d [dynamic-shapes] revive basic bounded int machinery, add tests 2022-07-06 22:31:26 -07:00
Robert Suderman
4ed8255d46 Fix iree.py python integration for backend changes
CPU / VMVX runtime is now called local-task. Updated to
separate compiler, runtime, and backend naming for single
specified configuration.

PiperOrigin-RevId: 459298179
2022-07-06 11:17:44 -07:00
Peter Hawkins
a7e041fa4e [IREE] Allow backend selection via a flag.
Avoid eagerly creating NumPy arrays for IREE buffers.
2022-06-02 21:56:10 -04:00
Peter Hawkins
d45a446ed9 2nd attempt at fixing IREE integration. 2022-06-01 21:54:56 -04:00
Peter Hawkins
a72f8d6daf Fix bitrot in IREE Python integration. 2022-06-01 21:06:18 -04:00
Matthew Johnson
ffa9328a68 Copybara import of the project:
--
9b724647d169a73ffae08610741676cb9b182d26 by Matthew Johnson <mattjj@google.com>:

[djax] add support for dynamic-shape outputs

PiperOrigin-RevId: 451320477
2022-05-26 23:21:40 -07:00
Matthew Johnson
995220a739 Copybara import of the project:
--
9b724647d169a73ffae08610741676cb9b182d26 by Matthew Johnson <mattjj@google.com>:

[djax] add support for dynamic-shape outputs

PiperOrigin-RevId: 451268007
2022-05-26 16:26:49 -07:00
Matthew Johnson
9b724647d1 [djax] add support for dynamic-shape outputs 2022-05-26 13:22:06 -07:00
Christian Sigg
f73f03e039 Fix docs referring to --print-ir-before/after-all, which has changed to --mlir-print....
PiperOrigin-RevId: 448890307
2022-05-16 00:39:40 -07:00
Matthew Johnson
d21b958f30 add some simple iree tests
This passes, though two of the interesting tests fail with what might be IREE
bugs (and so are currently skipped):

```shell
JAX_PLATFORMS='iree' pytest -n auto tests/core_test.py tests/api_test.py -k Dynamic
```
2022-04-14 10:55:00 -07:00
jax authors
d5a1c64d13 Merge pull request #9623 from rsuderman:FixIreeJax
PiperOrigin-RevId: 430834942
2022-02-24 17:51:09 -08:00
Rob Suderman
23d5eb0896 IREE's get_default_device_assignment should return List[Device]
Previously return List[List[Device]] which is not how the function is used.
Updated to use the alternative overload.
2022-02-18 23:02:04 -08:00
Rob Suderman
50f4b5806e Fix Iree backend to for copy_to_device and executable results
Executable results can be a tuple, if so iterate over the entires.

Copy to device should just return the the IREE buffer as device buffer
management is still in progress.
2022-02-17 14:31:23 -08:00
Peter Hawkins
04d8b3544e [JAX:IREE] Fix bitrot in iree plugin for JAX.
The compiler driver appears not to be a thing in the IREE API any more. But it also appears not to be needed.

PiperOrigin-RevId: 424190139
2022-01-25 15:08:49 -08:00
Peter Hawkins
70b8a6a806 Add a prototype IREE backend for JAX.
This is to support experimentation with the combination of JAX/IREE. Many things do not work yet.

PiperOrigin-RevId: 409980064
2021-11-15 07:57:04 -08:00