From 26231853ab6cce4b98949df059850003107e0fc1 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Sat, 27 Aug 2022 00:49:23 +0000 Subject: [PATCH] Rename an outdated class name We used to not have "value-semantic" tensors but rather "immutable" tensors --- lib/Dialect/Torch/Transforms/ReduceOpVariants.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);