Skip to main content

A simple roofline plotter for visualizing performance data

Project description

Roofline Model Visualization Package

A Python class for generating roofline model plots with customizable data points and performance ceilings, mainly written by DeepSeek-r1

Installation

pip install roofline-plotter

Basic Usage

import pathlib
from roofline import Roofline

# Initialize plotter
rl = Roofline()

# Configure units and performance limits
rl.set_units("FLOPS", "bytes")
rl.set_ideal(max_arith=100, max_bandwidth=50)  # Your hardware limits

# Add data points
rl.add_point(80, 2, category="Kernel A")
rl.add_point(45, 1.5, category="Kernel B")

# Generate plot
rl.plot(pathlib.Path("roofline_plot.pdf"))

Customization

Category Colors

rl.set_palette({
    "Kernel A": "#FF5733",
    "Kernel B": "#33FF57",
    "Optimized": "#3357FF"
})

API Reference

Roofline Class Methods

  • set_units(arith_unit: str, data_unit: str)
    Set measurement units for axes labels

  • set_ideal(max_arith: float, max_bandwidth: float)
    Define performance ceilings (arithmetic intensity vs bandwidth)

  • add_point(throughput: float, data_amount: float, category: str)
    Add a benchmark result with classification

  • set_palette(palette: dict)
    Customize category colors {category_name: hex_color}

  • plot(figure_path: pathlib.Path)
    Generate and save PDF plot with current configuration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roofline_plotter-0.1.1.post0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roofline_plotter-0.1.1.post0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file roofline_plotter-0.1.1.post0.tar.gz.

File metadata

  • Download URL: roofline_plotter-0.1.1.post0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for roofline_plotter-0.1.1.post0.tar.gz
Algorithm Hash digest
SHA256 04405f9a33d62e9cc5eef653b8cf82e4167e38664a5cf0f77e0bb79663e3eb0b
MD5 3dbd556e1622725aa0e329a435c803f2
BLAKE2b-256 f822662daf11374c3d206de7440ba3fbc1e743e89cceb00f8dc8d4df18d0e3cb

See more details on using hashes here.

File details

Details for the file roofline_plotter-0.1.1.post0-py3-none-any.whl.

File metadata

File hashes

Hashes for roofline_plotter-0.1.1.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0aa0dec2e7723312039ca958768f801c33e4b361e62aa0e5ace778fe1be226d
MD5 2ce2575bc2808d7e50200f7b203234fd
BLAKE2b-256 929bee904552a1dee80c980f9bbce061511edaf4c5e58f87aaea63bd5dd08270

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page