The previous implementation failed to reach a fixpoint when the body was
ignoring the carry and was returning an unbatched constant. Ensuring
that the result carry is at least as batched as the input carry should
fix the issue.
* It is easy to add new Modules of examples since each Module is specified using a few lines of code (see `examples.py`).
* It is easy to add new converters since each converter is represented as a function (see `converters.py`). For instance, we could add the MLIR-based converter that the TFLite team is currently working on.
* The framework outputs a Markdown table (see `README.md`).
The framework has the following limitations:
* We only evaluate whether a Module converts, we do not compare any outputs between the converted model and the original model. This will require more effort, and it seems like we can do this as a follow-up if necessary (once a good fraction of ops are converted).
* If an example is missing multiple ops, then only the first missing op is reported. We could improve this by implementing mocked versions of non-working ops, which only output the right shapes. We could also consider doing this as a follow-up.
PiperOrigin-RevId: 402287865
* give an error for NumPy indexing with slices when the elements
of the slices are not constant. This check existed, but was
throing an error when the elements are dimension polynomials.
* give an error for NumPy indexing with slices when the dimension
size is not constant.
* Improvements in the handling of enable_xla=False for shape
polymorphism.
* Added test cases for the above.
It was confusing to overload, since we sometimes think of avals like
shapes paired with dtypes, and in that case len(aval) should perhaps be
like len(aval.shape). The only place where this behavior was relied on
was sparse/ops.py.
1. factor out rbg_prng_impl and unsafe_rbg_prng_impl. the former uses
threefry2x32 for split and fold_in, while the latter uses untested
heuristics based on calling rng_bit_generator itself as a kind of
hash function
2. for unsafe_rbg_prng_impl's split and fold_in, generate longer
sequences from rng_bit_generator (10x iterations) which may be useful on
some backends
3. for unsafe_rbg_prng_impl, actually apply rng_bit_generator as our
'hash function' in fold_in
Co-authored-by: Roy Frostig <frostig@google.com>
Co-authored-by: Anselm Levskaya <levskaya@google.com>