Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Mar 11, 2024
1 parent 1995ae7 commit 2e48525
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions include/Dialect/TensorExt/IR/TensorExtCanonicalization.td
Expand Up @@ -11,26 +11,13 @@ defvar DefOverflow = ConstantEnumCase<Arith_IntegerOverflowAttr, "none">;

def MakeSingleResultVariadic: NativeCodeCall<"{ $0 }">;

def IndexType : NativeCodeCall<"$_builder.getIndexType()">;

def MakeMatchingTypedZero : NativeCodeCall<
"$_builder.getIntegerAttr("
"$_builder.getIntegerType("
"$0.getType().getIntOrFloatBitWidth()"
"), 0)">;

def CreateIndexCastOp : NativeCodeCall<
"$_builder.create<arith::IndexCastOp>($0.getLoc(), $1.getType(), $0)">;

def IsZero :
Constraint<
CPred<"llvm::cast<mlir::IntegerAttr>($0).getValue().isZero()">>;

def AreOpposites :
Constraint<
CPred<"llvm::cast<mlir::IntegerAttr>($0).getValue() "
"== llvm::cast<mlir::IntegerAttr>($1).getValue()">>;

def OutOfBoundsOfTensorDim :
Constraint<
CPred<
Expand Down
2 changes: 1 addition & 1 deletion lib/Dialect/TensorExt/Transforms/InsertRotate.cpp
Expand Up @@ -15,7 +15,7 @@ namespace tensor_ext {
#include "include/Dialect/TensorExt/Transforms/Passes.h.inc"

namespace alignment {
// In an inner namespace to avoid conflicts with canonicaliation patterns
// In an inner namespace to avoid conflicts with canonicalization patterns
#include "include/Dialect/TensorExt/Transforms/InsertRotate.cpp.inc"
} // namespace alignment

Expand Down

0 comments on commit 2e48525

Please sign in to comment.