struct gpr::PhaseTimers

Overview

Process-wide wall-time accumulators for the GP model phases that dominate an outer iteration: training-kernel assembly, stable-basis factorization, and hyperparameter-objective evaluations. More…

#include <gpr/ml/PhaseTimers.h>
 
struct PhaseTimers {
    // typedefs
 
    typedef PhaseTotals Totals;
 
    // fields
 
    static double assembly_seconds = 0.0;
    static double factorization_seconds = 0.0;
    static double objective_seconds = 0.0;
    static int objective_count = 0;
    static long objective_rows = 0;
    static long objective_channels = 0;
    static int gradient_count = 0;
    static int geometry_builds = 0;
    static std::atomic_size_t pair_contraction_tiles = 0;
    static std::atomic_size_t chart_assembly_tiles = 0;
    static double gradient_seconds = 0.0;
    static double gradient_inverse_seconds = 0.0;
    static double gradient_blocks_seconds = 0.0;
    static double gradient_accumulate_seconds = 0.0;
    static int factorization_count = 0;
    static long factorization_rows = 0;
    static double residual_seconds = 0.0;
    static double correction_seconds = 0.0;
    static double pair_objective_seconds = 0.0;
    static double pair_covariance_seconds = 0.0;
    static double pair_contraction_seconds = 0.0;
    static int pair_objective_count = 0;
    static long pair_max_joint_rows = 0;
    static double chart_objective_seconds = 0.0;
    static int chart_objective_count = 0;
    static long chart_max_joint_rows = 0;
    static double support_seconds = 0.0;
    static double support_refit_seconds = 0.0;
    static int support_expansions = 0;
    static int support_refit_count = 0;
    static double projection_assembly_seconds = 0.0;
    static double projection_factor_seconds = 0.0;
    static double projection_cross_seconds = 0.0;
    static double projection_solve_seconds = 0.0;
    static double projection_schur_seconds = 0.0;
    static int projection_count = 0;
    static long projection_max_anchor_rows = 0;
    static double subset_seconds = 0.0;
    static double condition_seconds = 0.0;
    static double cholesky_seconds = 0.0;
    static double eigensolve_seconds = 0.0;
    static double setup_seconds = 0.0;
    static double descriptor_seconds = 0.0;
    static double posterior_seconds = 0.0;
    static double cache_seconds = 0.0;
    static double curvature_seconds = 0.0;
    static double energy_seconds = 0.0;
    static double schedule_seconds = 0.0;
    static double communication_seconds = 0.0;
    static double band_inner_seconds = 0.0;
    static double band_refit_seconds = 0.0;
    static double band_path_seconds = 0.0;
    static double band_predict_seconds = 0.0;
    static long band_predict_count = 0;
    static double band_certificate_seconds = 0.0;
    static double band_drift_seconds = 0.0;
    static double predict_seconds = 0.0;
    static int predict_count = 0;
    static double variance_seconds = 0.0;
    static int variance_count = 0;
    static double oracle_seconds = 0.0;
    static long fit_count = 0;
    static long fit_evaluations = 0;
    static long fit_restarts = 0;
    static long unmoved_fit_count = 0;
    static long unmoved_fit_evaluations = 0;
    static double rss_peak_mb = 0.0;
    static const char* rss_peak_phase = “”;
 
    // methods
 
    static void recordFit(long evaluations, bool unmoved);
    static void recordFitRestart();
    static double residentMegabytes();
    static void notePeak(const char* phase);
    static Totals current();
    static Totals runTotals();
    static void resetRun();
    static void reset();
};

Detailed Documentation

Process-wide wall-time accumulators for the GP model phases that dominate an outer iteration: training-kernel assembly, stable-basis factorization, and hyperparameter-objective evaluations. The outer loop reports and resets them once per iteration. Static so that model copies and parked instances cannot lose the count.

Fields

static std::atomic_size_t pair_contraction_tiles = 0

Configuration pairs contracted by this process, excluding transposes.

static int factorization_count = 0

Stable-basis factorizations since the last reset and the rows they factorized in total: which of a refit’s factorizations are the objective’s subset and which the full-data rebuild.

static double residual_seconds = 0.0

Residual-kernel candidate fits of the active correction.

static double pair_objective_seconds = 0.0

Candidate fits and support expansion have separate scopes. A selected chart can be refitted against a larger support inside the expansion.

static double eigensolve_seconds = 0.0

Stable-basis symmetric eigensolve. Kept apart from the Cholesky factor so a train can name which of the two owns the wall.

static double setup_seconds = 0.0

Model setup before the optimizer, dual-kernel descriptors, and the posterior weights that follow the eigensolve.

static double cache_seconds = 0.0

Inverse-distance cache built once before the hyperparameter fit.

static double curvature_seconds = 0.0

Directional curvature outside the factor, solve, eigen, and kernel walls. Those nested walls stay on their own accumulators.

static double energy_seconds = 0.0

Objective energy outside factor, solve, eigen, kernel, and curvature.

static double schedule_seconds = 0.0

Optimizer outside the named numerical leaves.

static double communication_seconds = 0.0

Energy and gradient allreduces for oracle batches. Excludes model assembly, factorization, prediction, and their internal MPI calls.

static double band_inner_seconds = 0.0

Whole-band outer-loop scopes. These overlap the numerical leaves above: they attribute control phases, while the leaves attribute kernels.

static long fit_count = 0

Hyperparameter fit attempts since resetRun(), with their objective evaluations, retries, and the share spent in fits whose result lies within the optimizer’s step tolerance of their start in every parameter. reset() leaves these alone.

static double rss_peak_mb = 0.0

Peak resident size seen at the end of any timed phase since the last reset (MB), and the phase that set it: where an outer iteration’s memory goes (a refit’s dense temporaries are freed before the outer line is printed, so the per-outer resident size alone hides them).

Methods

static Totals runTotals()

Everything accumulated since the last resetRun(), across reset().