Only warn about duplicate flags in debug builds when parsing the tflite tooling commandline flags.

PiperOrigin-RevId: 327382108
Change-Id: I4c582b0ed1c32a8c72e27704e802fadfcf214915
This commit is contained in:
Chao Mei 2020-08-18 23:57:23 -07:00 committed by TensorFlower Gardener
parent 4bb7dca446
commit 576ed353aa

View File

@ -185,7 +185,10 @@ std::string Flag::GetTypeName() const {
const auto it = processed_flags.find(flag.name_);
if (it != processed_flags.end()) {
#ifndef NDEBUG
// Only log this in debug builds.
TFLITE_LOG(WARN) << "Duplicate flags: " << flag.name_;
#endif
if (it->second != -1) {
bool value_parsing_ok;
flag.Parse(argv[it->second], &value_parsing_ok);