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

[TIR] Fix RenewDef for symbolic input shapes #15163

Merged

Conversation

junrushao
Copy link
Member

There are cases where the shapes of input buffers are symbolic, but the first symbol is a composite PrimExpr rather than a TIR Var, which the original implementation does not take this into account.

Example:

@T.prim_func
def main(a: T.handle, b: T.handle):
    m = T.int64()
    A = T.match_buffer(a, (m * 2,))  // `m` first appears as composite
    B = T.match_buffer(b, (m, 2))

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jun 27, 2023

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

@junrushao junrushao marked this pull request as ready for review June 27, 2023 05:29
There are cases where the shapes of input buffers are symbolic, but the
first symbol is a composite PrimExpr rather than a TIR Var, which the
original implementation does not take this into account.

Example:

```python
@T.prim_func
def main(a: T.handle, b: T.handle):
    m = T.int64()
    A = T.match_buffer(a, (m * 2,))  // `m` first appears as composite
    B = T.match_buffer(b, (m, 2))
```
@junrushao junrushao force-pushed the feature/2023-06-26/renew-defs-var-in-signature branch from dc138ac to ac2b079 Compare June 27, 2023 05:39
@tqchen tqchen merged commit bca7ebf into apache:main Jun 27, 2023
18 checks passed
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.

None yet

4 participants