未验证 提交 3c287b42 编写于 作者: Z Zeng Jinle 提交者: GitHub

fix cycle gan cudnn algorithm bug, test=develop (#2474)

上级 b986a451
......@@ -9,12 +9,18 @@ def set_paddle_flags(flags):
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
use_cudnn_deterministic = os.environ.get('FLAGS_cudnn_deterministic', None)
if use_cudnn_deterministic:
use_cudnn_exhaustive_search = 0
else:
use_cudnn_exhaustive_search = 1
# NOTE(paddle-dev): All of these flags should be
# set before `import paddle`. Otherwise, it would
# not take any effect.
set_paddle_flags({
'FLAGS_cudnn_exhaustive_search': 1,
'FLAGS_cudnn_exhaustive_search': use_cudnn_exhaustive_search,
'FLAGS_conv_workspace_size_limit': 256,
'FLAGS_eager_delete_tensor_gb': 0, # enable gc
# You can omit the following settings, because the default
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册