From 7e99fff9a4e516809abe506dcd85fa96070ce3bb Mon Sep 17 00:00:00 2001 From: Koan-Sin Tan Date: Wed, 27 Jun 2018 13:26:46 +0800 Subject: make benchmark_model for tflite build --- tensorflow/contrib/lite/profiling/profile_summarizer.cc | 2 +- tensorflow/contrib/lite/tools/benchmark/benchmark_params.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tensorflow/contrib/lite/profiling/profile_summarizer.cc b/tensorflow/contrib/lite/profiling/profile_summarizer.cc index c37a096588..36e87b666a 100644 --- a/tensorflow/contrib/lite/profiling/profile_summarizer.cc +++ b/tensorflow/contrib/lite/profiling/profile_summarizer.cc @@ -83,7 +83,7 @@ OperatorDetails GetOperatorDetails(const tflite::Interpreter& interpreter, OperatorDetails details; details.name = op_name; if (profiling_string) { - details.name += ":" + string(profiling_string); + details.name += ":" + std::string(profiling_string); } details.inputs = GetTensorNames(interpreter, inputs); details.outputs = GetTensorNames(interpreter, outputs); diff --git a/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h b/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h index 33448dd162..d9471145a9 100644 --- a/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h +++ b/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h @@ -46,11 +46,11 @@ class BenchmarkParam { } virtual ~BenchmarkParam() {} BenchmarkParam(ParamType type) : type_(type) {} + template + static ParamType GetValueType(); private: static void AssertHasSameType(ParamType a, ParamType b); - template - static ParamType GetValueType(); const ParamType type_; }; -- cgit v1.2.3 From 6c4ffe1bee9e7f8e1b181680251898bc842260b1 Mon Sep 17 00:00:00 2001 From: Koan-Sin Tan Date: Mon, 9 Jul 2018 23:39:52 +0800 Subject: move GetValueType() to protected: --- tensorflow/contrib/lite/tools/benchmark/benchmark_params.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h b/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h index d9471145a9..c98f47bb0d 100644 --- a/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h +++ b/tensorflow/contrib/lite/tools/benchmark/benchmark_params.h @@ -31,6 +31,8 @@ class TypedBenchmarkParam; class BenchmarkParam { protected: enum class ParamType { TYPE_INT32, TYPE_FLOAT, TYPE_BOOL, TYPE_STRING }; + template + static ParamType GetValueType(); public: template @@ -46,8 +48,6 @@ class BenchmarkParam { } virtual ~BenchmarkParam() {} BenchmarkParam(ParamType type) : type_(type) {} - template - static ParamType GetValueType(); private: static void AssertHasSameType(ParamType a, ParamType b); -- cgit v1.2.3