aihwkit_lightning.simulator.configs.configs module
Configurations for resistive processing units.
- class aihwkit_lightning.simulator.configs.configs.TorchInferenceRPUConfig(forward=<factory>, clip=<factory>, modifier=<factory>, mapping=<factory>, pre_post=<factory>)[source]
Bases:
objectConfiguration 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:
forward (IOParameters) –
clip (WeightClipParameter) –
modifier (WeightModifierParameter) –
mapping (MappingParameter) –
pre_post (PrePostProcessingParameter) –
- clip: 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
Noneby default, setting parameters of the clipping will not be taken into account, if the clipping type is not specified.
- forward: 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
- mapping: MappingParameter
Parameter related to mapping weights to tiles for supporting modules.
- modifier: WeightModifierParameter
Parameter for weight modifier.
If a modifier type is set, it is called once per mini-match in the
post_update_stepand 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_modelis employed).
- pre_post: PrePostProcessingParameter
Parameter related digital pre and post processing.