Open saba-er opened 2 years ago
We have not integrated NeuroSim with a special application, but with a system simulator. To evaluate CNNs with Caffe (or other application), you can set the command in "zsim/tests/mba.cfg": process0 = { command = "ls"; //command = "./path/to/caffe test -model /path/to/deploy.prototxt -weights /path/to/*.caffemodel -iterations 1" }; Then run ZSim: "./build/opt/zsim tests/mba.cfg".
Thanks! Now I can run mba.cfg with a model defined in Caffe. However, I noticed there is some long stall during the run, and this message repeats: "[H] WARN: Stalled for 3800 secs so far 0"
What could be the reason?
I don't know the reason for this bug from these messages you post. You can set the "useMemristor" to false in "mba.cfg" to check whether ZSim can run Caffe normally.
Thanks, again. I think the reason is low memory with respect to model size. I have another question. How do you evaluate model accuracy using the simulator, e.g., accuracy of neural network inference? (I am referring you to accuracy graphs in the paper)
I replace the GEMM function in Caffe with the memristor_mm function in Memristor_CU.h and run Caffe directly without ZSim since the simulation for Caffe on ZSim is time-costly. You can evaluate the inference accuracy with Caffe solely if you are only concerned with the accuracy degradation.
There are a few instances where gemm is invoked in Caffe including forward_cpu_gemm and caffe_cpu_gemm. Which one should be replaced with memristor_mm function in Memristor_CU.h?
caffe_cpu_gemm is OK.
Would it be possible to show how you replaced GEMM function in Caffe with memristor_mm function? It does not seem to be trivial.
Would it be possible to share where/how you replaced GEMM function in Caffe with memristor_mm function?
Codes in NeuroSim/main.cpp show how we perform GEMM with memristor_mm.
Thanks! As far as I see, the example in main.cop is not documented, could you briefly describe what does it do?
According to MHSim paper (MHSim: A Simulation Framework for Memristor-based Heterogeneous Computing Architectures), there are some key components such as "task dispatcher" that do not seem to be included in this repo. Also, it seems the repo does not support integration of Caffe with Neurosim.