未验证 提交 1fbc45b7 编写于 作者: L Lv Mengsi 提交者: GitHub

Fix transpose conv (#21406), test=release/1.6 (#21510)

* fix transpose conv,test=develop

* fix comments
test=develop
上级 66c18f4a
......@@ -500,6 +500,7 @@ std::unique_ptr<PaddlePredictor> CreatePaddlePredictor<
std::string flag = "--fraction_of_gpu_memory_to_use=" +
std::to_string(fraction_of_gpu_memory);
flags.push_back(flag);
flags.push_back("--cudnn_deterministic=True");
VLOG(3) << "set flag: " << flag;
framework::InitGflags(flags);
}
......
......@@ -243,6 +243,10 @@ class CUDNNConvTransposeOpKernel : public framework::OpKernel<T> {
cudnn_output_desc, CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
workspace_size_limit, &algo));
if (algo == 0 && FLAGS_cudnn_deterministic) {
algo = static_cast<cudnnConvolutionBwdDataAlgo_t>(1);
}
// get workspace size able to allocate
CUDNN_ENFORCE(
platform::dynload::cudnnGetConvolutionBackwardDataWorkspaceSize(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册