Halide 19.0.0
Halide compiler and libraries
|
The global state of the profiler. More...
#include <HalideRuntime.h>
Public Attributes | |
struct halide_mutex | lock |
Guards access to the fields below. | |
struct halide_profiler_pipeline_stats * | pipelines |
A linked list of stats gathered for each pipeline. | |
struct halide_thread * | sampling_thread |
Retrieve remote profiler state. | |
struct halide_profiler_instance_state * | instances |
The running instances of Halide pipelines. | |
void(* | get_remote_profiler_state )(int *func, int *active_workers) |
If this callback is defined, the profiler asserts that there is a single live instance, and then uses it to get the current func and number of active threads insted of reading the fields in the instance. | |
int | sleep_time |
The amount of time the profiler thread sleeps between samples in microseconds. | |
int | shutdown |
Set to 1 when you want the profiler to wait for all running instances to finish and then stop gracefully. | |
The global state of the profiler.
Definition at line 1961 of file HalideRuntime.h.
struct halide_mutex halide_profiler_state::lock |
Guards access to the fields below.
If not locked, the sampling profiler thread is free to modify things below (including reordering the linked list of pipeline stats).
Definition at line 1965 of file HalideRuntime.h.
struct halide_profiler_pipeline_stats* halide_profiler_state::pipelines |
A linked list of stats gathered for each pipeline.
Definition at line 1968 of file HalideRuntime.h.
struct halide_thread* halide_profiler_state::sampling_thread |
Retrieve remote profiler state.
Used so that the sampling profiler can follow along with execution that occurs elsewhere, e.g. on a DSP. If null, it reads from the int above instead. Sampling thread reference to be joined at shutdown.
Definition at line 1975 of file HalideRuntime.h.
struct halide_profiler_instance_state* halide_profiler_state::instances |
The running instances of Halide pipelines.
Definition at line 1978 of file HalideRuntime.h.
void(* halide_profiler_state::get_remote_profiler_state) (int *func, int *active_workers) |
If this callback is defined, the profiler asserts that there is a single live instance, and then uses it to get the current func and number of active threads insted of reading the fields in the instance.
This is used so that the profiler can follow along with execution that occurs elsewhere (e.g. on an accelerator).
Definition at line 1985 of file HalideRuntime.h.
int halide_profiler_state::sleep_time |
The amount of time the profiler thread sleeps between samples in microseconds.
Defaults to 1000. To change it call halide_profiler_get_state and mutate this field.
Definition at line 1990 of file HalideRuntime.h.
int halide_profiler_state::shutdown |
Set to 1 when you want the profiler to wait for all running instances to finish and then stop gracefully.
Definition at line 1994 of file HalideRuntime.h.