Skip to content

Commit ed124fc

Browse files
committed
Remove braces for single line if
1 parent 1d5f75a commit ed124fc

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mlir/lib/Dialect/XeGPU/Transforms/XeGPUWgToSgDistribute.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,18 @@ struct WgToSgCreateNdOp : public OpConversionPattern<xegpu::CreateNdDescOp> {
121121
return failure();
122122
Type elemTy = tdescTy.getElementType();
123123
ArrayRef<int64_t> wgShape = tdescTy.getShape();
124+
// sgLayout must be present for workgroup-level distribution.
124125
SmallVector<int64_t> sgLayout;
125-
if (auto sgLayoutAttr = layout.getSgLayout()) {
126+
if (auto sgLayoutAttr = layout.getSgLayout())
126127
sgLayout = llvm::to_vector_of<int64_t>(sgLayoutAttr.asArrayRef());
127-
} else {
128-
// sgLayout must be present for workgroup-level distribution.
128+
else
129129
return rewriter.notifyMatchFailure(
130130
op, "sgLayout attribute is required in layout");
131-
}
132131

133132
SmallVector<int64_t> sgShape;
134-
if (auto sgDataAttr = layout.getSgData()) {
133+
if (auto sgDataAttr = layout.getSgData())
135134
sgShape = llvm::to_vector_of<int64_t>(sgDataAttr.asArrayRef());
136-
} else {
135+
else {
137136
assert(wgShape.size() == sgLayout.size() &&
138137
"sgLayout and wgShape must have the same rank");
139138
sgShape.reserve(wgShape.size());

0 commit comments

Comments
 (0)