Conversation
| */ | ||
|
|
||
| ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI | ||
| onnxReleaseTraceEvents(onnxTraceEventList* traceEvents); |
There was a problem hiding this comment.
my understanding is that events are created outside of the ONNXIFI backend implementation (e.g., onnxifiGlow).
Why do we need release here?
There was a problem hiding this comment.
The idea is that the backend will allocate an array of onnxTraceEvent and return a pointer to it, then onnxReleaseTraceEvents can free that array. Maybe allocating individual onnxTraceEvents and then onnxReleaseTraceEvents contains onnxTraceEvent **traceEvents; would be easier to work with for the backend and more clear? Either way I'll add some more comments here
There was a problem hiding this comment.
But the events have to be created in the Backend because the number of events is not known before the run occurs.
foxi/onnxifi_ext.h
Outdated
| /** | ||
| * The number of events in traceEvents. | ||
| */ | ||
| int32_t numEvents; |
There was a problem hiding this comment.
This should be uint32_t.
foxi/onnxifi_ext.h
Outdated
| * A list of of onnxTraceEvents, the length of which is indicated by | ||
| * numEvents. | ||
| */ | ||
| onnxTraceEvent *traceEvents; |
There was a problem hiding this comment.
Will change this to onnxTraceEvent **traceEvents for easier use
|
Do we want to support something like event trees? In this case we can have traces for call graphs. |
|
Hey Jack, Just curious to know what is the idea behind onnxTraceEvents? Is it track time spent in each op of the onnxified net, so as to enable getting timeline? |
|
@ipiszy Glow doesn't support this now but it's an interesting idea, we could probably extend this to including some stack metadata for each event |
|
@kimishpatel yes it's for enabling looking into timeline of events. Events can be from executing each op as well as things that happen inside of Glow runtime. |
Add trace events interface
Add a new interface for transmitting trace event information collected during calls to
onnxSetIOAndRunGraph.