aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2022-04-12 17:19:28 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2022-04-14 14:06:56 +0000
commite195a0418d86650e132737716059bff0ec80257f (patch)
tree1678283a958a2ab74cd27b648f5a69ef5270d289 /samples
parent69515d3b36653a00a5abee8bf52ac26dd6522bee (diff)
downloadarmnn-e195a0418d86650e132737716059bff0ec80257f.tar.gz
IVGCVSW-6710 Add compile of BareMetalDeserializedGraph sample
Change-Id: Ice69c2a22f589f68d302f80500dfe4e514a796d2 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/BareMetalDeserializedGraph.cpp11
-rw-r--r--samples/CMakeLists.txt42
2 files changed, 35 insertions, 18 deletions
diff --git a/samples/BareMetalDeserializedGraph.cpp b/samples/BareMetalDeserializedGraph.cpp
new file mode 100644
index 0000000000..8b0df5f6dd
--- /dev/null
+++ b/samples/BareMetalDeserializedGraph.cpp
@@ -0,0 +1,11 @@
+//
+// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#include <cstdio>
+
+int main()
+{
+ printf("The bare metal deserialized graph was successfully executed\n");
+ return 0;
+}
diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt
index 210dc9c864..42e5a476cf 100644
--- a/samples/CMakeLists.txt
+++ b/samples/CMakeLists.txt
@@ -1,23 +1,29 @@
-if(BUILD_SAMPLE_APP AND ARMNNREF)
- add_executable(SimpleSample SimpleSample.cpp)
- target_link_libraries(SimpleSample armnn ${CMAKE_THREAD_LIBS_INIT})
+if (NOT BUILD_BARE_METAL)
+ if(BUILD_SAMPLE_APP AND ARMNNREF)
+ add_executable(SimpleSample SimpleSample.cpp)
+ target_link_libraries(SimpleSample armnn ${CMAKE_THREAD_LIBS_INIT})
- add_executable(AsyncExecutionSample AsyncExecutionSample.cpp)
- target_link_libraries(AsyncExecutionSample armnn ${CMAKE_THREAD_LIBS_INIT})
-endif()
+ add_executable(AsyncExecutionSample AsyncExecutionSample.cpp)
+ target_link_libraries(AsyncExecutionSample armnn ${CMAKE_THREAD_LIBS_INIT})
+ endif()
-if(BUILD_SAMPLE_APP AND SAMPLE_DYNAMIC_BACKEND)
- add_executable(DynamicSample DynamicSample.cpp)
- target_link_libraries(DynamicSample armnn ${CMAKE_THREAD_LIBS_INIT})
-endif()
+ if(BUILD_SAMPLE_APP AND SAMPLE_DYNAMIC_BACKEND)
+ add_executable(DynamicSample DynamicSample.cpp)
+ target_link_libraries(DynamicSample armnn ${CMAKE_THREAD_LIBS_INIT})
+ endif()
-if(BUILD_SAMPLE_APP AND ARMCOMPUTECL)
- add_executable(CustomMemoryAllocatorSample CustomMemoryAllocatorSample.cpp)
- target_link_libraries(CustomMemoryAllocatorSample armnn ${CMAKE_THREAD_LIBS_INIT})
-endif()
+ if(BUILD_SAMPLE_APP AND ARMCOMPUTECL)
+ add_executable(CustomMemoryAllocatorSample CustomMemoryAllocatorSample.cpp)
+ target_link_libraries(CustomMemoryAllocatorSample armnn ${CMAKE_THREAD_LIBS_INIT})
+ endif()
-if(BUILD_SAMPLE_APP AND ARMNNREF)
- add_executable(PreImportMemorySample PreImportMemorySample.cpp)
- target_link_libraries(PreImportMemorySample armnn ${CMAKE_THREAD_LIBS_INIT})
+ if(BUILD_SAMPLE_APP AND ARMNNREF)
+ add_executable(PreImportMemorySample PreImportMemorySample.cpp)
+ target_link_libraries(PreImportMemorySample armnn ${CMAKE_THREAD_LIBS_INIT})
+ endif()
+else()
+ if (ARMNNREF)
+ add_executable(BareMetalDeserializedGraph BareMetalDeserializedGraph.cpp)
+ target_link_libraries(BareMetalDeserializedGraph fmt pipeCommon pipeClient armnn)
+ endif()
endif()
-