add init_gflags interface (#5193)
* add init_gflags interface * refine code * follow commentsfix-typo
parent
6c8dce9ce2
commit
a186b53dfb
@ -1 +1,11 @@
|
||||
import sys
|
||||
import core
|
||||
__all__ = ['proto']
|
||||
argv = []
|
||||
if core.is_compile_gpu():
|
||||
argv = list(sys.argv) + [
|
||||
"--tryfromenv=fraction_of_gpu_memory_to_use,use_pinned_memory"
|
||||
]
|
||||
else:
|
||||
argv = list(sys.argv) + ["--tryfromenv=use_pinned_memory"]
|
||||
core.init_gflags(argv)
|
||||
|
Loading…
Reference in new issue