struct gpr::DeviceResidency

Overview

Process-wide account of where the GP posterior lived during a run of a Kokkos build. More…

#include <gpr/ml/PhaseTimers.h>
 
struct DeviceResidency {
    // enums
 
    enum Reason;
 
    // fields
 
    static std::atomic_size_t conditions = 0;
    static std::atomic_size_t host_fallbacks = 0;
    static std::atomic_size_t factorizations = 0;
    static std::atomic_size_t appends = 0;
    static std::atomic_size_t reuses = 0;
    static std::atomic_size_t gradients = 0;
    static std::atomic_size_t predictions = 0;
    static std::atomic_size_t input_bytes = 0;
    static std::atomic_size_t output_bytes = 0;
    static std::atomic_size_t factor_downloads = 0;
    static std::atomic_size_t factor_download_bytes = 0;
    static std::atomic_size_t coefficient_downloads = 0;
    static std::atomic_size_t coefficient_download_bytes = 0;
    static std::atomic_size_t fallback_reasons[ReasonCount] = {};
    static const char* reason_names[ReasonCount]                                          = {     “no pair kernel”,     “no constant kernel”,     “non-Gaussian likelihood”,     “environment model”,     “stable-basis(HS-SVD) backend”,     “residual correction”,     “manifold chart”,     “geodesic heat kernel”,     “objective other than NLML”,     “length scales not one per pair type”, };
 
    // methods
 
    static std::string report(const char* execution);
    static std::string fallbackReasons();
};

Detailed Documentation

Process-wide account of where the GP posterior lived during a run of a Kokkos build. A fit either conditions the device posterior or, when the model is outside what that posterior supports, falls back to the host factor; host_fallbacks counts the latter, so a run whose GP never reached the device shows it. Bytes are what crossed the host boundary: coordinates, targets and noise in; predictions, scalar derivatives and any downloaded factor or coefficient vector out. A factor or coefficient download means a consumer read host storage, which ends residency for that fit. Static, like PhaseTimers, so model copies cannot lose a count.

Methods

static std::string report(const char* execution)

One line for the drivers’ closing report.

static std::string fallbackReasons()

The properties behind the fallbacks, or nothing when there were none.