ml: use flat_map for libchrome uprev
Replace std::unordered_map by (identical alias template with forward
compatibility patch) base::flat_map in GraphExecutorImpl::Execute.
BUG=chromium:909719
TEST=emerge and cros_run_unit_tests ml
Change-Id: I60da2e41b3cdc82af56698a1b7f61b267e0a9f5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1966548
Tested-by: Grace Cham <hscham@chromium.org>
Reviewed-by: Xinglong Luan <alanlxl@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Qijiang Fan <fqj@google.com>
Commit-Queue: Grace Cham <hscham@chromium.org>
diff --git a/ml/graph_executor_impl.h b/ml/graph_executor_impl.h
index 5b5ce0f..85cf847 100644
--- a/ml/graph_executor_impl.h
+++ b/ml/graph_executor_impl.h
@@ -8,10 +8,10 @@
#include <map>
#include <memory>
#include <string>
-#include <unordered_map>
#include <vector>
#include <base/callback_forward.h>
+#include <base/containers/flat_map.h>
#include <base/macros.h>
#include <mojo/public/cpp/bindings/binding.h>
#include <tensorflow/lite/model.h>
@@ -54,8 +54,8 @@
private:
// chromeos::machine_learning::mojom::GraphExecutor:
void Execute(
- std::unordered_map<std::string,
- chromeos::machine_learning::mojom::TensorPtr> inputs,
+ base::flat_map<std::string,
+ chromeos::machine_learning::mojom::TensorPtr> inputs,
const std::vector<std::string>& output_names,
const ExecuteCallback& callback);