Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-97] implement DepthwiseConv2dBackwardFilterKernel from tensorflow codebase #10098

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

nihui
Copy link
Contributor

@nihui nihui commented Mar 14, 2018

implement DepthwiseConv2dBackwardFilterKernel from tensorflow codebase, which is over 5x faster

Description

The current mxnet implementation calls __syncthreads() function too much, which is extemely slow.
The new code comes from tensorflow, but the variable names are adjusted for consistency.

My model uses depthwise conv heavily, and now its training time per iteration is over 5x faster on single P40 gpu. ( old 92s vs new 18s )

Checklist

Essentials

  • Passed code style checking (make lint)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@nihui nihui requested a review from cjolivier01 as a code owner March 14, 2018 05:28
@nihui nihui changed the title implement DepthwiseConv2dBackwardFilterKernel from tensorflow codebase [MXNET-97] implement DepthwiseConv2dBackwardFilterKernel from tensorflow codebase Mar 14, 2018
@chinakook
Copy link
Contributor

Tensorflow has also a 32x32 DepthwiseConv when feature maps are small. Could you add that too?

@nihui
Copy link
Contributor Author

nihui commented Mar 15, 2018

@chinakook hi, the special path for small maps has already been implemented in mxnet.

@piiswrong piiswrong merged commit cf188b4 into apache:master Mar 16, 2018
jinhuang415 pushed a commit to jinhuang415/incubator-mxnet that referenced this pull request Mar 30, 2018
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants