ecal.hardware.profiles

Functions

get_profile(name)

Get a hardware profile by name.

list_profiles()

List all available hardware profiles.

Classes

HardwareProfile(name, flops_per_second_fp32, ...)

Hardware profile for energy estimation.

class ecal.hardware.profiles.HardwareProfile(name, flops_per_second_fp32, flops_per_second_fp16, tdp_watts, gpu_power_watts, idle_power_watts, device)[source]

Bases: object

Hardware profile for energy estimation.

Parameters:
  • name (str) – Human-readable device name (e.g. “NVIDIA H100 SXM”).

  • flops_per_second_fp32 (float) – Peak throughput in FLOPS at FP32 precision.

  • flops_per_second_fp16 (float) – Peak throughput in FLOPS at FP16 precision.

  • tdp_watts (float) – Thermal design power in watts; used as the processor’s power draw when converting FLOP-derived time into energy.

  • gpu_power_watts (float) – GPU power draw in watts under load (0 for CPU-only profiles).

  • idle_power_watts (float) – Idle power draw in watts.

  • device (str) – Backend device identifier (e.g. “cpu”, “cuda”, “mps”).

device: str
flops_per_second_fp16: float
flops_per_second_fp32: float
gpu_power_watts: float
idle_power_watts: float
name: str
tdp_watts: float
ecal.hardware.profiles.get_profile(name)[source]

Get a hardware profile by name.

Parameters:

name (str) – Profile identifier (e.g., ‘apple_m2’, ‘nvidia_h100_sxm’, ‘generic_cpu’)

Returns:

HardwareProfile dataclass

Raises:

KeyError – If profile name is not found

Return type:

HardwareProfile

ecal.hardware.profiles.list_profiles()[source]

List all available hardware profiles.

Returns:

Dictionary mapping profile names to HardwareProfile objects

Return type:

Dict[str, HardwareProfile]