blob: d63e0acc72aa2233a9bed3b3c0c6916435b7382c [file] [log] [blame]
Narumol Prangnawarat867eba52020-02-03 12:29:56 +00001//
Mike Kelly386ff1a2021-03-29 15:04:50 +01002// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
Narumol Prangnawarat867eba52020-02-03 12:29:56 +00003// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include <armnn/Types.hpp>
8
9namespace armnn
10{
11
Mike Kelly386ff1a2021-03-29 15:04:50 +010012namespace experimental
13{
14
15struct WorkingMemDescriptor;
16
17} // end experimental namespace
18
19using namespace armnn::experimental;
20
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000021/// Workload interface to enqueue a layer computation.
22class IWorkload {
23public:
24 virtual ~IWorkload() {}
25
26 virtual void PostAllocationConfigure() = 0;
27
28 virtual void Execute() const = 0;
29
Mike Kelly386ff1a2021-03-29 15:04:50 +010030 virtual void ExecuteAsync(WorkingMemDescriptor& desc) = 0;
31
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000032 virtual profiling::ProfilingGuid GetGuid() const = 0;
33
Teresa Charlin788e2a62022-01-17 21:19:52 +000034 // Replace input tensor handle with the given TensorHandle
35 virtual void ReplaceInputTensorHandle(ITensorHandle* /*input*/, unsigned int /*slot*/) = 0;
36
37 // Replace output tensor handle with the given TensorHandle
38 virtual void ReplaceOutputTensorHandle(ITensorHandle* /*output*/, unsigned int /*slot*/) = 0;
39
Mike Kelly386ff1a2021-03-29 15:04:50 +010040 virtual void RegisterDebugCallback(const DebugCallbackFunction& /*func*/) {}
Narumol Prangnawarat867eba52020-02-03 12:29:56 +000041};
42
43} //namespace armnn