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

[Caffe] Minor refactoring of NNPACK integration #1

Closed
wants to merge 3 commits into from
Closed

[Caffe] Minor refactoring of NNPACK integration #1

wants to merge 3 commits into from

Conversation

Maratyszcza
Copy link

Fix two of the issues mentioned in Maratyszcza/NNPACK#1

ajtulloch and others added 3 commits March 27, 2016 13:39
The approach is pretty straightforward and very similar to the CuDNN integration:

- Add some CMake magic to detect NNPACK if it's installed on the user's
  system.
- Add some Makefile.config options
- Add some thread-local state (a threadpool for NNPACK to caffe::Caffe).
- Add an NNPACK `Engine` parameter to Convolution/Pooling/InnerProduct
  layers.
- In LayerFactory, ifdef around whether NNPACK is enabled and dispatch
  to NNPACK*Layer or *Layer depending on the Engine parameter.
- In NNPACK*Layer, ensure the NNPACK preconditions hold and call the
  appropriate nnpack_*  function, otherwise fall back to *Layer.

I'm not sure how common it is to be running CNN inference on Haswell and
beyond CPUs for Caffe users, but if it is it might be a nice boost for
them.
- Moved headers for NNPACK layers from src/caffe/layers to include/caffe/layers
- Detect situations not handled by nnp_max_pooling_output from its return code,
rather than hard-code them in the integration code.
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

Successfully merging this pull request may close these issues.

2 participants