aihwkit.simulator.parameters.runtime module

Runtime parameters for settings at simulation time.

class aihwkit.simulator.parameters.runtime.RuntimeParameter(data_type=RPUDataType.FLOAT, on_the_fly_bindings=False, offload_input=False, offload_gradient=False)[source]

Bases: _PrintableMixin

Parameter that define the analog-matvec (forward / backward) and peripheral digital input-output behavior.

Here one can enable analog-digital conversion, dynamic input scaling, and define the properties of the analog-matvec computations, such as noise and non-idealities (e.g. IR-drop).

Parameters:
  • data_type (RPUDataType) –

  • on_the_fly_bindings (bool) –

  • offload_input (bool) –

  • offload_gradient (bool) –

data_type: RPUDataType = 'float'

Data type to use for the C++ bindings and simulations.

offload_gradient: bool = False

Whether to offload the stored gradient for the update pass on CPU to save GPU memory.

Note

Only for in case tiles are simulated with RPUCuda library.

offload_input: bool = False

Whether to offload the stored input for the update pass on CPU to save GPU memory.

on_the_fly_bindings: bool = False

Enable on the fly generation of some parameter bindings.

For some post update steps (e.g. for inference tile), parameter bindings are generated on the fly. This is only useful if these parameters are vary during training and is turned off by default for performance reason (which typically is not supported as the RPUConfig is considered fixed once the analog tile is instantiated).

If indeed parameters (e.g. WeightClipParameter, WeightModifierParameter, and WeightRemapParameter) vary during training, this options as to be turned off to re-generate the bindings on the fly (that is each mini-batch).