diff options
Diffstat (limited to 'tensorflow/tools/tfprof/internal/advisor/checker.h')
-rw-r--r-- | tensorflow/tools/tfprof/internal/advisor/checker.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tensorflow/tools/tfprof/internal/advisor/checker.h b/tensorflow/tools/tfprof/internal/advisor/checker.h index b8b057be5b..3ce80cd8c4 100644 --- a/tensorflow/tools/tfprof/internal/advisor/checker.h +++ b/tensorflow/tools/tfprof/internal/advisor/checker.h @@ -18,27 +18,33 @@ limitations under the License. #include "tensorflow/core/lib/strings/str_util.h" #include "tensorflow/tools/tfprof/internal/tfprof_stats.h" +#include "tensorflow/tools/tfprof/tfprof_options.pb.h" namespace tensorflow { namespace tfprof { -static const char* const kLevel[] = { - "NOTE", // Good to know. - "SUGGEST", // Might get better. - "WARN", // Please do it for better. +// Append only. +static const char* const kCheckers[] = { + "AcceleratorUtilizationChecker", "OperationChecker", + "ExpensiveOperationChecker", + "JobChecker", // Internal checker. }; class Checker { public: - virtual ~Checker(){}; + virtual ~Checker() {} - virtual string name() = 0; + virtual string name() const = 0; - std::vector<string> Run(const TFStats* stats) { return Check(stats); } + AdviceProto::Checker Run(const AdvisorOptionsProto::CheckerOption& options, + const TFStats* stats) { + return Check(options, stats); + } protected: - // Returns a vector of string, each one being an advice. - virtual std::vector<string> Check(const TFStats* stats) = 0; + virtual AdviceProto::Checker Check( + const AdvisorOptionsProto::CheckerOption& options, + const TFStats* stats) = 0; }; } // namespace tfprof } // namespace tensorflow |