ArmNN
 22.02
NeonBackendTests.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include <neon/NeonBackend.hpp>
8 
9 #include <doctest/doctest.h>
10 
11 using namespace armnn;
12 
13 TEST_SUITE("NeonBackendTests")
14 {
15 TEST_CASE("NeonRegisterTensorHandleFactoriesMatchingImportFactoryId")
16 {
17  auto neonBackend = std::make_unique<NeonBackend>();
19  neonBackend->RegisterTensorHandleFactories(registry);
20 
21  // When calling RegisterTensorHandleFactories, CopyAndImportFactoryPair is registered
22  // Get matching import factory id correctly
23  CHECK((registry.GetMatchingImportFactoryId(NeonTensorHandleFactory::GetIdStatic()) ==
25 }
26 
27 TEST_CASE("NeonCreateWorkloadFactoryMatchingImportFactoryId")
28 {
29  auto neonBackend = std::make_unique<NeonBackend>();
31  neonBackend->CreateWorkloadFactory(registry);
32 
33  // When calling CreateWorkloadFactory, CopyAndImportFactoryPair is registered
34  // Get matching import factory id correctly
35  CHECK((registry.GetMatchingImportFactoryId(NeonTensorHandleFactory::GetIdStatic()) ==
37 }
38 
39 TEST_CASE("NeonCreateWorkloadFactoryWithOptionsMatchingImportFactoryId")
40 {
41  auto neonBackend = std::make_unique<NeonBackend>();
43  ModelOptions modelOptions;
44  neonBackend->CreateWorkloadFactory(registry, modelOptions);
45 
46  // When calling CreateWorkloadFactory with ModelOptions, CopyAndImportFactoryPair is registered
47  // Get matching import factory id correctly
48  CHECK((registry.GetMatchingImportFactoryId(NeonTensorHandleFactory::GetIdStatic()) ==
50 }
51 }
TEST_SUITE("TestConstTensorLayerVisitor")
std::vector< BackendOptions > ModelOptions
Copyright (c) 2021 ARM Limited and Contributors.
static const FactoryId & GetIdStatic()