tilelang.tools.plot_layout¶

Functions¶

plot_layout(layout[, save_directory, name, colormap, ...])

Plot the layout of a buffer.

plot_fragment_tv(frag[, save_directory, name, ...])

Plot fragment in terms of thread and local index mapping.

Module Contents¶

tilelang.tools.plot_layout.plot_layout(layout, save_directory='./tmp', name='layout', colormap='RdPu', verbose=False, formats='png')¶

Plot the layout of a buffer.

Parameters:
  • layout (T.Layout) – The layout object that describes how indices are mapped.

  • save_directory (str, optional) – The directory where the output images will be saved (default is “./tmp”).

  • name (str, optional) – The base name of the output files (default is “layout”).

  • colormap (str, optional) – The colormap to use for visualization (default is “RdPu”).

  • verbose (bool, optional) – If True, prints additional information about the mapping (default is False).

  • formats (str | list[str], optional) – The formats to save the image in (default is “png”).

Return type:

None

tilelang.tools.plot_layout.plot_fragment_tv(frag, save_directory=None, name='layout', apply_idx_fn=lambda *args: ..., colormap='RdPu', item_scale=0.75, formats='png', dpi=80)¶

Plot fragment in terms of thread and local index mapping. :param frag: The fragment object that describes how indices are mapped. :type frag: T.Fragment :param save_directory: The directory where the output images will be saved. :type save_directory: str | None, optional :param name: The base name of the output files (default is “layout”). :type name: str, optional :param apply_idx_fn: A function to apply to the source indices for labeling (default is identity). :type apply_idx_fn: function, optional :param colormap: The colormap to use for visualization (default is “RdPu”). :type colormap: str, optional :param item_scale: The scale factor for each item in the plot (default is 0.75). :type item_scale: float, optional :param formats: The formats to save the image in (default is “png”). :type formats: str | list[str], optional :param dpi: The resolution in dots per inch for the saved image (default is 80). :type dpi: int, optional

Parameters:
  • frag (tilelang.language.Fragment)

  • save_directory (str | None)

  • name (str)

  • colormap (str)

  • item_scale (float)

  • formats (str | list[str])