Skip to content

Commit

Permalink
Match MicroProfiler docs to behavior (#2340)
Browse files Browse the repository at this point in the history
The MicroProfiler was updated in PR #1835 to abort when the event arrays fill up rather than wrap around. This PR updates the documentation to match the behavior.

BUG=#2272
  • Loading branch information
rascani authored Dec 12, 2023
1 parent b654b1b commit ec57f3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tensorflow/lite/micro/micro_profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MicroProfiler : public MicroProfilerInterface {
// only once per event_handle.
//
// If EndEvent is called more than once for the same event_handle, the last
// call will be used as the end of event marker.If EndEvent is called 0 times
// call will be used as the end of event marker. If EndEvent is called 0 times
// for a particular event_handle, the duration of that event will be 0 ticks.
virtual void EndEvent(uint32_t event_handle) override;

Expand All @@ -66,9 +66,9 @@ class MicroProfiler : public MicroProfilerInterface {
void LogTicksPerTagCsv();

private:
// Maximum number of events that this class can keep track of. If we call
// AddEvent more than kMaxEvents number of times, then the oldest event's
// profiling information will be overwritten.
// Maximum number of events that this class can keep track of. The
// MicroProfiler will abort if AddEvent is called more than kMaxEvents number
// of times. Increase this number if you need more events.
static constexpr int kMaxEvents = 4096;

const char* tags_[kMaxEvents];
Expand Down

0 comments on commit ec57f3b

Please sign in to comment.