You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/12 12:34:47 UTC

[GitHub] [tvm] tqchen commented on a change in pull request #7829: [TensorIR] [Script] adding support for opaque block

tqchen commented on a change in pull request #7829:
URL: https://github.com/apache/tvm/pull/7829#discussion_r611587789



##########
File path: python/tvm/script/scope_handler.py
##########
@@ -282,6 +282,12 @@ def block(axes=None, name_hint: str = "", span: Optional[Span] = None):
                 if block_info.writes
                 else []
             )
+
+            region_detect_mask: int = (block_info.reads is None) | ((block_info.reads is None) << 1)
+            annotations = {} if block_info.annotations is None else block_info.annotations
+            if region_detect_mask != 0:
+                annotations["script_detect_access"] = region_detect_mask

Review comment:
       script_parsing_detect_access

##########
File path: python/tvm/script/scope_handler.py
##########
@@ -282,6 +282,12 @@ def block(axes=None, name_hint: str = "", span: Optional[Span] = None):
                 if block_info.writes
                 else []
             )
+
+            region_detect_mask: int = (block_info.reads is None) | ((block_info.reads is None) << 1)

Review comment:
       should be block_info.writes?
   
   please add an regression test for write detection




-- 
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:
users@infra.apache.org