|
pulsatrix
|
Classes | |
| struct | AmdGpuDevice |
| One AMD GPU found under <sys_root>/class/drm. More... | |
| struct | ASHACandidate |
| struct | CpuTimes |
| Aggregate CPU time counters (any consistent unit). busy = total - idle - iowait. More... | |
| class | LinuxSources |
| Linux /proc + /sys parsers rooted at configurable directories so tests can point them at a fake tree. Pure file parsing: compiles (and is unit-testable) everywhere. More... | |
| class | PlatformSources |
| Where SystemMonitor reads from. Implementations must make read() thread-safe. More... | |
| struct | RawReading |
| Raw counters/levels from one platform read; rates are derived by SystemMonitor. More... | |
Functions | |
| std::string | module_type_name (const Module &module) |
| The dynamic type's readable name (e.g. "pulsatrix::SoftmaxModule"), for error messages. | |
| double | Sigmoid (double x) |
| double | BinomialCoefficient (int64_t n, int64_t k) |
| Binomial coefficient C(n,k), computed iteratively to avoid factorial overflow. | |
| float | ShapKernelWeight (int64_t n, int64_t coalition_size) |
| The SHAP kernel pi(z') = (n-1) / [C(n,|z'|) * |z'| * (n-|z'|)], for 1 <= |z'| <= n-1. | |
| std::unique_ptr< PlatformSources > | make_host_sources () |
| The sources for the host this binary runs on (Linux/Windows + NVML, or a stub). | |
| std::optional< double > | cpu_percent_from_deltas (const CpuTimes &previous, const CpuTimes ¤t) |
| Utilization in percent from two counter readings; nullopt if no time elapsed. | |
| std::string | json_escape (const std::string &text) |
| JSON string-literal body escaping (quotes, backslash, control characters). | |
| std::string | format_number (double value) |
| Number as a JSON/CSV token: integral values without decimals, else 3 decimals; non-finite -> "". | |
| std::string | mark_to_json (std::chrono::system_clock::time_point timestamp, double elapsed_seconds, const std::string &label) |
The "event":"mark" JSON Lines record. | |
| std::string | csv_header (std::size_t gpu_count) |
CSV header for gpu_count GPUs (columns gpu_util, gpu_mem_used, ...). | |
| std::string | sample_to_csv (const SystemSample &sample, std::size_t gpu_count) |
One CSV data row for sample; GPU columns beyond those present are empty. | |
| std::string | mark_to_csv (std::chrono::system_clock::time_point timestamp, double elapsed_seconds, const std::string &label, std::size_t gpu_count) |
One CSV mark row (only event, timestamp, elapsed_seconds and label filled). | |
|
inline |
Binomial coefficient C(n,k), computed iteratively to avoid factorial overflow.
| std::optional< double > pulsatrix::detail::cpu_percent_from_deltas | ( | const CpuTimes & | previous, |
| const CpuTimes & | current | ||
| ) |
Utilization in percent from two counter readings; nullopt if no time elapsed.
| std::string pulsatrix::detail::csv_header | ( | std::size_t | gpu_count | ) |
CSV header for gpu_count GPUs (columns gpu_util, gpu_mem_used, ...).
| std::string pulsatrix::detail::format_number | ( | double | value | ) |
Number as a JSON/CSV token: integral values without decimals, else 3 decimals; non-finite -> "".
| std::string pulsatrix::detail::json_escape | ( | const std::string & | text | ) |
JSON string-literal body escaping (quotes, backslash, control characters).
| std::unique_ptr< PlatformSources > pulsatrix::detail::make_host_sources | ( | ) |
The sources for the host this binary runs on (Linux/Windows + NVML, or a stub).
| std::string pulsatrix::detail::mark_to_csv | ( | std::chrono::system_clock::time_point | timestamp, |
| double | elapsed_seconds, | ||
| const std::string & | label, | ||
| std::size_t | gpu_count | ||
| ) |
One CSV mark row (only event, timestamp, elapsed_seconds and label filled).
| std::string pulsatrix::detail::mark_to_json | ( | std::chrono::system_clock::time_point | timestamp, |
| double | elapsed_seconds, | ||
| const std::string & | label | ||
| ) |
The "event":"mark" JSON Lines record.
|
inline |
The dynamic type's readable name (e.g. "pulsatrix::SoftmaxModule"), for error messages.
| std::string pulsatrix::detail::sample_to_csv | ( | const SystemSample & | sample, |
| std::size_t | gpu_count | ||
| ) |
One CSV data row for sample; GPU columns beyond those present are empty.
|
inline |
The SHAP kernel pi(z') = (n-1) / [C(n,|z'|) * |z'| * (n-|z'|)], for 1 <= |z'| <= n-1.
|
inline |