Skip to content

Commit 960be01

Browse files
authored
module_end got removed (#99)
1 parent 1d2be89 commit 960be01

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

mlir/extras/dialects/ext/gpu.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def body(self):
184184
return self.regions[0].blocks[0]
185185

186186

187-
module = region_op(GPUModuleOp, terminator=lambda *_args: module_end())
187+
module = region_op(GPUModuleOp)
188188

189189

190190
class GPUModuleMeta(ModuleMeta):
@@ -202,12 +202,7 @@ def __prepare__(cls, name, bases, **kwargs):
202202
)
203203
ip = InsertionPoint(gpu_module_op.body)
204204
ip.__enter__()
205-
return {
206-
"ip": ip,
207-
"loc": loc,
208-
"gpu_module_op": gpu_module_op,
209-
"module_terminator": module_end,
210-
}
205+
return {"ip": ip, "gpu_module_op": gpu_module_op}
211206

212207

213208
class GPUFuncOp(GPUFuncOp):

mlir/extras/util.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,7 @@ def region_adder_decorator(op, *args, **kwargs):
352352
class ModuleMeta(type):
353353
def __new__(cls, name, bases, classdict, **kwargs):
354354
ip = classdict.pop("ip")
355-
loc = classdict.pop("loc")
356-
module_terminator = classdict.pop("module_terminator", None)
357355
new = super().__new__(cls, name, bases, classdict)
358-
if module_terminator is not None:
359-
module_terminator(loc=loc, ip=ip)
360356
for k, v in classdict.items():
361357
if callable(v):
362358
v.qualname = name

0 commit comments

Comments
 (0)