diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/BareMetalDeserializedGraph.cpp | 11 | ||||
-rw-r--r-- | samples/CMakeLists.txt | 42 |
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() - |