-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bugfix][TIR] Fix version conflict with typing for Python 3.8.0 #13744
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
cc. @sunggg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so I’m getting it in!
for some reason the CI is stuck on the new pipeline added today...let me try to retrigger |
@tvm-bot rerun |
00634b3
to
1bbfc02
Compare
I rebased this branch to latest HEAD so that the CI could run properly |
It's merged! Thanks for the PR! |
Thanks you guys’ kindly help~ |
I'm getting some error in Python 3.10
The attribute |
Oh no. would you mind having it fixed if it’s not super hard? |
Darn, let me fix this. Shouldn't be hard. Edit: until fix is merged, please remove ‘ty._special’ as a temporary solution. |
…he#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`
I came across this bug under python3.8.0 with error from
typing.get_args()
while trying to run testcases liketests/python/unittest/test_tir_schedule_set_axis_separator.py::test_set_axis_separator[transform_layout_named]
And the root cause here is a difference between python3.8.0 and later version:
So I added it back to
python/tvm/tir/schedule/_type_checker.py