address review comments.
This commit is contained in:
parent
b885fb44dd
commit
9f5f278e83
tensorflow/lite/micro
@ -248,6 +248,7 @@ tflite_micro_cc_test(
|
||||
"micro_interpreter_test.cc",
|
||||
],
|
||||
deps = [
|
||||
":micro_compatibility",
|
||||
":micro_framework",
|
||||
":micro_utils",
|
||||
":op_resolvers",
|
||||
|
@ -84,14 +84,14 @@ int main(int argc, char** argv) {
|
||||
CreateBenchmarkRunner(&profiler);
|
||||
profiler.EndEvent(event_handle);
|
||||
profiler.Log();
|
||||
MicroPrintf("");
|
||||
MicroPrintf(""); // null MicroPrintf serves as a newline.
|
||||
|
||||
tflite::KeywordRunNIerations(1, "KeywordRunNIerations(1)", *benchmark_runner,
|
||||
profiler);
|
||||
profiler.Log();
|
||||
MicroPrintf("");
|
||||
MicroPrintf(""); // null MicroPrintf serves as a newline.
|
||||
|
||||
tflite::KeywordRunNIerations(10, "KeywordRunNIerations(10)",
|
||||
*benchmark_runner, profiler);
|
||||
MicroPrintf("");
|
||||
MicroPrintf(""); // null MicroPrintf serves as a newline.
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ limitations under the License.
|
||||
|
||||
#include "tensorflow/lite/core/api/flatbuffer_conversions.h"
|
||||
#include "tensorflow/lite/micro/all_ops_resolver.h"
|
||||
#include "tensorflow/lite/micro/compatibility.h"
|
||||
#include "tensorflow/lite/micro/micro_error_reporter.h"
|
||||
#include "tensorflow/lite/micro/micro_profiler.h"
|
||||
#include "tensorflow/lite/micro/micro_utils.h"
|
||||
@ -46,6 +47,8 @@ class MockProfiler : public MicroProfiler {
|
||||
private:
|
||||
int event_starts_;
|
||||
int event_ends_;
|
||||
|
||||
TF_LITE_REMOVE_VIRTUAL_DELETE
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
@ -18,6 +18,8 @@ limitations under the License.
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "tensorflow/lite/micro/compatibility.h"
|
||||
|
||||
namespace tflite {
|
||||
|
||||
// MicroProfiler creates a common way to gain fine-grained insight into runtime
|
||||
@ -27,7 +29,7 @@ namespace tflite {
|
||||
class MicroProfiler {
|
||||
public:
|
||||
MicroProfiler() = default;
|
||||
~MicroProfiler() = default;
|
||||
virtual ~MicroProfiler() = default;
|
||||
|
||||
// Marks the start of a new event and returns an event handle that can be used
|
||||
// to mark the end of the event via EndEvent. The lifetime of the tag
|
||||
@ -64,6 +66,8 @@ class MicroProfiler {
|
||||
int32_t start_ticks_[kMaxEvents];
|
||||
int32_t end_ticks_[kMaxEvents];
|
||||
int num_events_ = 0;
|
||||
|
||||
TF_LITE_REMOVE_VIRTUAL_DELETE;
|
||||
};
|
||||
|
||||
#if defined(NDEBUG)
|
||||
|
Loading…
Reference in New Issue
Block a user