Basic cuDNN v3 support (update) #3160

Merged
merged 1 commit into from Oct 16, 2015

Conversation

Projects
None yet
3 participants
Owner

shelhamer commented Oct 6, 2015

This is the same as #2737 except for

  • Restoring the pooling layer fallback for max + argmax output when the layer is configured to have two tops. The padding is dropped since it is now supported by cuDNN pooling.
  • Clearing the warnings for unused variables in cuDNNConvolutionLayer::Forward_gpu() now that algo and workspace are determined in Reshape().

Thanks @slayton58 for the integration.

shelhamer referenced this pull request Oct 6, 2015

Closed

Basic cuDNN v3 support #2737

Contributor

slayton58 commented Oct 7, 2015

@shelhamer Regarding the test failure for Groups -- it seems like this->weight_offset_ for the cuDNN routines is getting set incorrectly / not set (either way, it's wrong!) This seems to have been introduced in 9d8206e

Setting it back explicitly to:
this->weight_offset_ = (this->num_output_ / this->group_) * (this->channels_ / this->group_) * kernel_h * kernel_w;

in CuDNNConvolutionLayer::Setup seems to fix the issue, not sure if there's a better way - let me know and I'll update the PR

@shelhamer shelhamer added a commit that referenced this pull request Oct 16, 2015

@shelhamer shelhamer Merge pull request #3160 from shelhamer/cudnnV3
Basic cuDNN v3 support
321720d

@shelhamer shelhamer merged commit 321720d into BVLC:master Oct 16, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

shelhamer deleted the shelhamer:cudnnV3 branch Oct 16, 2015

Member

ronghanghu commented Oct 16, 2015

Great 👍

Owner

shelhamer commented Oct 16, 2015

cuDNN v3 is not itself backward compatible with v2, so adopting v3 in this PR does deprecate v2. We plan to follow the latest cuDNN version in master but keep compatability as the cuDNN interface itself allows.

@ronghanghu ronghanghu commented on the diff Oct 28, 2015

src/caffe/layers/cudnn_conv_layer.cu
}
Dtype* bias_diff = NULL;
if (this->bias_term_ && this->param_propagate_down_[1]) {
bias_diff = this->blobs_[1]->mutable_gpu_diff();
+ caffe_gpu_set(this->blobs_[1]->count(), Dtype(0), bias_diff);
@ronghanghu

ronghanghu Oct 28, 2015

Member

@shelhamer @slayton58 I am a bit confused here... Why do we need to zero out the diff? It confuses me as parameter gradients should be accumulated.

@shelhamer

shelhamer Oct 28, 2015

Owner

This is definitely a bug -- thanks for the fix in #3254.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment