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

[TVMScript] Avoid visiting repetition tensor in SetCommonPrefix Visitor #15083

Merged
merged 2 commits into from Jun 17, 2023
Merged

[TVMScript] Avoid visiting repetition tensor in SetCommonPrefix Visitor #15083

merged 2 commits into from Jun 17, 2023

Conversation

cccxinli
Copy link
Contributor

This commit fix the issue about:
[Bug] [TVMScript] Progress hang on lowerTE during build dynamic Relay IR caused by endless ReprPrintTIR. #15048

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jun 13, 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

@cccxinli
Copy link
Contributor Author

Hi, @Hzfengsy @junrushao . All test cases passed, please help to review this patch.

@junrushao
Copy link
Member

Thanks for the PR! To make sure I completely understand this change: it adds a flag to each field to avoid double visiting. Did I get it right?

@@ -134,6 +141,7 @@ void IRDocsifierNode::SetCommonPrefix(const ObjectRef& root,

ReflectionVTable* vtable_ = ReflectionVTable::Global();
std::vector<const Object*> stack_;
std::vector<const Object*> visited_;
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to switch to std::unordered_set instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, std::unordered_set is well.

@cccxinli
Copy link
Contributor Author

Yeah, you are right.

@Hzfengsy Hzfengsy merged commit 77c75d1 into apache:main Jun 17, 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