accelforge.plotting package#

Submodules#

accelforge.plotting.mappings module#

accelforge.plotting.mappings.plot_action_breakdown(mappings, separate_by, stack_by=None, labels=None)[source]#

Plot actions breakdown.

Parameters:
  • mappings (Iterable[Mappings] | Mappings) – A mapping to plot or an iterable of mappings to plot. Each mapping will be plotted in a new subplot.

  • labels (Iterable[str]) – Labels to use for each Mapping class in mappings.

  • separate_by (Sequence[str]) – A list that has elements in {“einsum”, “tensor”, “component”, “action”}. Different bars will be created based on separate_by. The order from left to right will determine grouping of the breakdown.

  • stack_by (Sequence[str]) – A list that has elements in {“einsum”, “tensor”, “component”, “action”}. Different components in a stacked bar will be created based on stack_by. By default, will stack actions.

accelforge.plotting.mappings.plot_energy_breakdown(mappings, separate_by, stack_by=None, labels=None)[source]#

Plot energy breakdown.

Parameters:
  • mappings (Iterable[Mappings] | Mappings) – A mapping to plot or an iterable of mappings to plot. Each mapping will be plotted in a new subplot.

  • labels (Iterable[str]) – Labels to use for each Mapping class in mappings.

  • separate_by (Sequence[str]) – A list that has elements in {“einsum”, “tensor”, “component”, “action”}. Different bars will be created based on separate_by. The order from left to right will determine grouping of the breakdown.

  • stack_by (Sequence[str]) – A list that has elements in {“einsum”, “tensor”, “component”, “action”}. Different components in a stacked bar will be created based on stack_by.

accelforge.plotting.mappings.plot_energy_comparison(mappings, labels=None)[source]#

Plot energy comparison of multiple mappings.

Parameters:
  • mappings (Iterable[Mappings] | Mappings) – A mapping to plot or an iterable of mappings to plot.

  • labels – Labels to use for each Mapping class in mappings.

accelforge.plotting.mappings.plot_latency_comparison(mappings, labels=None)[source]#

Plot latency comparison of multiple mappings.

Parameters:
  • mappings (Iterable[Mappings] | Mappings) – A mapping to plot or an iterable of mappings to plot.

  • labels – Labels to use for each Mapping class in mappings.

accelforge.plotting.specs module#

accelforge.plotting.specs.plot_area(specs, labels=None, ax=None)[source]#

Plot area of one or more specs.

Parameters:
  • specs (Iterable[Spec]) – An iterable of specifications.

  • labels (Iterable[str]) – An iterable of the same length as specs to use as labels in the plot.

  • ax (Axes) – An matplotlib Axes to use. A new one is created by default.

Module contents#