tkonolige commented on a change in pull request #7797:
URL: https://github.com/apache/tvm/pull/7797#discussion_r616080617
##########
File path: include/tvm/runtime/profiling.h
##########
@@ -151,6 +151,54 @@ Timer DefaultTimer(Device dev);
namespace profiling {
+/*! \brief Data collected from a profiling run. Includes per-call metrics and
overall metrics.
+ */
+class ReportNode : public Object {
+ public:
+ /*! \brief A list of function calls and the metrics recorded for that call.
+ *
+ * Each element is a mapping from metric name to value. Some metrics that
+ * appear in every call are "Name" (the function name), "Argument Shapes",
+ * and "Duration (us)". Values are one of `String`, `PercentNode`,
+ * `DurationNode`, or `CountNode`.
+ */
+ Array<Map<String, ObjectRef>> calls;
+ /*! \brief Metrics collected for the entire run of the model on a per-device
basis.
+ *
+ * `overall` is indexed by device name then metric.
+ *
+ * These metrics may be larger than the sum of the same metric in `calls`
+ * because these metrics include the overhead of the executor.
+ */
+ Map<String, Map<String, ObjectRef>> overall;
Review comment:
`device_metrics` is definitely a better name, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]