From 08bae1d1319fcfbe00494fedb7652df99a6f1e49 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Wed, 6 Feb 2019 16:25:32 +0100 Subject: [PATCH] change context when reset cache in metaconfig --- tiramisu/config.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tiramisu/config.py b/tiramisu/config.py index 95f5711..383bd8b 100644 --- a/tiramisu/config.py +++ b/tiramisu/config.py @@ -809,9 +809,16 @@ class KernelGroupConfig(_CommonConfig): resetted_opts = [] if isinstance(self, KernelMixConfig): super().cfgimpl_reset_cache(option_bag, - resetted_opts=copy(resetted_opts)) + resetted_opts=copy(resetted_opts)) for child in self._impl_children: - child.cfgimpl_reset_cache(option_bag, + if option_bag is not None: + coption_bag = option_bag.copy() + cconfig_bag = coption_bag.config_bag.copy() + cconfig_bag.context = child + coption_bag.config_bag = cconfig_bag + else: + coption_bag = None + child.cfgimpl_reset_cache(coption_bag, resetted_opts=copy(resetted_opts)) def set_value(self,