From 82d225899bd3d4fd07d70cac80f50c1b288dc4a3 Mon Sep 17 00:00:00 2001 From: Davide Grohmann Date: Mon, 25 Apr 2022 12:52:38 +0200 Subject: Add support for rejected inference responses Change-Id: I62e13df69c712ed4cf70766429b4cb13fc9c9dcb --- driver_library/include/ethosu.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'driver_library/include/ethosu.hpp') diff --git a/driver_library/include/ethosu.hpp b/driver_library/include/ethosu.hpp index a12d668..61e2bc5 100644 --- a/driver_library/include/ethosu.hpp +++ b/driver_library/include/ethosu.hpp @@ -180,6 +180,15 @@ private: std::vector ofmDims; }; +enum class InferenceStatus { + OK, + ERROR, + RUNNING, + REJECTED, +}; + +std::ostream &operator<<(std::ostream &out, const InferenceStatus &v); + class Inference { public: template @@ -220,7 +229,7 @@ public: int wait(int64_t timeoutNanos = -1) const; const std::vector getPmuCounters() const; uint64_t getCycleCounter() const; - bool failed() const; + InferenceStatus status() const; int getFd() const; const std::shared_ptr getNetwork() const; std::vector> &getIfmBuffers(); -- cgit v1.2.1