feat(compiler): Add support for tensor.{from_elements,dim} operations in TFHE passes

This commit is contained in:
Andi Drebes
2024-04-03 11:02:41 +02:00
parent 0c7e3a3518
commit 48d919bd25
4 changed files with 34 additions and 6 deletions

View File

@@ -371,6 +371,12 @@ void TFHEKeyNormalizationPass::runOnOperation() {
mlir::concretelang::addDynamicallyLegalTypeOp<mlir::tensor::EmptyOp>(
target, typeConverter);
patterns.add<
mlir::concretelang::GenericTypeConverterPattern<mlir::tensor::DimOp>>(
&getContext(), typeConverter);
mlir::concretelang::addDynamicallyLegalTypeOp<mlir::tensor::DimOp>(
target, typeConverter);
patterns.add<RegionOpTypeConverterPattern<mlir::linalg::GenericOp,
conversion::TypeConverter>>(
&getContext(), typeConverter);