File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,7 @@ def __init__(
8080 elif isinstance (sym_name , StringAttr ):
8181 self .attributes [self .SYM_NAME_ATTR_NAME ] = sym_name
8282 else :
83- raise ValueError (
84- "sym_name must be a string or a StringAttr"
85- )
83+ raise ValueError ("sym_name must be a string or a StringAttr" )
8684
8785 if kernel :
8886 self .attributes [self .KERNEL_ATTR_NAME ] = UnitAttr .get ()
@@ -137,8 +135,8 @@ def add_entry_block(self) -> Block:
137135 def entry_block (self ) -> Block :
138136 if len (self .body .blocks ) == 0 :
139137 raise RuntimeError (
140- f"Entry block does not exist for { self .name .value } ." +
141- " Do you need to call the add_entry_block() method on this GPUFuncOp?"
138+ f"Entry block does not exist for { self .name .value } ."
139+ + " Do you need to call the add_entry_block() method on this GPUFuncOp?"
142140 )
143141 return self .body .blocks [0 ]
144142
Original file line number Diff line number Diff line change @@ -93,7 +93,10 @@ def builder(func: gpu.GPUFuncOp) -> None:
9393 func .entry_block
9494 assert False , "Expected RuntimeError"
9595 except RuntimeError as e :
96- assert str (e ) == "Entry block does not exist for kernel0. Do you need to call the add_entry_block() method on this GPUFuncOp?"
96+ assert (
97+ str (e )
98+ == "Entry block does not exist for kernel0. Do you need to call the add_entry_block() method on this GPUFuncOp?"
99+ )
97100
98101 block = func .add_entry_block ()
99102 with InsertionPoint (block ):
You can’t perform that action at this time.
0 commit comments