Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions benchmarks/test_regalloc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# flake8: noqa
"""
Register Allocation Benchmarks for ScratchV.

This package contains three benchmark suites for the linear scan
register allocator (``LinearScanAllocator``):

1. **bench1_simple** — Simple arithmetic (3-5 vregs, no spills)
2. **bench2_dense** — Dense computation (20+ vregs, triggers spilling)
3. **bench3_cnn** — CNN model integration (operations from ``models/graph/cnn.onnx``)

Each suite measures allocation time, spill count, peak register pressure,
and validates output correctness.

Usage::

python -m benchmarks.test_regalloc.run_all
"""

from __future__ import annotations
Loading
Loading