Skip to main content

CARM: Cache-Aware Roofline Model benchmarking and visualization toolkit

Project description

The CARM Tool

Cache-Aware Roofline Model (CARM) toolkit - benchmark, visualize and profile Intel, AMD, ARM, RISC-V CPUs and NVIDIA, AMD GPUs.

The package provides:

  • automatic benchmarking for supported ISAs
  • arithmetic, memory, and roofline benchmark modes
  • optional web GUI for interactive result visualization

[!WARNING] The development branch and associated python package are still experimental, and do not include all features yet. For a stable release, please refer to the main branch.

Documentation

You can find the full documentation at https://champ-hub.github.io/carm-roofline.

Installation

Install from PyPI:

# command-line interface only:
pip install carm-roofline
# with GUI extras:
pip install carm-roofline[gui]
# with all extras (GUI + development tools):
pip install carm-roofline[all]

To avoid conflicts with other packages, we recommend installing in a virtual environment:

python -m venv carm-env
source carm-env/bin/activate
pip install carm-roofline[all]

If cloning the repository directly (e.g. for development or access to example applications), use --recurse-submodules to also fetch the examples:

git clone --recurse-submodules https://github.com/champ-hub/carm-roofline

Requirements

  • Python 3.9+
  • C compiler (e.g. gcc, clang)
  • Optional: PAPI headers and binaries for profiling

Command-Line Interface

The installed command is:

carm

Available subcommands:

  • benchmark - run benchmark suites
  • gui - launch the results dashboard
  • profile - profile an application with PAPI or perf

Show help:

carm --help
carm benchmark --help
carm gui --help
carm profile --help

Basic Usage

Run a default benchmark (roofline mode with auto-detected settings):

carm benchmark

Other usage examples:

# Short roofline benchmark (1 second per micro-bench)
carm benchmark --test roofline --test-time 1
# Arithmetic-only
carm benchmark --test arithmetic --instruction add mul fma --data-type f32
# Memory-only
carm benchmark --test memory --mem-target L2 --ld-st-ratio 2:1
# Dry run (generate benchmark code, skip compile/execute):
carm benchmark --dry-run --test arithmetic --test-time 1 --verbose 4

Output and Results

By default, results are written to the user data directory (via platformdirs). On linux, this is typically ~/.local/share/carm/, on Windows, %APPDATA%\carm\, and on MacOS, ~/Library/Application Support/carm/.

Control output directory and format(s):

carm benchmark --output-dir ./carm_results --output-fmt table json csv plot

Use --name to label result files:

carm benchmark --name my_machine

GUI Mode

Launch the dashboard (requires GUI extras):

carm gui

Custom results location and port:

carm gui --results-dir ./carm_results --gui-port 8050

Publications and Citation

If you use the CARM and the CARM Tool in papers or reports, please cite:

J. Morgado, L. Sousa, A. Ilic. "CARM Tool: Cache-Aware Roofline Model Automatic Benchmarking and Application Analysis", IEEE International Symposium on Workload Characterization (IISWC), Vancouver, British Columbia, Canada, 2024.

A. Ilic, F. Pratas and L. Sousa, "Cache-aware Roofline model: Upgrading the loft," IEEE Computer Architecture Letters, vol. 13, no. 1, pp. 21-24, Jan.-June 2014. doi:10.1109/L-CA.2013.6.

D. Marques, A. Ilic, Z. A. Matveev, and L. Sousa, "Application-driven cache-aware roofline model," Future Generation Computer Systems, vol. 107, pp. 257-273, 2020. doi:10.1016/j.future.2020.01.044.

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

carm_roofline-1.0.2.dev2.tar.gz (213.5 kB view details)

Uploaded Source

Built Distribution

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

carm_roofline-1.0.2.dev2-py3-none-any.whl (225.8 kB view details)

Uploaded Python 3

File details

Details for the file carm_roofline-1.0.2.dev2.tar.gz.

File metadata

  • Download URL: carm_roofline-1.0.2.dev2.tar.gz
  • Upload date:
  • Size: 213.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for carm_roofline-1.0.2.dev2.tar.gz
Algorithm Hash digest
SHA256 13e4cd163ab1ff9422b80a7c16529b01daad31a47899bc7c27360a5e47ae8e7c
MD5 14cbc7cb0e982f7c5a418a3c11dee202
BLAKE2b-256 ee61c4b5d8397040ea26ecdbeb3505eb98cf73bfd9b5e4e815b5ccddf34931a7

See more details on using hashes here.

File details

Details for the file carm_roofline-1.0.2.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for carm_roofline-1.0.2.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 1beb32073de05a5a9a1273f1926807bb463c5c0bb78c1dcf15c77df300f0458d
MD5 4fda75d3c2208cde1973f3b584669138
BLAKE2b-256 8a4a27b10654016176baf6ad9ee0c6f0065876de8a6aa405dd3265d2e1a90e65

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