diff --git a/python/taichi/lang/misc.py b/python/taichi/lang/misc.py index 4b6c38ebdeb4e..758892310e193 100644 --- a/python/taichi/lang/misc.py +++ b/python/taichi/lang/misc.py @@ -347,8 +347,6 @@ def init(arch=None, # changed by the Vulkan backend initialization on OS X. current_dir = os.getcwd() - cfg = impl.default_cfg() - cfg.offline_cache = True # Enable offline cache in frontend instead of C++ side # Check if installed version meets the requirements. if require_version is not None: check_require_version(require_version) @@ -365,6 +363,9 @@ def init(arch=None, kwargs = _deepcopy(kwargs) reset() + cfg = impl.default_cfg() + cfg.offline_cache = True # Enable offline cache in frontend instead of C++ side + spec_cfg = _SpecialConfig() env_comp = _EnvironmentConfigurator(kwargs, cfg) env_spec = _EnvironmentConfigurator(kwargs, spec_cfg)