Rename an outdated class name

We used to not have "value-semantic" tensors but rather "immutable"
tensors
pull/1295/head
Sean Silva 2022-08-27 00:49:23 +00:00
parent c0630da678
commit 26231853ab
1 changed files with 3 additions and 3 deletions

View File

@ -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<ReduceOpVariantsPass> {
void runOnOperation() override {
MLIRContext *context = &getContext();
RewritePatternSet patterns(context);
patterns.add<ConvertToImmutableTensors>(context);
patterns.add<ConvertHasValueSemanticsOpsToValueTensors>(context);
patterns.add<ReduceTrailingUnderscoreInplaceVariant>(context);
patterns.add(reduceNonValueTensorLiteralOpToValueTensorLiteralOp);
patterns.add<ReduceNonValueSemanticOps>(context);