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/03/11 12:18:17 UTC

[GitHub] [tvm] Hzfengsy commented on a change in pull request #7630: [TensorIR] TVMScript Parser/Printer

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



##########
File path: python/tvm/script/parser.py
##########
@@ -716,47 +767,50 @@ def transform_Slice(self, node):
         end = self.transform(node.end)
         if not (isinstance(node.step, ast.Constant) and node.step.value == 1):
             self.report_error("Only step size 1 is supported for slices.", node.step.span)
-        extent = end - start
-        if isinstance(extent, tvm.tir.PrimExpr):
-            ana = tvm.arith.Analyzer()
-            extent = ana.simplify(extent)
-        return tvm.ir.Range.from_min_extent(start, extent, span=from_synr_span(node.span))
+        return Slice(start, end)
 
     def transform_Subscript(self, node):
         """Array access visitor.
 
         By now only 2 types of Subscript are supported:
             1. Buffer[index, index, ...], Buffer element access(BufferLoad & BufferStore)
                Var[index] Buffer element access()
-            2. meta[type_key][index], Meta info access

Review comment:
       By reading through the codes, meta access seems to have bugs. Also, there are no testcases for it. Besides, meta access is not important in TensorIR. So we decide to make a separate PR to fix it later




----------------------------------------------------------------
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