@@ -33,25 +33,24 @@ def StablehloPrepareForTosaPass : Pass<"stablehlo-prepare-for-tosa", "mlir::func
3333 let dependentDialects = ["::mlir::tosa::TosaDialect"];
3434}
3535
36- // TODO: un-comment the following once #2751 is fixed.
37- // def StablehloQuantLegalizeToTosaRescalePass : Pass<"stablehlo-quant-legalize-to-tosa-rescale", "mlir::func::FuncOp"> {
38- // let summary = "Legalize StableHLO Quantized operations to TOSA rescale operations";
39- // let description = [{
40- // This pass rewrites StableHLO quantized operations to integer operations
41- // by inserting TOSA rescale operations at the inputs and outputs of the
42- // integer operations.
43- // }];
44- // let dependentDialects = [
45- // "::mlir::tosa::TosaDialect",
46- // ];
47- // }
48- //
49- // def TosaRescaleLegalizeToStablehloPass : Pass<"tosa-rescale-legalize-to-stablehlo", "mlir::func::FuncOp"> {
50- // let summary = "Legalize TOSA rescales to StableHlo primitive math operations";
51- // let description = [{
52- // This pass rewrites TOSA rescale operations to StableHLO primitive math operations.
53- // }];
54- // let dependentDialects = [
55- // "::mlir::stablehlo::StablehloDialect"
56- // ];
57- // }
36+ def StablehloQuantLegalizeToTosaRescalePass : Pass<"stablehlo-quant-legalize-to-tosa-rescale", "mlir::func::FuncOp"> {
37+ let summary = "Legalize StableHLO Quantized operations to TOSA rescale operations";
38+ let description = [{
39+ This pass rewrites StableHLO quantized operations to integer operations
40+ by inserting TOSA rescale operations at the inputs and outputs of the
41+ integer operations.
42+ }];
43+ let dependentDialects = [
44+ "::mlir::tosa::TosaDialect",
45+ ];
46+ }
47+
48+ def TosaRescaleLegalizeToStablehloPass : Pass<"tosa-rescale-legalize-to-stablehlo", "mlir::func::FuncOp"> {
49+ let summary = "Legalize TOSA rescales to StableHlo primitive math operations";
50+ let description = [{
51+ This pass rewrites TOSA rescale operations to StableHLO primitive math operations.
52+ }];
53+ let dependentDialects = [
54+ "::mlir::stablehlo::StablehloDialect"
55+ ];
56+ }
0 commit comments