Ever-Kid opened a new pull request, #13744:
URL: https://github.com/apache/tvm/pull/13744
I came across this bug under python3.8.0 with error from `typing.get_args()`
while trying to run testcases like
`tests/python/unittest/test_tir_schedule_set_axis_separator.py::test_set_axis_separator[transform_layout_named]`
```
> if get_origin(tp) is collections.abc.Callable and res[0] is not
Ellipsis:
E IndexError: tuple index out of range
```
And the root cause here is a difference between python3.8.0 and later
version:
```diff
get_args(Callable[[], T][int]) == ([], int)
"""
- if isinstance(tp, _GenericAlias): // python3.8.0
+ if isinstance(tp, _GenericAlias) and not tp._special: // python3.8.15
res = tp.__args__
if get_origin(tp) is collections.abc.Callable and res[0] is not
Ellipsis:
}
```
So I added it back to `python/tvm/tir/schedule/_type_checker.py`
--
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]