vinx13 commented on a change in pull request #9634:
URL: https://github.com/apache/tvm/pull/9634#discussion_r763277900



##########
File path: python/tvm/script/tir/__init__.pyi
##########
@@ -210,9 +210,14 @@ def alloc_buffer(
 """
 special_stmt - Reads/Writes
 """
-
+@overload
 def reads(read_regions: Union[BufferSlice, List[BufferSlice]]) -> None: ...
+@overload
+def reads(read_regions: BufferSlice, *other_regions: BufferSlice) -> None: ...

Review comment:
       From the user-facing side, if we have two overloading versions I don't 
think `other_regions` is necessary. We can instead do something like
   ```
   @overload
   def reads(read_regions: List[BufferSlice]) -> None: ...
   @overload
   def reads(*read_regions: BufferSlice) -> None: ...
   ```




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