aboutsummaryrefslogtreecommitdiff
path: root/driver_library/include
diff options
context:
space:
mode:
authorDavide Grohmann <davide.grohmann@arm.com>2022-03-23 12:48:45 +0100
committerDavide Grohmann <davide.grohmann@arm.com>2022-05-05 11:13:04 +0200
commit7e8f508765632c42cc44fd8ad704c9d90943ab32 (patch)
tree42dcfb929accf5470d6aa61810da20356c39eb75 /driver_library/include
parent82d225899bd3d4fd07d70cac80f50c1b288dc4a3 (diff)
downloadethos-u-linux-driver-stack-7e8f508765632c42cc44fd8ad704c9d90943ab32.tar.gz
Add support for inference cancellation
Send cancel inference messages to the ethosu subsystem to abort inference execution there. Also mark inference as aborted in the linux driver stack itself, so pending inference messages are not resent when resetting the firmware. Change-Id: I244c2b119fd7995d14e3859815abf2a00c7f0583
Diffstat (limited to 'driver_library/include')
-rw-r--r--driver_library/include/ethosu.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/driver_library/include/ethosu.hpp b/driver_library/include/ethosu.hpp
index 61e2bc5..da8dbbd 100644
--- a/driver_library/include/ethosu.hpp
+++ b/driver_library/include/ethosu.hpp
@@ -185,6 +185,8 @@ enum class InferenceStatus {
ERROR,
RUNNING,
REJECTED,
+ ABORTED,
+ ABORTING,
};
std::ostream &operator<<(std::ostream &out, const InferenceStatus &v);
@@ -226,9 +228,10 @@ public:
virtual ~Inference() noexcept(false);
- int wait(int64_t timeoutNanos = -1) const;
+ bool wait(int64_t timeoutNanos = -1) const;
const std::vector<uint32_t> getPmuCounters() const;
uint64_t getCycleCounter() const;
+ bool cancel() const;
InferenceStatus status() const;
int getFd() const;
const std::shared_ptr<Network> getNetwork() const;