Skip to content

Commit 8c048aa

Browse files
committed
Remove cudnn_helper.cc
1 parent 96cdb2c commit 8c048aa

File tree

4 files changed

+1
-40
lines changed

4 files changed

+1
-40
lines changed

paddle/platform/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ cc_library(device_context SRCS device_context.cc DEPS memory buddy_allocator
2323
system_allocator memory_block meta_data meta_cache place eigen3 ${GPU_CTX_DEPS})
2424
nv_test(device_context_test SRCS device_context_test.cc DEPS device_context gpu_info)
2525

26-
nv_library(cudnn_helper SRCS cudnn_helper.cc DEPS dynload_cuda)
2726
nv_test(cudnn_helper_test SRCS cudnn_helper_test.cc DEPS dynload_cuda)

paddle/platform/cudnn_helper.cc

Lines changed: 0 additions & 15 deletions
This file was deleted.

paddle/platform/cudnn_helper.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ limitations under the License. */
1414

1515
#pragma once
1616

17-
#ifndef PADDLE_ONLY_CPU
18-
#include <cudnn.h>
19-
#include "glog/logging.h"
2017
#include "paddle/platform/dynload/cudnn.h"
2118
#include "paddle/platform/enforce.h"
2219
#include "paddle/platform/macros.h"
@@ -42,30 +39,12 @@ template <>
4239
class CudnnDataType<float> {
4340
public:
4441
static const cudnnDataType_t type = CUDNN_DATA_FLOAT;
45-
typedef const float ScalingParamType;
46-
static ScalingParamType* kOne() {
47-
static ScalingParamType v = 1.0;
48-
return &v;
49-
}
50-
static const ScalingParamType* kZero() {
51-
static ScalingParamType v = 0.0;
52-
return &v;
53-
}
5442
};
5543

5644
template <>
5745
class CudnnDataType<double> {
5846
public:
5947
static const cudnnDataType_t type = CUDNN_DATA_DOUBLE;
60-
typedef const double ScalingParamType;
61-
static ScalingParamType* kOne() {
62-
static ScalingParamType v = 1.0;
63-
return &v;
64-
}
65-
static ScalingParamType* kZero() {
66-
static ScalingParamType v = 0.0;
67-
return &v;
68-
}
6948
};
7049

7150
inline cudnnTensorFormat_t GetCudnnTensorFormat(const DataLayout& order) {
@@ -219,4 +198,3 @@ class ScopedPoolingDescriptor {
219198

220199
} // namespace platform
221200
} // namespace paddle
222-
#endif

paddle/platform/cudnn_helper_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

1515
#include "paddle/platform/cudnn_helper.h"
16-
#include "glog/logging.h"
17-
#include "gtest/gtest.h"
16+
#include <gtest/gtest.h>
1817

1918
TEST(CudnnHelper, ScopedTensorDescriptor) {
2019
using paddle::platform::ScopedTensorDescriptor;

0 commit comments

Comments
 (0)