aihwkit.simulator.configs.configs module

Configurations for resistive processing units.

class aihwkit.simulator.configs.configs.DigitalRankUpdateRPUConfig(pre_post=<factory>, mapping=<factory>, device=<factory>, forward=<factory>, backward=<factory>, update=<factory>)[source]

Bases: aihwkit.simulator.configs.utils.MapableRPU, aihwkit.simulator.configs.utils.PrePostProcessingRPU, aihwkit.simulator.configs.helpers._PrintableMixin

Configuration for an analog (unit cell) resistive processing unit where the rank update is done in digital.

Note that for forward and backward, an analog crossbar is still used, and during update the digitally computed rank update is transferred to the analog crossbar using pulses.

Parameters
Return type

None

as_bindings()[source]

Return a representation of this instance as a simulator bindings object.

Return type

aihwkit.simulator.rpu_base.devices.AnalogTileParameter

backward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the backward direction.

device: aihwkit.simulator.configs.compounds.DigitalRankUpdateCell

Parameter that modify the behavior of the pulsed device.

forward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the forward direction.

tile_class

alias of aihwkit.simulator.tiles.analog.AnalogTile

update: aihwkit.simulator.configs.utils.UpdateParameters

Parameter for the analog part of the update, that is the transfer from the digital buffer to the devices.

class aihwkit.simulator.configs.configs.FloatingPointRPUConfig(pre_post=<factory>, mapping=<factory>, device=<factory>)[source]

Bases: aihwkit.simulator.configs.utils.MapableRPU, aihwkit.simulator.configs.utils.PrePostProcessingRPU, aihwkit.simulator.configs.helpers._PrintableMixin

Configuration for a floating point resistive processing unit.

Parameters
Return type

None

device: aihwkit.simulator.configs.devices.FloatingPointDevice

Parameter that modify the behavior of the pulsed device.

tile_class

alias of aihwkit.simulator.tiles.floating_point.FloatingPointTile

class aihwkit.simulator.configs.configs.InferenceRPUConfig(pre_post=<factory>, mapping=<factory>, forward=<factory>, noise_model=<factory>, drift_compensation=<factory>, clip=<factory>, remap=<factory>, modifier=<factory>)[source]

Bases: aihwkit.simulator.configs.utils.MapableRPU, aihwkit.simulator.configs.utils.PrePostProcessingRPU, aihwkit.simulator.configs.helpers._PrintableMixin

Configuration for an analog tile that is used only for inference.

Training is done in hardware-aware manner, thus using only the non-idealities of the forward-pass, but backward and update passes are ideal.

During inference, statistical models of programming, drift and read noise can be used.

Parameters
Return type

None

as_bindings()[source]

Return a representation of this instance as a simulator bindings object.

Return type

aihwkit.simulator.rpu_base.devices.AnalogTileParameter

backward: aihwkit.simulator.configs.utils.IOParameters

perfect.

Type

Input-output parameter setting for the backward direction

clip: aihwkit.simulator.configs.utils.WeightClipParameter

Parameter for weight clip.

If a clipping type is set, the weights are clipped according to the type specified.

Caution

The clipping type is set to None by default, setting parameters of the clipping will not be taken into account, if the clipping type is not specified.

device: aihwkit.simulator.configs.devices.IdealDevice

ideal device.

Type

Parameter that modify the behavior of the pulsed device

drift_compensation: Optional[aihwkit.inference.compensation.base.BaseDriftCompensation]

For compensating the drift during inference only.

forward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the forward direction.

This parameters govern the hardware definitions specifying analog MVM non-idealities.

Note

This forward pass is applied equally in training and inference. In addition, materials effects such as drift and programming noise can be enabled during inference by specifying the noise_model

modifier: aihwkit.simulator.configs.utils.WeightModifierParameter

Parameter for weight modifier.

If a modifier type is set, it is called once per mini-match in the post_update_step and modifies the weight in forward and backward direction for the next mini-batch during training, but updates hidden reference weights. In eval mode, the reference weights are used instead for forward.

The modifier is used to do hardware-aware training, so that the model becomes more noise robust during inference (e.g. when the noise_model is employed).

noise_model: aihwkit.inference.noise.base.BaseNoiseModel

Statistical noise model to be used during (realistic) inference.

This noise models establishes a phenomenological model of the material which is applied to the weights during inference only, when program_analog_weights or drift_analog_weights is called.

remap: aihwkit.simulator.configs.utils.WeightRemapParameter

Parameter for remapping.

Remapping can be enabled by specifying a remap type. If enabled, it ensures that the weights are mapped maximally into the conductance units during training. It will be called after each mini-batch.

tile_class

alias of aihwkit.simulator.tiles.inference.InferenceTile

update: aihwkit.simulator.configs.utils.UpdateParameters

NONE pulse type.

Type

Parameter for the update behavior

class aihwkit.simulator.configs.configs.SingleRPUConfig(pre_post=<factory>, mapping=<factory>, device=<factory>, forward=<factory>, backward=<factory>, update=<factory>)[source]

Bases: aihwkit.simulator.configs.utils.MapableRPU, aihwkit.simulator.configs.utils.PrePostProcessingRPU, aihwkit.simulator.configs.helpers._PrintableMixin

Configuration for an analog (pulsed device) resistive processing unit.

Parameters
Return type

None

as_bindings()[source]

Return a representation of this instance as a simulator bindings object.

Return type

aihwkit.simulator.rpu_base.devices.AnalogTileParameter

backward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the backward direction.

device: aihwkit.simulator.configs.devices.PulsedDevice

Parameter that modify the behavior of the pulsed device.

forward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the forward direction.

tile_class

alias of aihwkit.simulator.tiles.analog.AnalogTile

update: aihwkit.simulator.configs.utils.UpdateParameters

Parameter for the update behavior.

class aihwkit.simulator.configs.configs.UnitCellRPUConfig(pre_post=<factory>, mapping=<factory>, device=<factory>, forward=<factory>, backward=<factory>, update=<factory>)[source]

Bases: aihwkit.simulator.configs.utils.MapableRPU, aihwkit.simulator.configs.utils.PrePostProcessingRPU, aihwkit.simulator.configs.helpers._PrintableMixin

Configuration for an analog (unit cell) resistive processing unit.

Parameters
Return type

None

as_bindings()[source]

Return a representation of this instance as a simulator bindings object.

Return type

aihwkit.simulator.rpu_base.devices.AnalogTileParameter

backward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the backward direction.

device: aihwkit.simulator.configs.compounds.UnitCell

Parameter that modify the behavior of the pulsed device.

forward: aihwkit.simulator.configs.utils.IOParameters

Input-output parameter setting for the forward direction.

tile_class

alias of aihwkit.simulator.tiles.analog.AnalogTile

update: aihwkit.simulator.configs.utils.UpdateParameters

Parameter for the parallel analog update behavior.