-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[PROFILING] Add json output to profiling reports #8503
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tkonolige ! LGTM with some nits.
include/tvm/runtime/profiling.h
Outdated
@@ -205,6 +205,28 @@ class ReportNode : public Object { | |||
* `aggregate` is true. | |||
*/ | |||
String AsTable(bool sort = true, bool aggregate = true) const; | |||
/*! \brief Convert this report to json. | |||
* | |||
* Output json will be of this format: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My eyes :-) Would you mind pretty printing this JSON in the comment? It makes the format more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, recommend using JSON
(not json
) in the comments for the sake of the autogenerated documentation.
|
||
.. code-block: | ||
|
||
{"calls": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment on C++ above, would be great if this were pretty-printed for readability (in the comment itself, no need for the actual JSON output).
|
||
.. code-block: | ||
|
||
{"calls": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment on C++ above, would be great if this were pretty-printed for readability (in the comment itself, no need for the actual JSON output).
@mdwelsh Your comments have been addressed. |
* [PROFILING] Add json output to profiling reports * format json in comments
* [PROFILING] Add json output to profiling reports * format json in comments
This is machine readable json output. It is not meant to be used as a serialization format.
@leandron @mdwelsh @masahi