1#ifndef HALIDE_COMPILER_LOGGER_H_
2#define HALIDE_COMPILER_LOGGER_H_
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Defines the structure that describes a Halide target.
virtual std::ostream & emit_to_stream(std::ostream &o)=0
Emit all the gathered data to the given stream.
Phase
The "Phase" of compilation, used for some calls.
virtual void record_matched_simplifier_rule(const std::string &rulename, Expr expr)=0
Record when a particular simplifier rule matches.
virtual void record_non_monotonic_loop_var(const std::string &loop_var, Expr expr)=0
Record when an expression is non-monotonic in a loop variable.
virtual void record_object_code_size(uint64_t bytes)=0
Record total size (in bytes) of final generated object code (e.g., file size of .o output).
virtual void record_failed_to_prove(Expr failed_to_prove, Expr original_expr)=0
Record when can_prove() fails, but cannot find a counterexample.
virtual ~CompilerLogger()=default
virtual void record_compilation_time(Phase phase, double duration)=0
Record the compilation time (in seconds) for a given phase.
JSONCompilerLogger is a basic implementation of the CompilerLogger interface that saves logged data,...
const std::string autoscheduler_name
void record_matched_simplifier_rule(const std::string &rulename, Expr expr) override
Record when a particular simplifier rule matches.
JSONCompilerLogger()=default
void record_object_code_size(uint64_t bytes) override
Record total size (in bytes) of final generated object code (e.g., file size of .o output).
std::map< std::string, std::vector< Expr > > matched_simplifier_rules
uint64_t object_code_size
void record_non_monotonic_loop_var(const std::string &loop_var, Expr expr) override
Record when an expression is non-monotonic in a loop variable.
const bool obfuscate_exprs
std::map< std::string, std::vector< Expr > > non_monotonic_loop_vars
std::map< Phase, double > compilation_time
const std::string generator_args
const std::string function_name
JSONCompilerLogger(const std::string &generator_name, const std::string &function_name, const std::string &autoscheduler_name, const Target &target, const std::string &generator_args, bool obfuscate_exprs)
std::vector< std::pair< Expr, Expr > > failed_to_prove_exprs
std::ostream & emit_to_stream(std::ostream &o) override
Emit all the gathered data to the given stream.
void record_failed_to_prove(Expr failed_to_prove, Expr original_expr) override
Record when can_prove() fails, but cannot find a counterexample.
void record_compilation_time(Phase phase, double duration) override
Record the compilation time (in seconds) for a given phase.
const std::string generator_name
std::unique_ptr< CompilerLogger > set_compiler_logger(std::unique_ptr< CompilerLogger > compiler_logger)
Set the active CompilerLogger object, replacing any existing one.
CompilerLogger * get_compiler_logger()
Return the currently active CompilerLogger object.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
unsigned __INT64_TYPE__ uint64_t
A fragment of Halide syntax.
A struct representing a target machine and os to generate code for.