Skip to content

Commit 82dd165

Browse files
authored
Fix python.v2.fluid arg parse (#6055)
* fix python gflags init * format code
1 parent dc91c4e commit 82dd165

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/paddle/v2/fluid/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def __read_gflags_from_env__():
3636
read_env_flags = ['use_pinned_memory']
3737
if core.is_compile_gpu():
3838
read_env_flags.append('fraction_of_gpu_memory_to_use')
39-
core.init_gflags(sys.argv + ["--tryfromenv=" + ",".join(read_env_flags)])
39+
core.init_gflags([sys.argv[0]] +
40+
["--tryfromenv=" + ",".join(read_env_flags)])
4041

4142

4243
__read_gflags_from_env__()

0 commit comments

Comments
 (0)