-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add NNPACK check status and test #198
add NNPACK check status and test #198
Conversation
0c676ea
to
be7711a
Compare
The Segfault was on the AVX2 flag? |
nope. Still not working |
deconv_layer_worker_specific_storage& cws = | ||
(*deconv_layer_worker_storage_)[index]; | ||
copy_and_pad_delta(cws.curr_delta_padded, *in_grad[0]); | ||
copy_and_pad_delta(cws.curr_delta_padded, *in_grad[0]); // *in_grad[0] does not exist here! | ||
const vec_t& W = *in_data[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangyida Are you sure that you compiled this? There are variables that are not declared
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is a mistake, line 101:
copy_and_pad_delta(cws.curr_delta_padded, *in_grad[0]);
should be replaced as:
(*deconv_layer_worker_storage_)[index].prev_out_ = in_data[0];
and line 166:
std::function<void(const vec_t&, vec_t&)> copy_and_pad_delta;
should be replaced as:
std::function<void(const vec_t&, int)> copy_and_unpad_output;
You can modify them directly, output of deconvolution might be unpadded and the delta in backforward might be padded, it's just the opposite operation of convolution in padding strategy.
I haven't compile with nnp backend as nnPack is not installed yet. These codes are modified logically in nnp.
@edgarriba How the segfault is reproducible? |
@edgarriba I've executed the test and i got an error. Have you executed init_nnp_engine()? |
|
good point ! Unfortunately my laptop doesn't support AVX2. If I compile with -mavx2 flag I got the following error: |
Arg! We have avx2 at work. But I've only avx on laptop. |
P.s. Avx2 was introduced with Haswell arch. |
@Maratyszcza Needs all the kernels in NNPACK avx2? |
@edgarriba You can execute tests with Intel SDE or Qemu to emulate avx2 |
@bhack oki. I'll try |
@bhack getting the same. I updated the test, the parameters were wrong. @Maratyszcza @ajtulloch Did you found any issue during Caffe's integration? |
Make sure all the unit tests for the Caffe integration pass on your machine? |
@ajtulloch thx for your answer. @bhack @nyanp If tests for convolution and pooling works in Caffe's version it means that we are doing something wrong. |
@edgarriba Are you running with Intel SDE? |
@ajtulloch @Maratyszcza I noticed that |
@edgarriba An issue in convolution backpropagation came up during Caffe integration (see Maratyszcza/NNPACK#15), but I believe it is fixed now. AFAIK, there aren't any unsolved crash or correctness bugs. As for |
@bhack I'd expect that all kernels require AVX2 or at least FMA3 (which means Haswell+ among Intel CPUs). However, you may build NNPACK with clang with |
@Maratyszcza Thank you. I've already executed with Intel sde on a cpu without avx2 but your option it is useful cause doen't rely on closed source tools. There will be a common maintainer ship of NNPACK with the Facebook group or will remain a personal project? |
@bhack I heard you can emulate new instruction sets with qemu if Intel SDE doesn't suit your needs. For the next year I am still a Ph.D. student at Georgia Tech, but NNPACK is developed in collaboration with F.A.I.R., and it is production-quality code. |
This is a major PR, so I think that some bug fixes in my local machine is better not being pushed as a new PR that will make it a additional task for @edgarriba to rebase again. I think I could push them after this PR got merged, am I right?
Some OpenCV related libs would be regarded placed in the current directory if it is written as:
|
0810832
to
0588bc8
Compare
add AVX2 flag add NNPACK support for maxpooling layer add missing engine initialization minor typo and lint changes fix minor issue with param access refactor backend_init, add setup tests for maxpol and conv layers remove old file remove old file add NNPACK fully_connected fix NNPACK pointer cast fix travis checks
@bhack @nyanp NNPACK working. We're good to merge. Next LibDNN. @Maratyszcza @ajtulloch thx for your support ! |
@edgarriba |
@edgarriba Referenced tiny-cnn in NNPACK readme. Or did you mean something else? |
@Maratyszcza That's fine. Thanks a lot ! |
add AVX2 flag add NNPACK support for maxpooling layer add missing engine initialization minor typo and lint changes fix minor issue with param access refactor backend_init, add setup tests for maxpol and conv layers remove old file remove old file add NNPACK fully_connected fix NNPACK pointer cast fix travis checks
@nyanp @wangyida @bhack @mtamburrano
Could you test NNPACK in your own devices? Getting a segfault here