Skip to content

Conversation

@Lunderberg
Copy link
Contributor

Previously, even if an object is supported by TVMScript, printing that object could fail if the object contains references to un-registered objects. In particular, the attributes in the PrimFunc and AttrStmt may contain any ObjectRef, and are frequently used for external bookkeeping. This commit adds a default printer for unregistered types in TVMScript.

This is a follow-up to changes made in #14840

Previously, even if an object is supported by TVMScript, printing that
object could fail if the object contains references to un-registered
objects.  In particular, the attributes in the `PrimFunc` and
`AttrStmt` may contain any `ObjectRef`, and are frequently used for
external bookkeeping.  This commit adds a default printer for
unregistered types in TVMScript.
@tvm-bot
Copy link
Collaborator

tvm-bot commented May 17, 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

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.

Thanks a lot for this change!! Instead of a direct crash, this approach provides a nice and readable safety net for all un-registered types!

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.

Thanks a lot for this change!! Instead of a direct crash, this approach provides a nice and readable safety net for all un-registered types!

@masahi masahi merged commit 38c3ad4 into apache:main May 18, 2023
@Lunderberg Lunderberg deleted the tvmscript_fallback_printer branch May 18, 2023 15:16
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.

4 participants