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

Function config_env

imperative/python/megengine/_env_initlization.py:8–16  ·  view source on GitHub ↗

more detail: please check https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars default config to LAZY, which means cuda module will be loaded when needed to save cu memory by load fatbin elf section please do not call any cuda api before this function

()

Source from the content-addressed store, hash-verified

6
7
8def config_env():
9 """
10 more detail: please check https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
11 default config to LAZY, which means cuda module will be loaded when needed to save cu memory by load fatbin elf section
12 please do not call any cuda api before this function
13 """
14 if not os.getenv("ALREADY_CONFIG_CUDA_LOADING_MODE", False):
15 may_user_config = os.getenv("CUDA_MODULE_LOADING", "LAZY")
16 os.environ["CUDA_MODULE_LOADING"] = may_user_config
17
18
19def check_pip_env():

Callers 1

check_miscFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected