Skip to content

Commit bbf4796

Browse files
committed
fix format
1 parent ebd78ae commit bbf4796

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

mlir/include/mlir/Dialect/XeGPU/Utils/XeGPUUtils.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ Value createVectorWithShapeFromValues(OpBuilder &builder, Location loc,
9797
ValueRange values,
9898
ArrayRef<int64_t> shape);
9999

100-
/// Do type conversion for SCF structural ops, e.g., scf.for using SCF structure type
101-
/// convertion patterns. Since VectorType cannot carry the layout attribute, which is
102-
/// needed to guide the type conversion for XeGPU, they are first converted into
103-
/// RankedTensorType, where the layout attribute can be attached. And then upstream
104-
/// SCF structural type conversion patterns are applied with the provided converter.
105-
void doSCFStructuralTypeConversionWithTensorType(Operation *op, TypeConverter converter);
100+
/// Do type conversion for SCF structural ops, e.g., scf.for using SCF structure
101+
/// type convertion patterns. Since VectorType cannot carry the layout
102+
/// attribute, which is needed to guide the type conversion for XeGPU, they are
103+
/// first converted into RankedTensorType, where the layout attribute can be
104+
/// attached. And then upstream SCF structural type conversion patterns are
105+
/// applied with the provided converter.
106+
void doSCFStructuralTypeConversionWithTensorType(Operation *op,
107+
TypeConverter converter);
106108

107109
} // namespace xegpu
108110

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ void XeGPUBlockingPass::runOnOperation() {
220220
// is not present, it will return a VectorType with original shape.
221221
int count = 1;
222222
SmallVector<int64_t> subShape(shape);
223-
if (auto layout = llvm::dyn_cast_if_present<xegpu::LayoutAttr>(type.getEncoding())) {
223+
if (auto layout = llvm::dyn_cast_if_present<xegpu::LayoutAttr>(
224+
type.getEncoding())) {
224225
if (layout.isWgLayout())
225226
return failure();
226227
if (DenseI32ArrayAttr instData = layout.getInstData()) {
@@ -260,7 +261,8 @@ void XeGPUBlockingPass::runOnOperation() {
260261
layout = layout.dropInstData();
261262
}
262263
}
263-
auto newTy = xegpu::TensorDescType::get(ctx, subShape, elemTy, encoding, layout);
264+
auto newTy =
265+
xegpu::TensorDescType::get(ctx, subShape, elemTy, encoding, layout);
264266
result.append(count, newTy);
265267
return success();
266268
});

mlir/lib/Dialect/XeGPU/Utils/XeGPUUtils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ Value xegpu::createVectorWithShapeFromValues(OpBuilder &builder, Location loc,
225225
return result;
226226
}
227227

228-
void xegpu::doSCFStructuralTypeConversionWithTensorType(Operation *op, TypeConverter converter) {
228+
void xegpu::doSCFStructuralTypeConversionWithTensorType(
229+
Operation *op, TypeConverter converter) {
229230
MLIRContext *context = op->getContext();
230231

231232
auto materializeCast = [&](OpBuilder &builder, Type type, ValueRange inputs,

0 commit comments

Comments
 (0)