File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
python/paddle/fluid/tests/unittests Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,18 @@ endif()
41
41
42
42
register_operators (EXCLUDES warpctc_op conv_fusion_op DEPS ${OP_HEADER_DEPS} )
43
43
44
- # warpctc_cudnn need cudnn 7 above
44
+ # warpctc_op needs cudnn 7 above
45
45
if (WITH_GPU )
46
46
if (${CUDNN_MAJOR_VERSION} VERSION_LESS 7 )
47
47
op_library (warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale SRCS warpctc_op.cc warpctc_op.cu.cc )
48
48
else ()
49
49
op_library (warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale )
50
50
endif ()
51
- op_library (conv_fusion_op )
52
- file (APPEND ${pybind_file} "USE_CUDA_ONLY_OP(conv2d_fusion);\n " )
51
+ # conv_fusion_op needs cudnn 7 above
52
+ if (NOT ${CUDNN_MAJOR_VERSION} VERSION_LESS 7 )
53
+ op_library (conv_fusion_op )
54
+ file (APPEND ${pybind_file} "USE_CUDA_ONLY_OP(conv2d_fusion);\n " )
55
+ endif ()
53
56
else ()
54
57
op_library (warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale )
55
58
endif ()
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ DECLARE_bool(cudnn_exhaustive_search);
22
22
namespace paddle {
23
23
namespace operators {
24
24
25
+ #if CUDNN_VERSION >= 7001
25
26
using Tensor = framework::Tensor;
26
27
using ScopedTensorDescriptor = platform::ScopedTensorDescriptor;
27
28
using ScopedFilterDescriptor = platform::ScopedFilterDescriptor;
@@ -178,10 +179,13 @@ class CUDNNConvFusionOpKernel : public framework::OpKernel<T> {
178
179
workspace_handle.RunFunc (cudnn_func, workspace_size_in_bytes);
179
180
}
180
181
};
182
+ #endif
181
183
182
184
} // namespace operators
183
185
} // namespace paddle
184
186
187
+ #if CUDNN_VERSION >= 7001
185
188
namespace ops = paddle::operators;
186
189
REGISTER_OP_CUDA_KERNEL (conv2d_fusion, ops::CUDNNConvFusionOpKernel<float >,
187
190
ops::CUDNNConvFusionOpKernel<double >);
191
+ #endif
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ if(NOT WITH_DISTRIBUTE)
23
23
LIST (REMOVE_ITEM TEST_OPS test_dist_text_classification )
24
24
endif (NOT WITH_DISTRIBUTE )
25
25
26
+ if (${CUDNN_MAJOR_VERSION} VERSION_LESS 7 )
27
+ LIST (REMOVE_ITEM TEST_OPS test_conv2d_fusion_op )
28
+ endif ()
29
+
26
30
list (REMOVE_ITEM TEST_OPS test_seq_concat_op ) # FIXME(helin): https://github.com/PaddlePaddle/Paddle/issues/8290
27
31
list (REMOVE_ITEM TEST_OPS test_modified_huber_loss_op ) # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5184
28
32
list (REMOVE_ITEM TEST_OPS test_lstm_unit_op ) # # FIXME(qijun) https://github.com/PaddlePaddle/Paddle/issues/5185
You can’t perform that action at this time.
0 commit comments