aihwkit.simulator.presets.utils module¶
Utils for configurations presets for resistive processing units.
-
class
aihwkit.simulator.presets.utils.
PresetIOParameters
(bm_test_negative_bound=True, bound_management=<BoundManagementType.ITERATIVE: 'Iterative'>, inp_bound=1.0, inp_noise=0.0, inp_res=0.007936507936507936, inp_sto_round=False, is_perfect=False, max_bm_factor=1000, max_bm_res=0.25, nm_thres=0.0, noise_management=<NoiseManagementType.ABS_MAX: 'AbsMax'>, out_bound=20.0, out_noise=0.1, out_res=0.00196078431372549, out_scale=1.0, out_sto_round=False, w_noise=0.0, w_noise_type=<WeightNoiseType.NONE: 'None'>)¶ Bases:
aihwkit.simulator.configs.utils.IOParameters
Preset for the forward and backward pass parameters.
This defines the default (peripheral) hardware configurations used for most presets.
Currently, we assume 7 bit DAC (without stochastic rounding) and 9 bit ADC (including the sign) and a fixed dynamic range ratio. The dynamic range ratio is defined by how many fully-on inputs would saturate the output ADC when all weights are set maximal conductances. This value is set to 20 here, as the weight range is normalized to \(-1,\ldots 1\).
Moreover, the output noise (additive Gaussian) is set to 0.1, which is on the order of 1 LSB of the ADC.
By default, we turned additional weight noise off, however, some presets might turn it on as required by the device specification.
Finally, we assume by default that the device is run with bound management (see
BoundManagementType
) and noise management (seeNoiseManagementType
) turned on to ITERATIVE and ABS_MAX, respectively.-
bm_test_negative_bound
= True¶
-
bound_management
: aihwkit.simulator.configs.utils.BoundManagementType = 'Iterative'¶
-
inp_bound
= 1.0¶
-
inp_noise
= 0.0¶
-
inp_res
: float = 0.007936507936507936¶
-
inp_sto_round
: bool = False¶
-
is_perfect
= False¶
-
max_bm_factor
= 1000¶
-
max_bm_res
= 0.25¶
-
nm_thres
= 0.0¶
-
noise_management
: aihwkit.simulator.configs.utils.NoiseManagementType = 'AbsMax'¶
-
out_bound
: float = 20.0¶
-
out_noise
: float = 0.1¶
-
out_res
: float = 0.00196078431372549¶
-
out_scale
= 1.0¶
-
out_sto_round
= False¶
-
w_noise
: float = 0.0¶
-
w_noise_type
: aihwkit.simulator.configs.utils.WeightNoiseType = 'None'¶
-
-
class
aihwkit.simulator.presets.utils.
PresetUpdateParameters
(desired_bl=31, fixed_bl=True, pulse_type=<PulseType.STOCHASTIC_COMPRESSED: 'StochasticCompressed'>, res=0, x_res_implicit=0, d_res_implicit=0, sto_round=False, update_bl_management=True, update_management=True)¶ Bases:
aihwkit.simulator.configs.utils.UpdateParameters
Preset for the general update behavior.
This defines the default update configurations used for most presets. Presets might override this default behavior to implement other analog SGD optimizers.
Parallel analog update is the default. We assume stochastic pulse to do the parallel update in analog, as described in Gokmen & Vlasov, Front. Neurosci. 2016.
Moreover, we assume that the pulse length is dynamically adjusted with a maximal pulse length of 31 pulses.
-
d_res_implicit
= 0¶
-
desired_bl
: int = 31¶
-
fixed_bl
= True¶
-
pulse_type
: aihwkit.simulator.configs.utils.PulseType = 'StochasticCompressed'¶
-
res
= 0¶
-
sto_round
= False¶
-
update_bl_management
: bool = True¶
-
update_management
: bool = True¶
-
x_res_implicit
= 0¶
-