aihwkit.simulator.presets.compounds module
Compound configurations presets for resistive processing units.
- class aihwkit.simulator.presets.compounds.PCMPresetUnitCell(unit_cell_devices=<factory>, construction_seed=0, refresh_every=1, units_in_mbatch=True, refresh_upper_thres=0.75, refresh_lower_thres=0.25, refresh_forward=<factory>, refresh_update=<factory>, copy_inverted=False)[source]
Bases:
OneSidedUnitCellA unit cell that is comprised of two uni-directional PCM devices of opposite sign (see
PCMPresetDevice).Check for refresh is performed after each mini-batch update. See
OneSidedUnitCellfor details on the refresh implementation.- Parameters:
unit_cell_devices (List)
construction_seed (int)
refresh_every (int)
units_in_mbatch (bool)
refresh_upper_thres (float)
refresh_lower_thres (float)
refresh_forward (IOParameters)
refresh_update (UpdateParameters)
copy_inverted (bool)
- refresh_every: int = 1
How often a refresh is performed (in units of the number of vector updates).
Note
If a refresh is done, full reads of both positive and negative devices are performed. Additionally, if single devices deemed to be refreshed, an (open-loop) re-write is done (once per column). Thus, refresh might have considerable runtime impacts.
- refresh_forward: IOParameters
Input-output parameters that define the read during a refresh event.
IOParametersthat define the read (forward) of an refresh event. For instance the amount of noise or whether refresh is done using a ADC/DAC etc.
- refresh_update: UpdateParameters
Update parameters that define the type of update used for each refresh event.
Update parameters
UpdateParametersthat define the type of update used for each refresh event.
- unit_cell_devices: List
Devices that compose this unit cell.
- units_in_mbatch: bool = True
If set, the
refresh_everycounter is given inm_batchwhich is the re-use factor. Smaller numbers are not possible.Caution
For CUDA devices, refresh is always done in
m_batch(ie the number of re-use per layer for a mini-batch). Smaller numbers will have no effect.