Skip to content

[WIP] cuDNN Nd convolution and pooling #2671

@WGW101

Description

@WGW101

Hi!

I'm currently trying to integrate Nd convolution and pooling using cuDNN primitives.

In the current state of the local branch I'm working on, the code compiles and the network initialize correctly (blobs dimensions along the network seems fine).
However a fatal error occurs when calling cudnnConvolutionForward() and cudnnPoolingForward(),
returning respectively CUDNN_STATUS_BAD_PARAM or CUDNN_STATUS_NOT_SUPPORTED)..

Is there anywhere I can find an API reference documentation for cuDNN to try to understand why this doesn't work ?

What I did until now is:

  • add "Nd" version of all the helpers function in include/utils/cudnn.h
  • add kernel_shape, pad_shape and stride_shape BlobShape messages to the convolution and pooling parameters in src/caffe/proto/caffe.proto
  • add two classes inheriting directly from Layer to check for this new parameters and initialize all cudnn objects.
    Avoiding BaseConvolutionLayer enables me to stay fully compatible with the current implementation, but also makes the Layer unable to fall back on other engines if cuDNN is not available.
  • add a new layer factory for NdConvolution and NdPooling layers, in anticipation for future implementation on cpu with another engine.

If this happen to be more complicated than that, is there any existing solution to use 3D max-pooling within a network ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions