mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-16 23:51:36 -05:00
The current pass applying the parameters determined by the optimizer to the IR propagates the parametrized TFHE types to operations not directly tagged with an optimizer ID only under certain conditions. In particular, it does not always properly propagate types into nested regions (e.g., of `scf.for` loops). This burdens preceding transformations that are applied in between the invocation of the optimizer and the parametrization pass with data-flow analysis and book-keeping in order to tag newly inserted operations with the right optimizer IDs that ensure proper parametrization. This commit replaces the current parametrization pass with a new pass that propagates parametrized TFHE types up and down def-use chains using type inference and a proper rewriter. The pass is limited to the operations supported by `TFHEParametrizationTypeResolver::resolve`.