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



##########
File path: python/tvm/script/tir/__init__.pyi
##########
@@ -316,36 +316,72 @@ def Assert(condition: Union[PrimExpr, builtins.bool], 
message: str) -> PrimExpr:
 """
 Scope handler - Loops
 """
-
+@overload
 def serial(
     begin: Union[PrimExpr, int],
-    end: Union[PrimExpr, int] = None,
+    end: Union[PrimExpr, int],
     annotations: Optional[Mapping[str, Object]] = None,
 ) -> Iterable[IterVar]: ...
+@overload
+def serial(
+    end: Union[PrimExpr, int],
+    annotations: Optional[Mapping[str, Object]] = None,
+) -> Iterable[IterVar]: ...
+@overload
 def parallel(
     begin: Union[PrimExpr, int],
-    end: Union[PrimExpr, int] = None,
+    end: Union[PrimExpr, int],
+    annotations: Optional[Mapping[str, Object]] = None,
+) -> Iterable[IterVar]: ...
+@overload
+def parallel(
+    end: Union[PrimExpr, int],
     annotations: Optional[Mapping[str, Object]] = None,
 ) -> Iterable[IterVar]: ...
+@overload
 def vectorized(
     begin: Union[PrimExpr, int],
-    end: Union[PrimExpr, int] = None,
+    end: Union[PrimExpr, int],
+    annotations: Optional[Mapping[str, Object]] = None,
+) -> Iterable[IterVar]: ...
+@overload
+def vectorized(
+    end: Union[PrimExpr, int],
     annotations: Optional[Mapping[str, Object]] = None,
 ) -> Iterable[IterVar]: ...
+@overload
 def unroll(
     begin: Union[PrimExpr, int],
-    end: Union[PrimExpr, int] = None,
+    end: Union[PrimExpr, int],
     annotations: Optional[Mapping[str, Object]] = None,
 ) -> Iterable[IterVar]: ...
+@overload
+def unroll(
+    end: Union[PrimExpr, int],
+    annotations: Optional[Mapping[str, Object]] = None,
+) -> Iterable[IterVar]: ...
+@overload
 def thread_binding(
     begin: Union[PrimExpr, int],
-    end: Union[PrimExpr, int] = None,
+    end: Union[PrimExpr, int],
+    thread: str = None,

Review comment:
       given we have overloads, default value `thread = None` is not needed 




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