From 1bbfc02ea1ea8c5e3c5ed00a191a41259ca87935 Mon Sep 17 00:00:00 2001 From: Yiheng Date: Tue, 10 Jan 2023 16:20:52 +0800 Subject: [PATCH] [Bugfix][TIR] Fix version conflict with typing for Python 3.8.0 --- python/tvm/tir/schedule/_type_checker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/tir/schedule/_type_checker.py b/python/tvm/tir/schedule/_type_checker.py index becf8c095057..12ce1ebc1f92 100644 --- a/python/tvm/tir/schedule/_type_checker.py +++ b/python/tvm/tir/schedule/_type_checker.py @@ -98,7 +98,7 @@ def union(type_: Any) -> Optional[List[type]]: # pylint: disable=missing-functi @staticmethod def callable(type_: Any) -> Optional[List[type]]: if _Subtype._origin(type_) is collections.abc.Callable: - if hasattr(typing, "get_args"): + if hasattr(typing, "get_args") and not type_._special: subtypes = typing.get_args(type_) # type: ignore else: subtypes = type_.__args__