Hzfengsy commented on a change in pull request #7630:
URL: https://github.com/apache/tvm/pull/7630#discussion_r592316212



##########
File path: python/tvm/script/scope_handler.py
##########
@@ -136,8 +166,19 @@ class Realize(WithScopeHandler):
     """ With scope handler tir.realize(buffer_bounds, scope, condition) """
 
     def __init__(self):
-        def realize(buffer_bounds, scope, condition=True, span=None):
-            buffer, bounds = buffer_bounds
+        def realize(
+            buffer_slice: BufferSlice, scope: str, condition: bool = True, 
span: bool = None
+        ):
+            assert self.context

Review comment:
       context is `None` only when the class has been constructed without 
calling `enter_scope`. However, this function is only called at `exit_scope`. 
So I just add a double check here to fix `mypy`. It is just an internet error. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to