aihwkit icon indicating copy to clipboard operation
aihwkit copied to clipboard

Is it possible to directly pipe analog signals between analog tiles?

Open dingandrew opened this issue 3 years ago • 8 comments

From my understanding the column wires of the crossbar tiles contain the summed currents which are then passed to an op-amp current-to-voltage converter then to an ADC. I would like to pass this output voltage signal directly to another crossbar input, completely skipping the ADC converter.

I know the ADC can be disabled, but I believe this has the effect of perfect ADC conversions. I would like to maintain an analog signal, with all of its noise, as inputs to another crossbar tile.

Is this possible?

dingandrew avatar May 08 '22 23:05 dingandrew

Hi @dingandrew, that is correct, the summed currents are the outputs. To "turn-off" all digital compute, you could set the inp_res and out_res to -1 to avoid any quantization. The inp_bound and out_bound needs to be adjusted, too, those will clip the inputs and outputs into a certain range. Finally, you need to make sure that all peripheral digital compute is turned off, that is forward/backward.noise_management = NoiseManagementType.NONE and forward.bound_management=BoundManagementType.NONE as well as weight_scaling_omega=0 and forward.out_scale=1.0.

maljoras avatar May 09 '22 13:05 maljoras

We should add some kind of "AnalogOutputPreset" to the Presets to make this settings simpler.

maljoras avatar May 09 '22 14:05 maljoras

@maljoras would this preset allow disabling ADCs? then does it make sense also to have also an DigitalOutputPreset?

kaoutar55 avatar May 09 '22 14:05 kaoutar55

@kaoutar55 The default is an assumption that we have digital outputs. Otherwise using activations etc in pytorch does not make much sense

maljoras avatar May 09 '22 14:05 maljoras

Hi @maljoras,

So this would have the effect of skipping the ADC right?

And this also brings up another point. Is it possible to extend the analog layers to implement activation/pooling layers. For example, a RELU could be implemented with a op-amp. The idea behind this is that the calculations would stay in the analog domain for longer, avoiding costly A-D or D-A conversions.

dingandrew avatar May 09 '22 17:05 dingandrew

You could simply add an analog pooling layer (with the expected noise sources etc) to your liking by adding a pytorch module and build a DNN using that custom pooling (while AnalogLayers have ADC switched off). This is the advantage of using pytorch as it is very flexible in adding custom layers.

maljoras avatar May 10 '22 19:05 maljoras

Would this be the correct RPU configuration for turning off all digital circuitry?


mapping = MappingParameter( weight_scaling_omega=0.0) 


rpu_config = SingleRPUConfig(device=ConstantStepDevice(), mapping=mapping)

rpu_config.forward.inp_res = -1
rpu_config.forward.out_res = -1
rpu_config.forward.inp_bound = 100
rpu_config.forward.out_bound = 100
rpu_config.forward.w_noise_type = WeightNoiseType.ADDITIVE_CONSTANT
rpu_config.forward.out_scale = 1.0
rpu_config.forward.bound_management = BoundManagementType.NONE
rpu_config.forward.noise_management = NoiseManagementType.NONE
rpu_config.backward.noise_management = NoiseManagementType.NONE
    


dingandrew avatar May 12 '22 20:05 dingandrew

The inp_bound and out_bound should probably be a smaller number. Even for a purely analog circuit, you will have some output and input bounds as the currents will saturate at some point. There might be also additional non-idealities, you might want to consider. Eg. ir_drop could be enabled, or you could add some output non-linearity / noise with some additional pytorch code.

maljoras avatar May 16 '22 18:05 maljoras