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

fix #1

Merged
merged 1 commit into from
May 21, 2022
Merged

fix #1

merged 1 commit into from
May 21, 2022

Conversation

spectrometerHBH
Copy link

No description provided.

@vinx13 vinx13 merged commit 623d3d1 into vinx13:auto-tensorization May 21, 2022
vinx13 pushed a commit that referenced this pull request May 24, 2022
vinx13 pushed a commit that referenced this pull request Jun 2, 2022
vinx13 pushed a commit that referenced this pull request Sep 8, 2023
…pache#15483)

* [Script] Be more careful when generating ast.ExtSlice for Subscript

The ast.ExtSlice expects a non-empty list, otherwise evaluation
fails with "error: empty dims on ExtSlice". Also, each element
in "dims" list of ExtSlice must be either Slice or Index.

In python3.8 an expression A[()] is parsed (by ast) as Subscript
with slice being Index(value=Tuple(elts=[])). When we translate a
subscript from doc.AST to ast, we unconditionally convert every
tuple to ast.ExtSlice, which in this case is incorrect.

The fix is to map empty tuple back to the Index(Tuple[])) instead
of ExtSlice. In other cases, ensure that members of ExtSlice are
of correct types.

* Fix lint #1
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.

2 participants