Skip to content

Commit ed37a4e

Browse files
response to comments
Signed-off-by: Alexandre Eichenberger <[email protected]>
1 parent 945f873 commit ed37a4e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Accelerators/NNPA/Conversion/ONNXToZHigh/RewriteONNXForZHigh.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,15 +671,13 @@ void getRewriteONNXForZHighDynamicallyLegal(
671671
return isSuitableForZDNN<ONNXConvOp>(op) ||
672672
!canInferencePadsForNNPAConv(op);
673673
});
674-
#if 1
675674
addDynamicallyLegalOpFor<ONNXReshapeOp>(target, dimAnalysis,
676675
[](ONNXReshapeOp op, const DimAnalysis *dimAnalysis) {
677676
// Get rid of identity reshape here, as it impacts stick/unstick.
678677
// So all reshape are legal, unless it is an identity reshape, in which
679678
// case there is a rule here to remove it.
680679
return !isIdentityReshape(op, dimAnalysis);
681680
});
682-
#endif
683681
}
684682

685683
struct RewriteONNXForZHighPass

src/Accelerators/NNPA/Transform/ZLow/ZLowStickExpansion.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ namespace zlow {
5151
using MDBuilder = MultiDialectBuilder<IndexExprBuilderForKrnl, KrnlBuilder,
5252
MathBuilder, MemRefBuilder, VectorBuilder, AffineBuilder, SCFBuilder>;
5353

54-
/// Remove unstick if there is no use of its second operand except itself.
54+
/// Expand unstick operation to compiler generated code for suitable patterns,
55+
/// aka all but the 1D and 2DS data layouts at this time.
5556
class UnstickExpansionPattern : public OpRewritePattern<ZLowUnstickOp> {
5657
public:
5758
UnstickExpansionPattern(MLIRContext *context, bool enableParallelism = false)
@@ -287,7 +288,8 @@ class UnstickExpansionPattern : public OpRewritePattern<ZLowUnstickOp> {
287288
}
288289
};
289290

290-
/// Remove stick if there is no use of its second operand except itself.
291+
/// Expand stick operation to compiler generated code for suitable patterns, aka
292+
/// all but the 1D and 2DS data layouts at this time.
291293
class StickExpansionPattern : public OpRewritePattern<ZLowStickOp> {
292294
public:
293295
StickExpansionPattern(MLIRContext *context, bool enableParallelism = false)

0 commit comments

Comments
 (0)