IVGCVSW-4582 Undefined reference to GetProfilingService causes failure in the Backend...
authorSadik Armagan <sadik.armagan@arm.com>
Thu, 19 Mar 2020 18:16:46 +0000 (18:16 +0000)
committerJim Flynn <jim.flynn@arm.com>
Fri, 20 Mar 2020 08:40:35 +0000 (08:40 +0000)
* Enable the GetProfilingService() function to BackendProfilingTests and ProfilingTestUtils

Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I32e3625db0f465883f2ec27fb7c2fad4e91b6306

src/armnn/test/RuntimeTests.cpp
src/armnn/test/TestUtils.cpp
src/armnn/test/TestUtils.hpp
src/backends/backendsCommon/test/BackendProfilingTests.cpp
src/profiling/test/ProfilingTestUtils.cpp

index 9ced7e907c7f22f6b9ff01a60436e0df1f06c79a..d5bc26a72e15037582fd4dd3ca7acbe6595dd9f3 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <boost/test/unit_test.hpp>
 #include "RuntimeTests.hpp"
+#include "TestUtils.hpp"
 
 namespace armnn
 {
@@ -30,11 +31,6 @@ void RuntimeLoadedNetworksReserve(armnn::Runtime* runtime)
     runtime->m_LoadedNetworks.reserve(1);
 }
 
-profiling::ProfilingService& GetProfilingService(armnn::Runtime* runtime)
-{
-    return runtime->m_ProfilingService;
-}
-
 }
 
 BOOST_AUTO_TEST_SUITE(Runtime)
index b0ed17e41a732206833f33f8e3b4bd4597d66c0e..8ef820b3d5438b9e047e221970f27a74fe1163e3 100644 (file)
@@ -18,3 +18,13 @@ void Connect(armnn::IConnectableLayer* from, armnn::IConnectableLayer* to, const
     from->GetOutputSlot(fromIndex).Connect(to->GetInputSlot(toIndex));
     from->GetOutputSlot(fromIndex).SetTensorInfo(tensorInfo);
 }
+
+namespace armnn
+{
+
+profiling::ProfilingService& GetProfilingService(armnn::Runtime* runtime)
+{
+    return runtime->m_ProfilingService;
+}
+
+}
\ No newline at end of file
index 9b1a3bf18d89d5584ea92722da050f67a50b67ee..9c5f672a5a23e1ffa9a17e008eef7bf9fb2b63e7 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <armnn/INetwork.hpp>
 #include <Graph.hpp>
+#include <Runtime.hpp>
 
 void Connect(armnn::IConnectableLayer* from, armnn::IConnectableLayer* to, const armnn::TensorInfo& tensorInfo,
              unsigned int fromIndex = 0, unsigned int toIndex = 0);
@@ -47,3 +48,10 @@ bool CheckRelatedLayers(armnn::Graph& graph, const std::list<std::string>& testR
 
     return true;
 }
+
+namespace armnn
+{
+
+profiling::ProfilingService& GetProfilingService(armnn::Runtime* runtime);
+
+} // namespace armnn
\ No newline at end of file
index 1cf67c016db28673a07b017e095847b82ddad0d0..7c78e147331d807f0ae5473c658c47c2a92de354 100644 (file)
@@ -14,7 +14,7 @@
 #include "ProfilingUtils.hpp"
 #include "RequestCounterDirectoryCommandHandler.hpp"
 
-#include <Runtime.hpp>
+#include <test/TestUtils.hpp>
 
 #include <armnn/utility/IgnoreUnused.hpp>
 #include <armnn/BackendId.hpp>
@@ -119,7 +119,6 @@ BOOST_AUTO_TEST_CASE(BackendProfilingCounterRegisterMockBackendTest)
 
     armnn::MockBackendInitialiser initialiser;
     // Create a runtime
-//    armnn::IRuntimePtr runtime(armnn::IRuntime::Create(options));
     armnn::Runtime runtime(options);
 
     // Check if the MockBackends 3 dummy counters {0, 1, 2-5 (four cores)} are registered
index 17291bad64b2a900b4d64e06f3a45f2bcde8e980..325cb401110058569c61d5076516363c2d962a02 100644 (file)
@@ -9,7 +9,8 @@
 #include <armnn/Descriptors.hpp>
 #include <LabelsAndEventClasses.hpp>
 #include <ProfilingService.hpp>
-#include <Runtime.hpp>
+
+#include <test/TestUtils.hpp>
 
 #include <boost/test/unit_test.hpp>
 
@@ -296,7 +297,6 @@ void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId)
     // Create runtime in which test will run
     armnn::IRuntime::CreationOptions options;
     options.m_ProfilingOptions.m_EnableProfiling = true;
-//    armnn::IRuntimePtr runtime(armnn::IRuntime::Create(options));
     armnn::Runtime runtime(options);
 
     // build up the structure of the network