---
title: "BenchOptions"
sidebar_label: "BenchOptions"
description: "The clika_runtime.graph BenchOptions class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

The knobs of ModelGraph.bench(); every field has a default. warmup untimed runs precede iterations timed ones; fill picks the synthesized input values; device places the inputs (None: the device of the graph's first bound input, else the CPU); reuse_output_buffers writes every run after the first into preallocated outputs, so the timed runs exclude output allocation; batch_axis overrides the guessed axis items are counted along; profile_dir, when set, receives a profile of the measured runs.

## `batch_axis` (property)

The axis items are counted along, or None for the guessed one.

## `device` (property)

The device the inputs are placed on (a Device or its string form), or None for the default.

## `fill` (property)

How synthesized inputs are filled (a FeedFill).

## `iterations` (property)

Measured runs; every one lands in the report.

## `profile_dir` (property)

Where a profile of the measured runs is written, or None.

## `reuse_output_buffers` (property)

Write every run after the first into preallocated outputs.

## `warmup` (property)

Untimed runs before the measured ones.

## `__init__`

```python
__init____init__(self, *, warmup: int = 3, iterations: int = 20, fill: clika_runtime._core.io.FeedFill = FeedFill.Zeros, device: object | None = None, reuse_output_buffers: bool = True, batch_axis: object | None = None, profile_dir: object | None = None) -> None
```

__init__(self, *, warmup: int = 3, iterations: int = 20, fill: clika_runtime._core.io.FeedFill = FeedFill.Zeros, device: object | None = None, reuse_output_buffers: bool = True, batch_axis: object | None = None, profile_dir: object | None = None) -> None

BenchOptions(*, warmup=3, iterations=20, fill=FeedFill.Zeros, device=None, reuse_output_buffers=True, batch_axis=None, profile_dir=None)

The knobs of one bench() call; `device` is a Device or its string form ('cpu', 'cuda:1').
