Lunderberg commented on a change in pull request #10099:
URL: https://github.com/apache/tvm/pull/10099#discussion_r798665516



##########
File path: python/tvm/script/tir/ty.py
##########
@@ -65,6 +70,8 @@ class GenericTupleType(TypeGeneric):  # pylint: 
disable=abstract-method
     """
 
     def __getitem__(self, vtypes):
+        if isinstance(vtypes, TypeGeneric):

Review comment:
       That's correct.  If `transform_TypeApply` was to be able to handle both 
`T.Ptr` and `T.Tuple` cases, then I wanted to make sure that they both accepted 
the same types of arguments.  The two options I considered were (a) always 
passing a tuple of parameter types even if there is only 1, or (b) passing a 
bare type when there is only 1 and otherwise passing a tuple of parameter 
types.  Previously, `T.Ptr` implicitly followed convention (b), while `T.Tuple` 
followed convention (a).  Option (b) matches python's subscripting syntax, so 
that's the one that I chose.




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

To unsubscribe, e-mail: [email protected]

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


Reply via email to