diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-01-11 13:25:59 +0000 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-01-15 08:59:50 +0000 |
commit | 4912402497a51c6afe0898b3900f87feefa006a6 (patch) | |
tree | 4e9b5161781d2b0be041aec17227193da5977443 /src/armnn/layers/PreCompiledLayer.hpp | |
parent | d0a1608e2c41639d8f3e3f9305d79c5f92c9cff8 (diff) | |
download | armnn-4912402497a51c6afe0898b3900f87feefa006a6.tar.gz |
IVGCVSW-2454 Merge together the pluggable backends work (was in a
separate branch) and master
* Brings in all the changes done for the pluggable backends
* Added sub-graph support and tests
* Added precompiled layer support and tests
* Moved BackendSettings to a separate file
* Removed the backend-specific code
* Ported DebugLayer and associated functionality
* Included fixes to make those changes work with master
Change-Id: Id7028fa7917527b844628d5aff5732e3d94c0488
Diffstat (limited to 'src/armnn/layers/PreCompiledLayer.hpp')
-rw-r--r-- | src/armnn/layers/PreCompiledLayer.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/armnn/layers/PreCompiledLayer.hpp b/src/armnn/layers/PreCompiledLayer.hpp new file mode 100644 index 0000000000..fd28d0e7a8 --- /dev/null +++ b/src/armnn/layers/PreCompiledLayer.hpp @@ -0,0 +1,42 @@ +// +// Copyright © 2017 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "LayerWithParameters.hpp" +#include <backendsCommon/WorkloadFactory.hpp> + +#include <armnn/Descriptors.hpp> + +#include <memory> + +namespace armnn +{ + +class PreCompiledLayer : public LayerWithParameters<PreCompiledDescriptor> +{ +public: + PreCompiledLayer(const PreCompiledDescriptor& param, const char* name); + ~PreCompiledLayer(); + + virtual std::unique_ptr<IWorkload> CreateWorkload(const Graph& graph, + const IWorkloadFactory& factory) const override; + + PreCompiledLayer* Clone(Graph &graph) const override; + + void ValidateTensorShapesFromInputs() override; + + std::shared_ptr<void> GetPreCompiledObject() const; + + void SetPreCompiledObject(const std::shared_ptr<void>& preCompiledObject); + +private: + PreCompiledLayer(const PreCompiledLayer& other) = delete; + PreCompiledLayer& operator=(const PreCompiledLayer& other) = delete; + + std::shared_ptr<void> m_PreCompiledObject; +}; + +} // namespace armnn |