Loading...
Searching...
No Matches
Halide::Internal::JSONCompilerLogger Class Reference

JSONCompilerLogger is a basic implementation of the CompilerLogger interface that saves logged data, then logs it all in JSON format in emit_to_stream(). More...

`#include <CompilerLogger.h>`

Inheritance diagram for Halide::Internal::JSONCompilerLogger:

## Public Member Functions

| JSONCompilerLogger ()=default
| 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)
void | record_matched_simplifier_rule (const std::string &rulename, Expr expr) override
| Record when a particular simplifier rule matches.
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.
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_object_code_size (uint64_t bytes) override
| Record total size (in bytes) of final generated object code (e.g., file size of .o output).
void | record_compilation_time (Phase phase, double duration) override
| Record the compilation time (in seconds) for a given phase.
std::ostream & | emit_to_stream (std::ostream &o) override
| Emit all the gathered data to the given stream.
Public Member Functions inherited from Halide::Internal::CompilerLogger
| CompilerLogger ()=default
virtual | ~CompilerLogger ()=default

## Protected Member Functions

void | obfuscate ()
void | emit ()

## Protected Attributes

const std::string | generator_name
const std::string | function_name
const std::string | autoscheduler_name
const Target | target = Target()
const std::string | generator_args
const bool | obfuscate_exprs {false}
std::map< std::string, std::vector< Expr > > | matched_simplifier_rules
std::map< std::string, std::vector< Expr > > | non_monotonic_loop_vars
std::vector< std::pair< Expr, Expr > > | failed_to_prove_exprs
uint64_t | object_code_size {0}
std::map< Phase, double > | compilation_time

## Additional Inherited Members

Public Types inherited from Halide::Internal::CompilerLogger
enum class | Phase { HalideLowering , LLVM }
| The "Phase" of compilation, used for some calls. More...

## Detailed Description

JSONCompilerLogger is a basic implementation of the CompilerLogger interface that saves logged data, then logs it all in JSON format in emit_to_stream().

Definition at line 76 of file CompilerLogger.h.

## Constructor & Destructor Documentation

## JSONCompilerLogger() [1/2]

Halide::Internal::JSONCompilerLogger::JSONCompilerLogger | ( |  | ) |

default

## JSONCompilerLogger() [2/2]

Halide::Internal::JSONCompilerLogger::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 )

References autoscheduler_name, function_name, generator_args, generator_name, obfuscate_exprs, and target.

## Member Function Documentation

## record_matched_simplifier_rule()

void Halide::Internal::JSONCompilerLogger::record_matched_simplifier_rule | ( | const std::string & | rulename,
|  | Expr | expr )

override virtual

Record when a particular simplifier rule matches.

Implements Halide::Internal::CompilerLogger.

## record_non_monotonic_loop_var()

void Halide::Internal::JSONCompilerLogger::record_non_monotonic_loop_var | ( | const std::string & | loop_var,
|  | Expr | expr )

override virtual

Record when an expression is non-monotonic in a loop variable.

Implements Halide::Internal::CompilerLogger.

## record_failed_to_prove()

void Halide::Internal::JSONCompilerLogger::record_failed_to_prove | ( | Expr | failed_to_prove,
|  | Expr | original_expr )

override virtual

Record when can_prove() fails, but cannot find a counterexample.

Implements Halide::Internal::CompilerLogger.

## record_object_code_size()

void Halide::Internal::JSONCompilerLogger::record_object_code_size | ( | uint64_t | bytes | ) |

override virtual

Record total size (in bytes) of final generated object code (e.g., file size of .o output).

Implements Halide::Internal::CompilerLogger.

## record_compilation_time()

void Halide::Internal::JSONCompilerLogger::record_compilation_time | ( | Phase | phase,
|  | double | duration )

override virtual

Record the compilation time (in seconds) for a given phase.

Implements Halide::Internal::CompilerLogger.

## emit_to_stream()

std::ostream & Halide::Internal::JSONCompilerLogger::emit_to_stream | ( | std::ostream & | o | ) |

override virtual

Emit all the gathered data to the given stream.

This may be called multiple times.

Implements Halide::Internal::CompilerLogger.

## obfuscate()

void Halide::Internal::JSONCompilerLogger::obfuscate | ( |  | ) |

protected

## emit()

void Halide::Internal::JSONCompilerLogger::emit | ( |  | ) |

protected

## Member Data Documentation

## generator_name

const std::string Halide::Internal::JSONCompilerLogger::generator_name

protected

Definition at line 97 of file CompilerLogger.h.

Referenced by JSONCompilerLogger().

## function_name

const std::string Halide::Internal::JSONCompilerLogger::function_name

protected

Definition at line 98 of file CompilerLogger.h.

Referenced by JSONCompilerLogger().

## autoscheduler_name

const std::string Halide::Internal::JSONCompilerLogger::autoscheduler_name

protected

Definition at line 99 of file CompilerLogger.h.

Referenced by JSONCompilerLogger().

## target

const Target Halide::Internal::JSONCompilerLogger::target = Target()

protected

Definition at line 100 of file CompilerLogger.h.

Referenced by JSONCompilerLogger().

## generator_args

const std::string Halide::Internal::JSONCompilerLogger::generator_args

protected

Definition at line 101 of file CompilerLogger.h.

Referenced by JSONCompilerLogger().

## obfuscate_exprs

const bool Halide::Internal::JSONCompilerLogger::obfuscate_exprs {false}

protected

Definition at line 102 of file CompilerLogger.h.

Referenced by JSONCompilerLogger().

## matched_simplifier_rules

std::map<std::string, std::vector<Expr> > Halide::Internal::JSONCompilerLogger::matched_simplifier_rules

protected

Definition at line 105 of file CompilerLogger.h.

## non_monotonic_loop_vars

std::map<std::string, std::vector<Expr> > Halide::Internal::JSONCompilerLogger::non_monotonic_loop_vars

protected

Definition at line 108 of file CompilerLogger.h.

## failed_to_prove_exprs

std::vector<std::pair<Expr, Expr> > Halide::Internal::JSONCompilerLogger::failed_to_prove_exprs

protected

Definition at line 111 of file CompilerLogger.h.

## object_code_size

uint64_t Halide::Internal::JSONCompilerLogger::object_code_size {0}

protected

Definition at line 114 of file CompilerLogger.h.

## compilation_time

std::map<Phase, double> Halide::Internal::JSONCompilerLogger::compilation_time

protected

Definition at line 117 of file CompilerLogger.h.

The documentation for this class was generated from the following file:

- src/CompilerLogger.h