halide_profiler_pipeline_stats#

struct halide_profiler_pipeline_stats#

Per-pipeline state tracked by the sampling profiler.

These exist in a linked list. The fields aggregate across runs the same way as in halide_profiler_func_stats: time is summed over billed_runs (divide by that for per-run), memory_peak is a maximum (not a sum), the remaining counters are summed over runs (divide by runs for per-run), the active_threads pair is a ready-made average, and memory_current is a live snapshot.

Public Members

uint64_t time#

Total time (nanoseconds) spent in this pipeline, summed across the runs that produced a sample.

Divide by billed_runs for a per-run time.

uint64_t memory_current#

Live heap allocation across this pipeline’s funcs at report time; a snapshot, not aggregated.

uint64_t memory_peak#

The peak heap allocation of funcs in this pipeline: the maximum over all runs (a peak, not a sum).

uint64_t memory_total#

The total memory allocated by funcs in this pipeline, summed across all runs.

Divide by runs for a per-run value.

uint64_t active_threads_numerator#

The average number of thread pool worker threads doing useful work while computing this pipeline is numerator / denominator; the ratio is already an average (do not divide by runs).

uint64_t native_vector_bytes#

The native vector width for the target this pipeline ran on, in bytes.

This is used to drive some performance warnings.

const char *name#

The name of this pipeline.

A global constant string.

struct halide_profiler_func_stats *funcs#

An array containing states for each Func in this pipeline.

void *next#

The next pipeline_stats pointer.

It’s a void * because types in the Halide runtime may not currently be recursive.

int num_funcs#

The number of funcs in this pipeline.

int runs#

The number of times this pipeline has been run.

int billed_runs#

The number of pipeline runs that produced at least one profiler sample.

Runs that completed in less than one sampler tick contribute to runs (and to the per-Func counters) but not to per-Func time accumulation, so this is the correct denominator for time averages.

int samples#

The total number of samples taken inside of this pipeline.

int num_allocs#

The total number of memory allocation of funcs in this pipeline.