@@ -308,16 +308,17 @@ void xegpu::doSCFStructuralTypeConversionWithTensorType(Operation *op) {
308308 { // perform the conversion from RankedTensorType to VectorType based on the
309309 // LayoutAttr
310310 auto computeTileShapeAndCount = [&](ArrayRef<int64_t > shape,
311- DenseI32ArrayAttr sgDataAttr,
312- DenseI32ArrayAttr sgLayoutAttr) {
311+ DenseI32ArrayAttr sgDataAttr,
312+ DenseI32ArrayAttr sgLayoutAttr) {
313313 SmallVector<int64_t > tileShape;
314314 auto sgLayout = llvm::to_vector_of<int64_t >(sgLayoutAttr.asArrayRef ());
315315 if (sgDataAttr)
316316 tileShape = llvm::to_vector_of<int64_t >(sgDataAttr.asArrayRef ());
317317 else
318318 tileShape = computeShapeRatio (shape, sgLayout).value_or (tileShape);
319319 assert (tileShape.size () && " failed to compute tileShape" );
320- SmallVector<int64_t > distUnit = computeElementwiseMul (sgLayout, tileShape);
320+ SmallVector<int64_t > distUnit =
321+ computeElementwiseMul (sgLayout, tileShape);
321322 int count = computeProduct (shape) / computeProduct (distUnit);
322323 return std::make_pair (tileShape, count);
323324 };
@@ -341,7 +342,8 @@ void xegpu::doSCFStructuralTypeConversionWithTensorType(Operation *op) {
341342 if (layout.isWgLayout ()) {
342343 // for WgToSg, the subShape is either from sgData or computed as
343344 // shape/sgLayout
344- std::tie (subShape, count) = computeTileShapeAndCount (shape, layout.getSgData (), layout.getSgLayout ());
345+ std::tie (subShape, count) = computeTileShapeAndCount (
346+ shape, layout.getSgData (), layout.getSgLayout ());
345347 } else if (DenseI32ArrayAttr instData = layout.getInstData ()) {
346348 // for unrolling, the subShape is determined by inst_data
347349 subShape = llvm::to_vector_of<int64_t >(instData.asArrayRef ());
@@ -371,7 +373,8 @@ void xegpu::doSCFStructuralTypeConversionWithTensorType(Operation *op) {
371373 if (layout.isWgLayout ()) {
372374 // for WgToSg, the subShape is either from sgData or computed as
373375 // shape/sgLayout
374- std::tie (subShape, count) = computeTileShapeAndCount (shape, layout.getSgData (), layout.getSgLayout ());
376+ std::tie (subShape, count) = computeTileShapeAndCount (
377+ shape, layout.getSgData (), layout.getSgLayout ());
375378 layout = layout.dropSgLayoutAndData ();
376379 } else if (DenseI32ArrayAttr instData = layout.getInstData ()) {
377380 // for unrolling, the subShape is determined by inst_data
@@ -390,7 +393,7 @@ void xegpu::doSCFStructuralTypeConversionWithTensorType(Operation *op) {
390393
391394 converter.addSourceMaterialization (materializeCast);
392395 converter.addTargetMaterialization ([&](OpBuilder &builder, TypeRange type,
393- ValueRange inputs, Location loc) {
396+ ValueRange inputs, Location loc) {
394397 return builder.create <UnrealizedConversionCastOp>(loc, type, inputs)
395398 .getResults ();
396399 });
0 commit comments