Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shape_poly] Keep track of whether a lowering contains shape polymorp…
…hism Previously, we kept the `dim_vars` in the `mlir.ModuleContext`. Now we replace that with a mutable `ShapePolyLoweringState` that also tracks whether we encounter shape polymorphism anywhere in the lowering. For this purpose, we also add `shape_poly_state` to the lowering.compile_args. We need to keep track of whether a module contains dimension variables because such modules need shape refinement before they can be converted to MHLO and compiled. For now, we just test that we set the `Exported.module_uses_dim_vars` correctly.
- Loading branch information
Showing
5 changed files
with
67 additions
and
32 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