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
committerColm Donelan <colm.donelan@arm.com>2022-02-15 21:22:03 +0000
commit1855c6b2d21c04d054f6ebd1160c70c669e92a07 (patch)
treed8976d2fa554b2b68838ccda9e3efcce6f6740c6 /src/armnnTestUtils/CMakeLists.txt
parenteef6b76fedad6ba812c4eae74266c2828f9e8de4 (diff)
downloadarmnn-1855c6b2d21c04d054f6ebd1160c70c669e92a07.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)