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

Cleanup HeapReporter command line options #2783

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

philass
Copy link
Member

@philass philass commented Apr 3, 2024

This PR uses llvm::cl::list to handle the parsing of a list of passes past as command line options.

This is consistent with the onnx-const-prop-disable-pattern and functions-to-decompose implementations for list command line parsing.

@philass philass requested a review from sorenlassen April 3, 2024 23:55
src/Compiler/HeapReporter.cpp Outdated Show resolved Hide resolved
reportBegin("onnx-mlir heap report"
"\n--report-heap-before='" +
beforePasses.str() + "'\n--report-heap-after='" +
afterPasses.str() + "'");
beforePassesStr + "'\n--report-heap-after=" + afterPassesStr);
Copy link
Member

Choose a reason for hiding this comment

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

can you use llvm::join() from StringExtras.h?

llvm::join(beforePasses, ",") + "'\n--report-heap-after=" + llvm::join(afterPasses, ",")

Copy link
Member Author

Choose a reason for hiding this comment

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

I knew there must be some handy function for this lying around. Thanks for the pointer

Signed-off-by: philass <[email protected]>
@philass philass force-pushed the plassen/heap-option-cleanup branch from 27996f4 to 582c3b8 Compare April 4, 2024 00:51
@philass philass merged commit 41d7308 into onnx:main Apr 4, 2024
7 of 8 checks passed
@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #13632 [push] Cleanup HeapReporter com... started at 22:17

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #14637 [push] Cleanup HeapReporter com... started at 22:07

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #14607 [push] Cleanup HeapReporter com... started at 21:07

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #14607 [push] Cleanup HeapReporter com... passed after 1 hr 16 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #14637 [push] Cleanup HeapReporter com... passed after 1 hr 32 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #13632 [push] Cleanup HeapReporter com... passed after 1 hr 55 min

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