Skip to content

Commit 889525f

Browse files
qedawkinsGroverkss
authored andcommitted
[mlir][Tensor] Add discardable attrs back in cast(pack) folder
1 parent a07e80c commit 889525f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "mlir/Dialect/Utils/IndexingUtils.h"
1515
#include "mlir/Dialect/Utils/ReshapeOpsUtils.h"
1616
#include "mlir/Dialect/Utils/StaticValueUtils.h"
17+
#include "mlir/Dialect/Utils/StructuredOpsUtils.h"
1718
#include "mlir/IR/Builders.h"
1819
#include "mlir/IR/BuiltinAttributeInterfaces.h"
1920
#include "mlir/IR/BuiltinTypeInterfaces.h"
@@ -4798,6 +4799,7 @@ struct FoldTensorCastPackOp : public OpRewritePattern<PackOp> {
47984799
PackOp newOp = rewriter.create<PackOp>(
47994800
op.getLoc(), newOperands[0], newOperands[1], op.getInnerDimsPos(),
48004801
newMixedTileSizes, op.getPaddingValue(), op.getOuterDimsPerm());
4802+
newOp->setDiscardableAttrs(op->getDiscardableAttrDictionary());
48014803

48024804
// Replace op.
48034805
Value oldResult = op.getResult();

0 commit comments

Comments
 (0)