|
| 1 | +From d320a6d1a4c8a73ec3aacce5257edb8eea2c7cd5 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Mergen Nachin <mnachin@meta.com> |
| 3 | +Date: Sun, 11 Feb 2024 15:39:40 -0500 |
| 4 | +Subject: [PATCH] Fix applications/executorch_tests/runner: replace deprecated |
| 5 | + function |
| 6 | + |
| 7 | +--- |
| 8 | + applications/executorch_tests/runner.cpp | 6 +++++- |
| 9 | + 1 file changed, 5 insertions(+), 1 deletion(-) |
| 10 | + |
| 11 | +diff --git a/applications/executorch_tests/runner.cpp b/applications/executorch_tests/runner.cpp |
| 12 | +index 9dc3519..8692a0e 100644 |
| 13 | +--- a/applications/executorch_tests/runner.cpp |
| 14 | ++++ b/applications/executorch_tests/runner.cpp |
| 15 | +@@ -10,6 +10,7 @@ |
| 16 | + #include <memory> |
| 17 | + |
| 18 | + #include <executorch/extension/data_loader/buffer_data_loader.h> |
| 19 | ++#include <executorch/extension/runner_util/inputs.h> |
| 20 | + #include <executorch/runtime/executor/program.h> |
| 21 | + #include <executorch/runtime/platform/log.h> |
| 22 | + #include <executorch/runtime/platform/platform.h> |
| 23 | +@@ -110,7 +111,10 @@ int main() { |
| 24 | + ET_LOG(Info,"Method loaded."); |
| 25 | + |
| 26 | + ET_LOG(Info,"Preparing inputs..."); |
| 27 | +- auto inputs = torch::executor::util::PrepareInputTensors(*method); |
| 28 | ++ auto inputs = torch::executor::util::prepare_input_tensors(*method); |
| 29 | ++ if (!inputs.ok()) { |
| 30 | ++ ET_LOG(Info, "Preparing inputs tensors for method %s failed with status 0x%" PRIx32, method_name, inputs.error()); |
| 31 | ++ } |
| 32 | + ET_LOG(Info,"Input prepared."); |
| 33 | + |
| 34 | + ET_LOG(Info,"Starting the model execution..."); |
| 35 | +-- |
| 36 | +2.31.1 |
0 commit comments