Skip to content

Commit 93b9c82

Browse files
committed
fix clang-format
1 parent cfe4396 commit 93b9c82

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

lib/gc/Transforms/GPU/LinalgToXeGPU.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "gc/Transforms/Utils/StructuredOpMatcher.h"
1313
#include "gc/Transforms/Utils/ValueUtils.h"
1414

15-
1615
#include "mlir/Conversion/Passes.h"
1716
#include "mlir/Dialect/Arith/IR/Arith.h"
1817
#include "mlir/Dialect/Func/IR/FuncOps.h"
@@ -1008,8 +1007,9 @@ static LogicalResult createDPASKernel(linalg::LinalgOp linalgOp,
10081007
tilesA =
10091008
SmallVector<Value>{iterValues.begin() + loadVecC.size(),
10101009
iterValues.begin() + loadVecC.size() + tilesA.size()};
1011-
tilesB = SmallVector<Value>{iterValues.begin() + loadVecC.size() + tilesA.size(),
1012-
iterValues.begin() + loadVecC.size() + tilesA.size() + tilesB.size()};
1010+
tilesB = SmallVector<Value>{
1011+
iterValues.begin() + loadVecC.size() + tilesA.size(),
1012+
iterValues.begin() + loadVecC.size() + tilesA.size() + tilesB.size()};
10131013
if (isCoopPrefetch) {
10141014
prefetchA = *(iterValues.end() - 2);
10151015
prefetchB = *(iterValues.end() - 1);

lib/gc/Transforms/Utils/MatcherUtils.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ namespace utils {
5555
// .operation(NumOfLoops(_OR(EqualsTo(5), EqualsTo(4))))
5656
// .input(MatchAll(), HasStaticShape())
5757
// .output(MatchAll(), HasStaticShape())
58-
// .input(MatchOne(0), HasMap(BroadcastableProjectedPermutation(), &mapOperandA))
59-
// .input(MatchOne(1), HasMap(Any(), &mapOperandB))
60-
// .output(MatchOne(0), HasMap(BroadcastableProjectedPermutation(), &mapOperandC))
61-
// .region(MatchOne(0),
58+
// .input(MatchOne(0), HasMap(BroadcastableProjectedPermutation(),
59+
// &mapOperandA)) .input(MatchOne(1), HasMap(Any(), &mapOperandB))
60+
// .output(MatchOne(0), HasMap(BroadcastableProjectedPermutation(),
61+
// &mapOperandC)) .region(MatchOne(0),
6262
// WithOpChain<arith::MulFOp, arith::AddFOp>(operands));
6363
// // clang-format on
6464
// if (!matmulMatcher.match(linalgOp))
@@ -72,7 +72,8 @@ namespace utils {
7272
// int64_t iParIter = operandCPosIterPar[0];
7373
// int64_t jParIter = operandCPosIterPar[1];
7474

75-
// // Operand A: One parallel iterator (i) and two reduction ones (batch and k).
75+
// // Operand A: One parallel iterator (i) and two reduction ones (batch and
76+
// k).
7677
// // The batch dimension is optional.
7778
// llvm::SmallVector<int64_t> operandAPosIterPar = getIteratorPos(
7879
// linalgOp, mapOperandA, mlir::utils::IteratorType::parallel);
@@ -296,8 +297,7 @@ static bool hasReluBody(Operation *op, SmallVectorImpl<Value> *captured) {
296297

297298
if (cmpPredicate == arith::CmpFPredicate::UGT ||
298299
cmpPredicate == arith::CmpFPredicate::UGE) {
299-
if (cmpLhs == trueVal &&
300-
mlir::utils::isZeroTensor(cmpRhs) &&
300+
if (cmpLhs == trueVal && mlir::utils::isZeroTensor(cmpRhs) &&
301301
mlir::utils::isZeroTensor(falseVal)) {
302302
// case: %in > 0 ? %in : 0
303303
return (getOperand(cmpLhs, cmpRhs) || getOperand(cmpRhs, cmpLhs));
@@ -309,8 +309,7 @@ static bool hasReluBody(Operation *op, SmallVectorImpl<Value> *captured) {
309309
}
310310
} else if (cmpPredicate == arith::CmpFPredicate::ULT ||
311311
cmpPredicate == arith::CmpFPredicate::ULE) {
312-
if (cmpLhs == falseVal &&
313-
mlir::utils::isZeroTensor(cmpRhs) &&
312+
if (cmpLhs == falseVal && mlir::utils::isZeroTensor(cmpRhs) &&
314313
mlir::utils::isZeroTensor(trueVal)) {
315314
// case: %in < 0 ? 0 : %in
316315
return (getOperand(cmpLhs, cmpRhs) || getOperand(cmpRhs, cmpLhs));
@@ -329,7 +328,7 @@ namespace {
329328
// Helper matcher functor for relu detection.
330329
struct WithReluBody {
331330
WithReluBody() = delete;
332-
WithReluBody(SmallVectorImpl<Value> *captures) : captures(captures){};
331+
WithReluBody(SmallVectorImpl<Value> *captures) : captures(captures) {};
333332

334333
bool operator()(Region *region, Operation *op) {
335334
auto linalgOp = dyn_cast<linalg::LinalgOp>(op);
@@ -361,7 +360,7 @@ bool isTwoDReluOp(linalg::LinalgOp linalgOp, SmallVectorImpl<Value> *operands) {
361360
// SmallVectorImpl<Value> *operands) {
362361
// SmallVector<Value, 2> linalgOperands;
363362
// // clang-format off
364-
// auto identityMatcher =
363+
// auto identityMatcher =
365364
// StructuredOpMatcher::make<linalg::LinalgOp>()
366365
// .output(MatchAll(), HasMap(Identity()))
367366
// .input(MatchAll(), HasMap(BroadcastableProjectedPermutation()))

0 commit comments

Comments
 (0)