neurosim / DNN_NeuroSim_V1.3

Benchmark framework of compute-in-memory based accelerators for deep neural network (inference engine focused)
63 stars 36 forks source link

signed computation #14

Closed saba-er closed 3 years ago

saba-er commented 3 years ago

For the purpose of signed computation, is negative weights are supported by the simulator? If so, could you please explain how it should be implemented in a simulation? Just for the context: it is very common to perform signed computation using differential conductance of a pair of memristors.

neurosim commented 3 years ago

Hi! In this simulator, we usually map the signed weights to the positive memory values, and assume a reference array to offset the bias. But in the Param.cpp, you can set the operationmode as XNORsequentialMode or XNORparallelMode, which use XNOR differential pairs to represent (+1, -1) weights. But it only supports binary weights currently. You can check our previous paper for details:

X. Sun, S. Yin, X. Peng, R. Liu, J.-S. Seo, S. Yu, “XNOR-RRAM: A scalable and parallel synaptic architecture for binary neural networks,” IEEE/ACM Design, Automation & Test in Europe (DATE) 2018.

X. Sun, X. Peng, P.-Y. Chen, R. Liu, J.-S. Seo, S. Yu, “Fully parallel RRAM synaptic array for implementing binary neural network with (+1, -1) weights and (+1, 0) neurons,” IEEE/ACM Asia and South Pacific Design Automation Conference (ASP-DAC) 2018.

If you want to simulate other similar designs, it won't be very difficult to realize. Please contact us with more details if you need help with the code modification.

saba-er commented 3 years ago

Thanks for the answer. If I understand correctly, in this current version you can only have positive weights unless the weights are binary. Is that correct?

neurosim commented 3 years ago

Yes, correct.