diff options
author | Colm Donelan <colm.donelan@arm.com> | 2024-05-14 10:26:46 +0100 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2024-05-14 10:26:46 +0100 |
commit | 1358e04de341c4e50c8afcf4227990cce88b7526 (patch) | |
tree | d8ccf2e0122e5c0113c18c9cd15c7c13e905c5b8 /samples | |
parent | 46dee40e2f3c73cdbbcd55954edf64b7d6dc9444 (diff) | |
download | armnn-1358e04de341c4e50c8afcf4227990cce88b7526.tar.gz |
IVGCVSW-8388 Adding missing deprecate flags to sample apps.
The sample apps were not included in the original set of files updates
to account for 24.08 deprecation notices. This cause a nightly failure.
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: Ic96cd3cde383f9f0fd9d1a825b99408f8e17f082
Diffstat (limited to 'samples')
-rw-r--r-- | samples/AsyncExecutionSample.cpp | 2 | ||||
-rw-r--r-- | samples/PreImportMemorySample.cpp | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/samples/AsyncExecutionSample.cpp b/samples/AsyncExecutionSample.cpp index a789aade01..4647c3af75 100644 --- a/samples/AsyncExecutionSample.cpp +++ b/samples/AsyncExecutionSample.cpp @@ -120,8 +120,10 @@ int main() // Lambda function to execute the network. We use it as thread function. auto execute = [&](unsigned int executionIndex) { +ARMNN_NO_DEPRECATE_WARN_BEGIN auto memHandle = run->CreateWorkingMemHandle(networkIdentifier); run->Execute(*memHandle, inputTensors[executionIndex], outputTensors[executionIndex]); +ARMNN_NO_DEPRECATE_WARN_END }; // Prepare some threads and let each execute the network with a different input diff --git a/samples/PreImportMemorySample.cpp b/samples/PreImportMemorySample.cpp index 98f386bfdf..b7263d7d76 100644 --- a/samples/PreImportMemorySample.cpp +++ b/samples/PreImportMemorySample.cpp @@ -88,7 +88,9 @@ int main() // This function performs a thread safe execution of the network. Returns once execution is complete. // Will block until this and any other thread using the same workingMem object completes. // Execute with PreImported inputTensor1 as well as Non-PreImported inputTensor2 +ARMNN_NO_DEPRECATE_WARN_BEGIN runtime->Execute(*memHandle.get(), {}, {{2, outputTensor1}}, importedInputVec /* pre-imported ids */); +ARMNN_NO_DEPRECATE_WARN_END // ImportOutputs separates the importing and mapping of OutputTensors from network execution. // Allowing for a set of OutputTensors to be imported and mapped once, but used in execution many times. @@ -99,8 +101,10 @@ int main() // PreImport outputTensor1 std::vector<ImportedOutputId> importedOutputVec = runtime->ImportOutputs(networkIdentifier1, {output1}); +ARMNN_NO_DEPRECATE_WARN_BEGIN // Execute with Non-PreImported inputTensor1 as well as PreImported inputTensor2 runtime->Execute(*memHandle.get(), {{0, inputTensor1}}, {{2, outputTensor1}}, {1 /* pre-imported id */}); +ARMNN_NO_DEPRECATE_WARN_END // Clear the previously PreImportedInput with the network Id and inputIds returned from ImportInputs() // Note: This will happen automatically during destructor of armnn::LoadedNetwork @@ -110,8 +114,10 @@ int main() // Note: This will happen automatically during destructor of armnn::LoadedNetwork runtime->ClearImportedOutputs(networkIdentifier1, importedOutputVec); +ARMNN_NO_DEPRECATE_WARN_BEGIN // Execute with Non-PreImported inputTensor1, inputTensor2 and the PreImported outputTensor1 runtime->Execute(*memHandle.get(), {{0, inputTensor1}, {1, inputTensor2}}, {{2, outputTensor1}}); +ARMNN_NO_DEPRECATE_WARN_END std::cout << "Your number was " << outputData1.data()[0] << std::endl; |