Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jax2tf] Improves support for lax.gather (enable_xla=False).
We were initially only handling `mode = lax.GatherScatterMode.PROMISE_IN_BOUNDS` (from #10653), but there are two problems with this: * In eager or graph mode, TF throws an error for out-of-bounds indices. This was undocumented, so I've added a limitation and documented this in the g4doc. * `PROMISE_IN_BOUNDS` is semantically the same as `FILL_OR_DROP` (for the forward pass). In fact. JAX's `.set()` uses `FILL_OR_DROP`. I've now changed it so that both modes are supported (only `CLIP` is not supported). I have also added more tests for OOB behavior for enable_xla = False, and a few more tests. PiperOrigin-RevId: 470215381
- Loading branch information
1 parent
3c91787
commit 6dd425c
Showing
5 changed files
with
212 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.