// // Copyright © 2020,2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "UnmapLayer.hpp" #include "LayerCloneBase.hpp" #include #include #include #include namespace armnn { UnmapLayer::UnmapLayer(const char* name) : Layer(1, 0, LayerType::Unmap, name) { } UnmapLayer* UnmapLayer::Clone(Graph& graph) const { return CloneBase(graph, GetName()); } std::unique_ptr UnmapLayer::CreateWorkload(const IWorkloadFactory& factory) const { IgnoreUnused(factory); UnmapQueueDescriptor descriptor; SetAdditionalInfo(descriptor); //This is different from other workloads. Does not get created by the workload factory. return std::make_unique(descriptor, PrepInfoAndDesc(descriptor)); } void UnmapLayer::ValidateTensorShapesFromInputs() { // validates that the input is connected. VerifyLayerConnections(1, CHECK_LOCATION()); if (GetNumOutputSlots() != 0) { throw armnn::LayerValidationException("Output slots must be \"0\" - currently \"" + std::to_string(GetNumOutputSlots()) + "\"."); } } void UnmapLayer::ExecuteStrategy(IStrategy& strategy) const { IgnoreUnused(strategy); throw armnn::Exception("UnmapLayer should not appear in an input graph"); } } // namespace armnn