Conversation
| enum class PoolingMode { | ||
| kMaximum, | ||
| kAverage, | ||
| }; |
There was a problem hiding this comment.
The DataLayout and PoolingMode can be removed to other files when writing conv and pooling operators.
paddle/platform/cudnn_helper.cc
Outdated
| See the License for the specific language governing permissions and | ||
| limitations under the License. */ | ||
|
|
||
| #include "paddle/platform/cudnn_helper.h" |
There was a problem hiding this comment.
Why need cudnn_helper.cc?
There was a problem hiding this comment.
Remove cudnn_helper.cc
paddle/platform/cudnn_helper.h
Outdated
|
|
||
| #pragma once | ||
|
|
||
| #ifndef PADDLE_ONLY_CPU |
There was a problem hiding this comment.
Do not need the PADDLE_ONLY_CPU macro. In this file, there is no code need to separate by this macro.
There was a problem hiding this comment.
Remove #ifndef PADDLE_ONLY_CPU
paddle/platform/cudnn_helper.h
Outdated
|
|
||
| #ifndef PADDLE_ONLY_CPU | ||
| #include <cudnn.h> | ||
| #include "glog/logging.h" |
There was a problem hiding this comment.
#include <glog/logging.h>
There was a problem hiding this comment.
remove #include <glog/logging.h>, it is used to debug at first.
| template <> | ||
| class CudnnDataType<float> { | ||
| public: | ||
| static const cudnnDataType_t type = CUDNN_DATA_FLOAT; |
There was a problem hiding this comment.
line 45-53 can be written in the template CudnnDataType.
There was a problem hiding this comment.
These codes may be not necessary and remove them.
paddle/platform/cudnn_helper_test.cc
Outdated
|
|
||
| #include "paddle/platform/cudnn_helper.h" | ||
| #include "glog/logging.h" | ||
| #include "gtest/gtest.h" |
There was a problem hiding this comment.
#include <glog/logging.h>
#include <gtest/gtest.h>
| enum class DataLayout { | ||
| kNHWC, | ||
| kNCHW, | ||
| kNCHW_VECT_C, |
There was a problem hiding this comment.
Should the cudnn's three-dimensional convolution be taken into account?
There was a problem hiding this comment.
The layout for 3D Conv can be added when implementing it.
Fix #3731
cudnnTensorDescriptor_t,cudnnConvolutionDescriptor_t, ...