Skip to content

Conversation

@Lunderberg
Copy link
Contributor

When using T.match_buffer to define a view into another buffer, default shape and dtype parameters can be inferred.

When using `T.match_buffer` to define a view into another buffer,
default shape and dtype parameters can be inferred.
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

The test intentionally triggers a failed match based on mismatched
`elem_offset`.  Therefore, the test now needs to explicitly pass an
`elem_offset` to trigger the failure, as this now defaults to having a
`Var` for `match_buffer` calls that represent views.
@Lunderberg Lunderberg marked this pull request as ready for review September 26, 2022 15:50
@vinx13 vinx13 merged commit fd26813 into apache:main Sep 26, 2022
@Lunderberg Lunderberg deleted the tvmscript_match_buffer_defaults branch September 26, 2022 19:55
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
* [TVMScript] Infer T.match_buffer parameters for region

When using `T.match_buffer` to define a view into another buffer,
default shape and dtype parameters can be inferred.

* Updated unit test for new behavior

The test intentionally triggers a failed match based on mismatched
`elem_offset`.  Therefore, the test now needs to explicitly pass an
`elem_offset` to trigger the failure, as this now defaults to having a
`Var` for `match_buffer` calls that represent views.
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