Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shape_poly] Simplify the API for processing polymorphic_shape specif…
…ications Before, we had `export.poly_spec` to create a jax.ShapedDtypeStruct` given a polymorphic shape specification. This function was invoked `poly_spec(arg_shape, arg_dtype, polymorphic_shape)`. The `arg_shape` was only needed when the polymorphic shape spec contained placeholders. We break out an `export.symbolic_shape` that is just a parser of polymorphic shape specs and we ask the user to invoke `jax.ShapeDtypeStruct` directly: `jax.ShapeDtypeStruct(export.symbolic_shape(polymorphic_shape, like=arg_shape), arg_dtype)`. We also rename the `export.poly_specs` to `export.arg_specs`.
- Loading branch information
Showing
8 changed files
with
180 additions
and
170 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
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.