Skip to content

Commit d012284

Browse files
committed
Remove frontend inserted mutex for print lowering
Signed-off-by: Jay Gu <jagu@nvidia.com>
1 parent ac6b47c commit d012284

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/cuda/tile/_ir/ops.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3527,10 +3527,13 @@ class TilePrintf(Operation, opcode="tile_printf", memory_effect=MemoryEffect.STO
35273527
@override
35283528
def generate_bytecode(self, ctx: BytecodeContext):
35293529
arg_vars = [ctx.get_value(arg) for arg in self.args]
3530-
with tile_mutex("print_mutex", ctx):
3531-
result_typeid = (ctx.type_table.Token
3532-
if ctx.builder.version >= bc.BytecodeVersion.V_13_2 else None)
3530+
if ctx.builder.version >= bc.BytecodeVersion.V_13_2:
3531+
result_typeid = ctx.type_table.Token
35333532
bc.encode_PrintTkoOp(ctx.builder, result_typeid, arg_vars, None, self.format)
3533+
else:
3534+
with tile_mutex("print_mutex", ctx):
3535+
result_typeid = None
3536+
bc.encode_PrintTkoOp(ctx.builder, result_typeid, arg_vars, None, self.format)
35343537
return []
35353538

35363539

0 commit comments

Comments
 (0)