MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / int_env

Function int_env

imperative/python/megengine/xla/lib/config.py:45–47  ·  view source on GitHub ↗

Read an environment variable and interpret it as an integer.

(varname: str, default: int)

Source from the content-addressed store, hash-verified

43
44
45def int_env(varname: str, default: int) -> int:
46 """Read an environment variable and interpret it as an integer."""
47 return int(os.getenv(varname, str(default)))
48
49
50UPGRADE_BOOL_HELP = (

Callers 2

config.pyFile · 0.85
xla_bridge.pyFile · 0.85

Calls 1

strFunction · 0.85

Tested by

no test coverage detected