mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-19 00:44:22 -05:00
The IR generated by the batching pattern introduces intermediate tensor values omitting the batched dimensions for batched operands. This happens uncondiationally, leading to the generation of `tensor.collapse_shape` operations with the same output and inout shape. However, verification for such operation fails, since the verifier assumes that the rank of the resulting tensor is reduced at least by one. This commit modified the check in `flattenTensor`, such that no flattening operation is generated if the input and output shapes would be identical.