Skip to content
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

[TVMScript][Fix] Add type hints for more uncovered cases #9505

Merged
merged 7 commits into from
Nov 22, 2021

Conversation

shingjan
Copy link
Contributor

@shingjan shingjan commented Nov 12, 2021

This PR intends to add type hints for some uncovered cases in TVMScript.

cc: @junrushao1994 @vinx13

@junrushao
Copy link
Member

junrushao commented Nov 12, 2021

Thank you so much for acting swiftly on this!! BTW, would you mind also adding T.exp in the unittest?

@vinx13
Copy link
Member

vinx13 commented Nov 17, 2021

@shingjan please address comments above

@shingjan
Copy link
Contributor Author

@vinx13 Comments addressed. I fixed the CI issue by disabling the mypy check on slice index of that two lines.

@junrushao
Copy link
Member

The following two errors should be fixed rather than skipped (if possible)

tests/python/unittest/test_tvmscript_type.py: note: In function "different_access_indices":
tests/python/unittest/test_tvmscript_type.py:168:29: error: Slice index must be an integer or None
tests/python/unittest/test_tvmscript_type.py:169:29: error: Slice index must be an integer or None

@vinx13
Copy link
Member

vinx13 commented Nov 18, 2021

It is an issue of mypy that can't be fixed - it requires slice must be constructed with int rather than custom type
see python/typing#159

@shingjan shingjan requested a review from vinx13 November 18, 2021 21:32
@vinx13
Copy link
Member

vinx13 commented Nov 18, 2021

There are still some CI error. Please make sure it can pass locally

@junrushao
Copy link
Member

Shall we merge this PR?

@vinx13 vinx13 merged commit cdca84a into apache:main Nov 22, 2021
@shingjan shingjan deleted the tvmscript-type-hint-fix branch November 23, 2021 21:58
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* add support for prevously uncovered cases

* remove PrimExpr import

* add exp test and mypy ignore

* disable ling too long

* resolve long line

* nit

* add dtype to unary ops
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* add support for prevously uncovered cases

* remove PrimExpr import

* add exp test and mypy ignore

* disable ling too long

* resolve long line

* nit

* add dtype to unary ops
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* add support for prevously uncovered cases

* remove PrimExpr import

* add exp test and mypy ignore

* disable ling too long

* resolve long line

* nit

* add dtype to unary ops
yangulei pushed a commit to yangulei/tvm that referenced this pull request Jan 11, 2022
* add support for prevously uncovered cases

* remove PrimExpr import

* add exp test and mypy ignore

* disable ling too long

* resolve long line

* nit

* add dtype to unary ops
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* add support for prevously uncovered cases

* remove PrimExpr import

* add exp test and mypy ignore

* disable ling too long

* resolve long line

* nit

* add dtype to unary ops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants