From a219a8a82223f49f12e37bc0e49842e22dc5ad77 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Thu, 8 Sep 2022 12:10:56 -0700 Subject: [PATCH] [mlgo][nfc] Set logging level to warning or higher for TFLite --- llvm/lib/Analysis/TFLiteUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/Analysis/TFLiteUtils.cpp b/llvm/lib/Analysis/TFLiteUtils.cpp index 96eabb2..9c43193 100644 --- a/llvm/lib/Analysis/TFLiteUtils.cpp +++ b/llvm/lib/Analysis/TFLiteUtils.cpp @@ -27,6 +27,7 @@ #include "tensorflow/lite/model.h" #include "tensorflow/lite/model_builder.h" #include "tensorflow/lite/op_resolver.h" +#include "tensorflow/lite/logger.h" #include #include @@ -100,6 +101,8 @@ TFModelEvaluatorImpl::TFModelEvaluatorImpl( function_ref GetOutputSpecs, size_t OutputSpecsSize, const char *Tags = "serve") : Input(InputSpecs.size()), Output(OutputSpecsSize) { + // INFO and DEBUG messages could be numerous and not particularly interesting + tflite::LoggerOptions::SetMinimumLogSeverity(tflite::TFLITE_LOG_WARNING); // FIXME: make ErrorReporter a member (may also need subclassing // StatefulErrorReporter) to easily get the latest error status, for // debugging. -- 2.7.4