diff --git a/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp b/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp index 7985ce2b3..705ce0660 100644 --- a/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp +++ b/lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp @@ -55,9 +55,9 @@ static Type getContainerOrTensorTypeWithValueSemantics(Type type) { namespace { // Convert value semantic ops operating on mutable arrays to instead operate on // immutable tensors. -class ConvertToImmutableTensors : public RewritePattern { +class ConvertHasValueSemanticsOpsToValueTensors : public RewritePattern { public: - ConvertToImmutableTensors(MLIRContext *context) + ConvertHasValueSemanticsOpsToValueTensors(MLIRContext *context) : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {} LogicalResult matchAndRewrite(Operation *op, PatternRewriter &rewriter) const override { @@ -260,7 +260,7 @@ class ReduceOpVariantsPass : public ReduceOpVariantsBase { void runOnOperation() override { MLIRContext *context = &getContext(); RewritePatternSet patterns(context); - patterns.add(context); + patterns.add(context); patterns.add(context); patterns.add(reduceNonValueTensorLiteralOpToValueTensorLiteralOp); patterns.add(context);