提交 ae0797b3 authored 作者: Frederic's avatar Frederic

Fix compilation crash with cudnn R2 rc2 due to interface change

上级 5b569617
...@@ -146,6 +146,14 @@ cudnnConvolutionBackwardData_v2( ...@@ -146,6 +146,14 @@ cudnnConvolutionBackwardData_v2(
#define cudnnConvolutionBackwardData cudnnConvolutionBackwardData_v2 #define cudnnConvolutionBackwardData cudnnConvolutionBackwardData_v2
//Needed for R2 rc2
# define CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING CUDNN_POOLING_AVERAGE
#else
// r2 rc1 and rc2 do not have the same macro defined
// I didn't checked if this the right combination, but as we do not wrap the padding interface, it is fine for now.
# define CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING 1
#endif #endif
#endif #endif
...@@ -662,7 +662,7 @@ class GpuDnnPoolDesc(GpuOp): ...@@ -662,7 +662,7 @@ class GpuDnnPoolDesc(GpuOp):
if self.mode == 'max': if self.mode == 'max':
mode_flag = 'CUDNN_POOLING_MAX' mode_flag = 'CUDNN_POOLING_MAX'
elif self.mode == "average": elif self.mode == "average":
mode_flag = 'CUDNN_POOLING_AVERAGE' mode_flag = 'CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING'
else: else:
raise NotImplementedError("Unsupported pooling model.") raise NotImplementedError("Unsupported pooling model.")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论