未验证 提交 82dd1653 编写于 作者: Q QI JUN 提交者: GitHub

Fix python.v2.fluid arg parse (#6055)

* fix python gflags init

* format code
上级 dc91c4e3
......@@ -36,7 +36,8 @@ def __read_gflags_from_env__():
read_env_flags = ['use_pinned_memory']
if core.is_compile_gpu():
read_env_flags.append('fraction_of_gpu_memory_to_use')
core.init_gflags(sys.argv + ["--tryfromenv=" + ",".join(read_env_flags)])
core.init_gflags([sys.argv[0]] +
["--tryfromenv=" + ",".join(read_env_flags)])
__read_gflags_from_env__()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册