Skip to content

Commit bc33ceb

Browse files
author
Sergio Sánchez Ramírez
committed
replace with_module calls with @scope
1 parent ec2dc0c commit bc33ceb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Ops.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,15 +3239,11 @@ end
32393239
)
32403240

32413241
sym_name = Reactant.TracedUtils.__lookup_unique_name_in_module(mod, sym_name)
3242-
3243-
mesh_op = MLIR.IR.with_module(mod) do
3244-
return MLIR.Dialects.sdy.mesh(; sym_name, mesh=mesh_attr, location)
3245-
end
3242+
mesh_op = MLIR.Dialects.sdy.mesh(; sym_name, mesh=mesh_attr, location)
32463243

32473244
# mesh_op needs to be moved to the beginning of the module
32483245
mesh_op = MLIR.IR.rmfromparent!(mesh_op)
3249-
mod_body = MLIR.IR.body(mod)
3250-
pushfirst!(mod_body, mesh_op)
3246+
pushfirst!(MLIR.IR.body(mod), mesh_op)
32513247

32523248
# We return the name of the mesh, since the operation is a Symbol op
32533249
return (;

0 commit comments

Comments
 (0)