From 61d3718fe181c006f3b4a516073be52ffaa04f62 Mon Sep 17 00:00:00 2001 From: PGZXB Date: Thu, 15 Sep 2022 18:57:22 +0800 Subject: [PATCH] Set cfg.offline_cache after reset() --- python/taichi/lang/misc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)