aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTestUtils/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2022-02-11 08:29:42 +0000
committerMatthew Bentham <matthew.bentham@arm.com>2022-02-11 12:29:03 +0000
commit79bb6531358d5a780e8e86bce99fd39ae847c2f4 (patch)
treec818b67a263194947ba2181aa3b42de7ff86fc6e /src/armnnTestUtils/CMakeLists.txt
parentbfa767ca56f9776e7dd3eecb4025cfeed87f9936 (diff)
downloadarmnn-79bb6531358d5a780e8e86bce99fd39ae847c2f4.tar.gz
Fix unit test where NeonMemoryManager was used instead of RefMemoryManager
Although the Neon and Ref backends can use each other's TensorHandles, their TensorHandleFactories can't use each other's MemoryManagers. Incorrectly passing the NeonMemoryManager to the RefTensorHandleFactory in unit test utility code resulted in an incorrect static_pointer_cast and a warning from the Undefined Behaviour Sanitizer. This change fixes the test code, and replaces use of static_pointer_cast with armnn::PolymorphicPointerDowncast which will check that the cast is legal in debug builds. Also, remove MockWorkloadFactoryHelper.hpp as it is unused. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I2b425e86fccacd7cc5ff186521fc6e53e7e50c77
Diffstat (limited to 'src/armnnTestUtils/CMakeLists.txt')
-rwxr-xr-xsrc/armnnTestUtils/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/armnnTestUtils/CMakeLists.txt b/src/armnnTestUtils/CMakeLists.txt
index e33fed77d7..061dd90d3d 100755
--- a/src/armnnTestUtils/CMakeLists.txt
+++ b/src/armnnTestUtils/CMakeLists.txt
@@ -11,7 +11,6 @@ list(APPEND armnnTestUtils_sources
../../include/armnnTestUtils/MockBackend.hpp
../../include/armnnTestUtils/MockMemoryManager.hpp
../../include/armnnTestUtils/MockTensorHandle.hpp
- ../../include/armnnTestUtils/MockWorkloadFactoryHelper.hpp
../../include/armnnTestUtils/PredicateResult.hpp
../../include/armnnTestUtils/TensorCopyUtils.hpp
../../include/armnnTestUtils/WorkloadTestUtils.hpp
@@ -57,4 +56,4 @@ install(TARGETS armnnTestUtils
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-add_library(Armnn::armnnTestUtils ALIAS armnnTestUtils) \ No newline at end of file
+add_library(Armnn::armnnTestUtils ALIAS armnnTestUtils)