aboutsummaryrefslogtreecommitdiff
path: root/src/backends/tosaReference/workloads/TosaRefPreCompiledWorkload.hpp
blob: 30972693de43c60b0432a204bbc6f4a3b29364a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include "armnn/backends/Workload.hpp"

#include <memory>
#include <string>
#include <vector>

namespace armnn
{

bool TosaRefPreCompiledWorkloadValidate(std::string* reasonIfUnsupported);

class TosaRefPreCompiledWorkload : public BaseWorkload<PreCompiledQueueDescriptor>
{
public:
    TosaRefPreCompiledWorkload(const PreCompiledQueueDescriptor& descriptor,
                               const WorkloadInfo& info);
    void Execute() const override;

private:
    bool SupportsTensorHandleReplacement() const override
    {
        return true;
    }

    void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
    {
        this->m_Data.m_Inputs[slot] = tensorHandle;
    }

    void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override
    {
        this->m_Data.m_Outputs[slot] = tensorHandle;
    }
};

}    //namespace armnn