From 102e0442d89df080da69924b1cae8f04c9665a1a Mon Sep 17 00:00:00 2001 From: Michael Butler Date: Wed, 27 Mar 2019 10:59:25 -0700 Subject: [PATCH] Propagate ANNMemory_free to IBurstContext::freeMemory -- VTS update This CL adapts the VTS code to the corresponding changes made in the NN utility library. Bug: 128319484 Test: mma Test: atest VtsHalNeuralnetworksV1_0Target Test: atest VtsHalNeuralnetworksV1_1Target Test: atest VtsHalNeuralnetworksV1_2Target Change-Id: I470e8228cde2b75620ad851e4fe408f8e8329e7c --- neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp | 4 ++-- neuralnetworks/1.2/vts/functional/ValidateRequest.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp index 9c9779a859..c819b52b8f 100644 --- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp +++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp @@ -125,7 +125,7 @@ static std::unique_ptr<::android::nn::ExecutionBurstController> CreateBurst( ADD_FAILURE() << "asking for burst execution at V1_0"; return nullptr; } -static std::unique_ptr<::android::nn::ExecutionBurstController> CreateBurst( +static std::shared_ptr<::android::nn::ExecutionBurstController> CreateBurst( const sp& preparedModel) { return ::android::nn::ExecutionBurstController::create(preparedModel, /*blocking=*/true); } @@ -286,7 +286,7 @@ void EvaluatePreparedModel(sp& preparedModel, std::function controller = + const std::shared_ptr<::android::nn::ExecutionBurstController> controller = CreateBurst(preparedModel); ASSERT_NE(nullptr, controller.get()); diff --git a/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp b/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp index 09e26cc1ad..870d01748a 100644 --- a/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp +++ b/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp @@ -155,7 +155,7 @@ static void validate(const sp& preparedModel, const std::string& SCOPED_TRACE(message + " [burst]"); // create burst - std::unique_ptr<::android::nn::ExecutionBurstController> burst = + std::shared_ptr<::android::nn::ExecutionBurstController> burst = ::android::nn::ExecutionBurstController::create(preparedModel, /*blocking=*/true); ASSERT_NE(nullptr, burst.get());