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

Support operator fusion in memhammer #1

Open
wants to merge 2 commits into
base: memhammer
Choose a base branch
from

Conversation

vinx13
Copy link

@vinx13 vinx13 commented Apr 12, 2022

No description provided.

@vinx13
Copy link
Author

vinx13 commented Apr 12, 2022

cc @spectrometerHBH

junrushao 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