Skip to content

[TVMScript] Handle AllocatedPoolInfo, ConstantPoolInfo, ConstantInfo#14812

Merged
junrushao merged 1 commit intoapache:mainfrom
Lunderberg:tvmscript_usmp_constants
May 10, 2023
Merged

[TVMScript] Handle AllocatedPoolInfo, ConstantPoolInfo, ConstantInfo#14812
junrushao merged 1 commit intoapache:mainfrom
Lunderberg:tvmscript_usmp_constants

Conversation

@Lunderberg
Copy link
Copy Markdown
Contributor

These objects may appear as part of a TIR PrimFunc following the tir.usmp.ConvertPoolAllocationsToOffsets transform. Prior to this commit, any such PrimFuncs would result in errors when printing TVMScript, along with a fallback to the legacy repr.

These objects may appear as part of a TIR PrimFunc following the
`tir.usmp.ConvertPoolAllocationsToOffsets` transform.  Prior to this
commit, any such PrimFuncs would result in errors when printing
TVMScript, along with a fallback to the legacy repr.
@tvm-bot
Copy link
Copy Markdown
Collaborator

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

)


@register_object("ir.ConstantMemoryPools")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A bit off the topic, but to some extent, I believe it might be less ideal if we expose those feature-dependent component in tvm/ir folder, which is supposed to be generic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I wasn't sure how much refactoring to include in this PR. There were some clear inconsistencies, such as the wrong object name being in @register_object, but this feels like something that should be in the tir.usmp namespace.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed. This seems less organized. Let's leave this to future change

@junrushao junrushao merged commit 3829ebb into apache:main May 10, 2023
@Lunderberg Lunderberg deleted the tvmscript_usmp_constants branch May 10, 2023 13:07
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