aboutsummaryrefslogtreecommitdiff
path: root/lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp')
-rw-r--r--lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp b/lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp
index a547576..0c50bc8 100644
--- a/lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp
+++ b/lib/layer_by_layer_profiler/include/layer_by_layer_profiler.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Arm Limited. All rights reserved.
+ * Copyright (c) 2021-2022 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -22,7 +22,6 @@
#include "EventRecorder.h"
#include "tensorflow/lite/kernels/internal/compatibility.h"
#include <memory>
-#include <pmu_ethosu.h>
#include <vector>
// NOTE: This profiler only works on systems with 1 NPU due to the use of
@@ -31,29 +30,21 @@ namespace tflite {
class LayerByLayerProfiler : public MicroProfiler {
public:
enum Backend { PRINTF, EVENT_RECORDER };
- LayerByLayerProfiler(const std::vector<uint8_t> &event_config = {},
- bool pmu_cycle_counter_enable = true,
- size_t max_events = 200,
- Backend backend = PRINTF,
- int32_t event_id = EventID(EventLevelError, EvtStatistics_No, EventRecordNone));
+
+ LayerByLayerProfiler(size_t max_events = 200,
+ Backend backend = PRINTF,
+ int32_t event_id = EventID(EventLevelError, EvtStatistics_No, EventRecordNone));
+
uint32_t BeginEvent(const char *tag);
void EndEvent(uint32_t event_handle);
int32_t GetTotalTicks() const;
void Log() const;
- uint64_t GetPmuCycleCounterCount() const;
- const std::vector<uint32_t> &GetPmuEventCount() const;
-
private:
std::unique_ptr<const char *[]> tags_;
std::unique_ptr<uint64_t[]> start_ticks_;
std::unique_ptr<uint64_t[]> end_ticks_;
- std::vector<uint8_t> pmu_event_config;
- std::vector<uint32_t> pmu_event_count;
- bool pmu_cycle_counter_enable;
- uint64_t pmu_cycle_counter_count;
-
size_t max_events_;
Backend backend;
int32_t event_id;