kernelfoundry.eval_pipeline.utils.performance_analysis¶
Helper functions for analyzing performance data from profilers like Unitrace
Functions
|
Calculates the arithmetic intensity for a given series (row) of metrics. |
|
Returns the median row based on the specified column. |
|
Calculates the roofline points given max memory bandwidth and max compute. |
|
Uses the cpu and gpu names of the eval worker to lookup the hardware roofs :param worker_info: The worker info dictionary. |
|
Returns the row with the closest value to the target_value in the specified column. |
- kernelfoundry.eval_pipeline.utils.performance_analysis.get_roofs(worker_info: dict) HardwareRoofs | None[source]¶
Uses the cpu and gpu names of the eval worker to lookup the hardware roofs :param worker_info: The worker info dictionary. With information about the cpu and gpu of the worker.
- Returns:
The hardware roofs or None if not found.
- Return type:
HardwareRoofs | None
- kernelfoundry.eval_pipeline.utils.performance_analysis.compute_arithmic_intensity(series: Series, compute_metric='XVE_INST_EXECUTED_FP32[events]', mem_metrics: tuple[str, str] | None = None)[source]¶
Calculates the arithmetic intensity for a given series (row) of metrics. :param series: A row from the metrics DataFrame. :type series: pd.Series :param compute_metric: The compute metric to use. :type compute_metric: str
- Returns:
The arithmetic intensity (compute / memory).
- Return type:
- kernelfoundry.eval_pipeline.utils.performance_analysis.get_roofline_points(max_mem_bw: float, max_compute: float, min_value: float = 0.001) tuple[tuple[float, float], tuple[float, float]][source]¶
Calculates the roofline points given max memory bandwidth and max compute. :param max_mem_bw: Maximum memory bandwidth. :type max_mem_bw: float :param max_compute: Maximum compute. :type max_compute: float :param min_value: Minimum value for the x-axis. Default is 0.001 to avoid log(0) issues. :type min_value: float
- Returns:
Two tuples representing the start and end points of the diagonal part of the roofline.
- Return type: