Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone (make mnistSA) segfaults on full parsed MNIST dataset #6

Open
0xlimE opened this issue Feb 12, 2020 · 1 comment
Open

Standalone (make mnistSA) segfaults on full parsed MNIST dataset #6

0xlimE opened this issue Feb 12, 2020 · 1 comment

Comments

@0xlimE
Copy link

0xlimE commented Feb 12, 2020

Hello!

First off big fan of your work!

I am having some issues with running the standalone (make mnistSA, where I edit mnist to true in globals) I always get a segfault.

GDB gives me the following

Program received signal SIGSEGV, Segmentation fault.
0x000055555555ea06 in CNNLayer::updateEquationsSA (this=0x5555557fc260, prevActivations=std::vector of length 100352, capacity 100352 = {...}) at src/CNNLayer.cpp:357
357							temp[i] += deltaRelu[loc];
(gdb) backtrace
-0  0x000055555555ea06 in CNNLayer::updateEquationsSA (this=0x5555557fc260, prevActivations=std::vector of length 100352, capacity 100352 = {...}) at src/CNNLayer.cpp:357

0x000055555555d62a in CNNLayer::updateEquations (this=0x5555557fc260, prevActivations=std::vector of length 100352, capacity 100352 = {...}) at src/CNNLayer.cpp:187

0x00005555555981a9 in NeuralNetwork::updateEquations (this=0x5555557fe0b0) at src/NeuralNetwork.cpp:125

0x00005555555979d5 in NeuralNetwork::backward (this=0x5555557fe0b0) at src/NeuralNetwork.cpp:54

0x000055555555965c in train (net=0x5555557fe0b0, config=0x5555557fe140) at src/secondary.cpp:177

0x00005555555abe40 in main (argc=10, argv=0x7fffffffdfc8) at src/main.cpp:139

Do you have any idea on what to do from here? I can run the 'make standalone' with mnist false.

Thank you in advance!

*edit, this is with batch size = 128, if I set the batch size to 64 then I don't get a segfault. Likewise it works with batch size 256

@snwagh
Copy link
Owner

snwagh commented Feb 12, 2020

Someone else had this segfault issue. I am overcommitted right now and might not have time to look into this, I can only give you some pointers to debug this (if you manage to fix it, I can pull in your commit)

  1. Based on the function trace, CNNLayer::updateEquationsSA seems to be the source of the error. In this codebase, I would suspect segfaults occurring because of wrong memory access in a vector.
  2. I checked the MPC code more thoroughly and possibly did not fix bugs in the SA code. Maybe compare the for loop sizes of the corresponding MPC code with the SA code and check for discrepancies.
  3. Its definitely bizarre that it works for batch size 64 and 256 but not 128. Would like to debug this but can't commit to it anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants