diff options
author | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-04-08 09:54:53 +0100 |
---|---|---|
committer | Kshitij Sisodia <kshitij.sisodia@arm.com> | 2022-04-08 12:30:28 +0100 |
commit | 4cc4021d356c174f780be2b7ef96910e36c8dd7b (patch) | |
tree | c2a790b914577873a368982a07a9491f6743443e /tests/use_case/img_class | |
parent | 11b75cc7dc140119dee490f425e25a004122703b (diff) | |
download | ml-embedded-evaluation-kit-4cc4021d356c174f780be2b7ef96910e36c8dd7b.tar.gz |
MLECO-3070: Further HAL cleanup.
Cleaning up HAL sources by removing unnecessary redirections
with function pointers. The "platform packages" under HAL are
now streamlined enough to not need any major HAL wrapping (as
was the case before).
This allows us to have a very thin HAL layer that sits on top
of the platform and compnent packs. Also helps in getting rid
of "hal platform" pointer being passed around in the code to
use any HAL functionality.
Change-Id: I04b2057f972aad7a5cfb4a396bcdf147c9f9ef1c
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'tests/use_case/img_class')
-rw-r--r-- | tests/use_case/img_class/ImgClassificationUCTest.cc | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/tests/use_case/img_class/ImgClassificationUCTest.cc b/tests/use_case/img_class/ImgClassificationUCTest.cc index 62d8eb8..b9caf61 100644 --- a/tests/use_case/img_class/ImgClassificationUCTest.cc +++ b/tests/use_case/img_class/ImgClassificationUCTest.cc @@ -43,12 +43,8 @@ TEST_CASE("Model info") TEST_CASE("Inference by index", "[.]") { - hal_platform platform; - platform_timer timer; - /* Initialise the HAL and platform. */ - hal_init(&platform, &timer); - hal_platform_init(&platform); + hal_platform_init(); /* Model wrapper object. */ arm::app::MobileNetModel model; @@ -59,9 +55,8 @@ TEST_CASE("Inference by index", "[.]") /* Instantiate application context. */ arm::app::ApplicationContext caseContext; - arm::app::Profiler profiler{&platform, "img_class"}; + arm::app::Profiler profiler{"img_class"}; caseContext.Set<arm::app::Profiler&>("profiler", profiler); - caseContext.Set<hal_platform&>("platform", platform); caseContext.Set<arm::app::Model&>("model", model); caseContext.Set<uint32_t>("imgIndex", 0); arm::app::Classifier classifier; /* Classifier wrapper object. */ @@ -81,12 +76,8 @@ TEST_CASE("Inference by index", "[.]") TEST_CASE("Inference run all images", "[.]") { - hal_platform platform; - platform_timer timer; - /* Initialise the HAL and platform. */ - hal_init(&platform, &timer); - hal_platform_init(&platform); + hal_platform_init(); /* Model wrapper object. */ arm::app::MobileNetModel model; @@ -97,9 +88,8 @@ TEST_CASE("Inference run all images", "[.]") /* Instantiate application context. */ arm::app::ApplicationContext caseContext; - arm::app::Profiler profiler{&platform, "img_class"}; + arm::app::Profiler profiler{"img_class"}; caseContext.Set<arm::app::Profiler&>("profiler", profiler); - caseContext.Set<hal_platform&>("platform", platform); caseContext.Set<arm::app::Model&>("model", model); caseContext.Set<uint32_t>("imgIndex", 0); arm::app::Classifier classifier; /* classifier wrapper object. */ @@ -115,12 +105,8 @@ TEST_CASE("Inference run all images", "[.]") TEST_CASE("List all images") { - hal_platform platform; - platform_timer timer; - /* Initialise the HAL and platform. */ - hal_init(&platform, &timer); - hal_platform_init(&platform); + hal_platform_init(); /* Model wrapper object. */ arm::app::MobileNetModel model; @@ -130,8 +116,6 @@ TEST_CASE("List all images") /* Instantiate application context. */ arm::app::ApplicationContext caseContext; - - caseContext.Set<hal_platform&>("platform", platform); caseContext.Set<arm::app::Model&>("model", model); REQUIRE(arm::app::ListFilesHandler(caseContext)); |