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

[PROFILING] Add json output to profiling reports #8503

Merged
merged 2 commits into from
Jul 24, 2021

Conversation

tkonolige
Copy link
Contributor

This is machine readable json output. It is not meant to be used as a serialization format.

@leandron @mdwelsh @masahi

Copy link
Contributor

@mdw-octoml mdw-octoml left a 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.

@@ -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:
Copy link
Contributor

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.

Copy link
Contributor

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":
Copy link
Contributor

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":
Copy link
Contributor

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).

src/runtime/profiling.cc Show resolved Hide resolved
@tkonolige
Copy link
Contributor Author

@mdwelsh Your comments have been addressed.

src/runtime/profiling.cc Show resolved Hide resolved
src/runtime/profiling.cc Show resolved Hide resolved
@masahi masahi merged commit bce0db5 into apache:main Jul 24, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* [PROFILING] Add json output to profiling reports

* format json in comments
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [PROFILING] Add json output to profiling reports

* format json in comments
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