Skip to content
Projects

scope_profiler.plotting_scripts.likwid

LIKWID hardware-counter bar charts.

Functions

NameDescription
available_likwid_metricsList the LIKWID metric/event names available for :func:plot_likwid.
plot_likwidPlot one LIKWID derived metric or raw event, grouped by region and rank.

available_likwid_metricsfunction#

def available_likwid_metrics(profiling_data: ProfilingResults | Sequence[ProfilingResults]) -> list[str]

List the LIKWID metric/event names available for :func:plot_likwid.

Union over every run, rank and region, in the order LIKWID reported them (derived metrics first, then raw events) - so a caller who does not know what a run measured can list the valid metric values before plotting.

plot_likwidfunction#

def plot_likwid(profiling_data: ProfilingResults | Sequence[ProfilingResults], metric: str, ranks: list[int] | int | None = None, include: list[str] | str | None = None, exclude: list[str] | str | None = None, labels: Sequence[str] | None = None, filepath: str | None = None, show: bool = False, verbose: bool = True, cmap: str = DEFAULT_CMAP, log_scale: bool = False, data_filepath: str | Path | None = None, data_format: str = 'csv', backend: str = 'matplotlib') -> None

Plot one LIKWID derived metric or raw event, grouped by region and rank.

LIKWID counters are otherwise only visible as text tables (:func:~scope_profiler.summary.print_likwid_tables); this gives the same numbers a bar chart, one group of bars per region and one bar per rank, so a metric like memory bandwidth or CPI can be compared across regions (or across files, for a single rank) the same way :func:plot_durations compares timings.

Parameters

metric : str Name of a LIKWID derived metric (e.g. "CPI") or raw event/event label (e.g. "CAS_COUNT_RD"). See :func:available_likwid_metrics for the names a run actually recorded. backend : str Backend to use for rendering: “matplotlib” (default) or “plotly”.