diff options
Diffstat (limited to 'src/backends/tosaReference/test/TosaRefLayerSupportTests.cpp')
-rw-r--r-- | src/backends/tosaReference/test/TosaRefLayerSupportTests.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/backends/tosaReference/test/TosaRefLayerSupportTests.cpp b/src/backends/tosaReference/test/TosaRefLayerSupportTests.cpp index 6f038ab69b..2da2875a76 100644 --- a/src/backends/tosaReference/test/TosaRefLayerSupportTests.cpp +++ b/src/backends/tosaReference/test/TosaRefLayerSupportTests.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -287,6 +287,46 @@ TEST_CASE("IsLayerSupportedTosaReferenceAvgPooling2d_IgnoreValue") CHECK(supported); } +TEST_CASE("IsLayerSupportedTosaReferenceLeakyReLuActivation") +{ + TensorInfo inputInfo1({1,1,3,4}, DataType::Float32); + TensorInfo inputInfo2({1,1,3,4}, DataType::Float32); + TensorInfo outputInfo({1,1,3,4}, DataType::Float32); + + TosaRefLayerSupport supportChecker; + std::string reasonIfNotSupported; + ActivationDescriptor descriptor; + descriptor.m_Function = ActivationFunction::LeakyReLu; + auto supported = supportChecker.IsLayerSupported(LayerType::Activation, + {inputInfo1, inputInfo2, outputInfo}, + descriptor, + EmptyOptional(), + EmptyOptional(), + reasonIfNotSupported); + + CHECK(supported); +} + +TEST_CASE("IsLayerSupportedTosaReferenceActivationUnsupported") +{ + TensorInfo inputInfo1({1,1,3,4}, DataType::Float32); + TensorInfo inputInfo2({1,1,3,4}, DataType::Float32); + TensorInfo outputInfo({1,1,3,4}, DataType::Float32); + + TosaRefLayerSupport supportChecker; + std::string reasonIfNotSupported; + ActivationDescriptor descriptor; + descriptor.m_Function = ActivationFunction::HardSwish; + auto supported = supportChecker.IsLayerSupported(LayerType::Activation, + {inputInfo1, inputInfo2, outputInfo}, + descriptor, + EmptyOptional(), + EmptyOptional(), + reasonIfNotSupported); + + CHECK(!supported); +} + TEST_CASE("IsLayerSupportedTosaReferenceMaxPooling2dUnsupported") { TensorShape inShape = {1,1,3,4}; |