Skip to content

Commit af17ff1

Browse files
committed
python code formatting
1 parent 3fa3ee1 commit af17ff1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

mlir/python/mlir/dialects/transform/structured.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ def __init__(
191191
static_tile_interchange,
192192
_,
193193
) = _dispatch_dynamic_index_list(tile_interchange)
194-
num_loops = 1 if use_forall else sum(0 if v == 0 else 1 for v in static_tile_sizes)
194+
num_loops = (
195+
1 if use_forall else sum(0 if v == 0 else 1 for v in static_tile_sizes)
196+
)
195197

196198
if isinstance(loop_types_or_target, (Operation, Value, OpView)):
197199
loop_types = [transform.AnyOpType.get()] * num_loops

mlir/test/python/dialects/transform_structured_ext.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ def testFuseOpCompact(target):
118118
@create_sequence
119119
def testFuseOpCompactForall(target):
120120
structured.FuseOp(
121-
target, tile_sizes=[4, 8], apply_cleanup=True, use_forall=True,
121+
target,
122+
tile_sizes=[4, 8],
123+
apply_cleanup=True,
124+
use_forall=True,
122125
)
123126
# CHECK-LABEL: TEST: testFuseOpCompact
124127
# CHECK: transform.sequence
@@ -143,7 +146,7 @@ def testFuseOpParams(target):
143146
structured.FuseOp(
144147
target,
145148
tile_sizes=[constant_param(4), Attribute.parse("8")],
146-
tile_interchange=[constant_param(0), Attribute.parse("1")]
149+
tile_interchange=[constant_param(0), Attribute.parse("1")],
147150
)
148151
# CHECK-LABEL: TEST: testFuseOpParams
149152
# CHECK: transform.sequence

0 commit comments

Comments
 (0)