From 69e651b9c75abf266ea7b03fdddaede6c0b4dd79 Mon Sep 17 00:00:00 2001 From: "Philip Mueller, KY" Date: Mon, 16 Oct 2023 08:41:39 +0200 Subject: [PATCH 1/2] This commit addresses issue #1380. As it was discussed the ignoring of the `auto_optimize` flag in `to_sdfg()` is intentional. To make it clear to the user the function now issues a warning in this case. --- dace/frontend/python/parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dace/frontend/python/parser.py b/dace/frontend/python/parser.py index 991613a9ea..a3ca13d113 100644 --- a/dace/frontend/python/parser.py +++ b/dace/frontend/python/parser.py @@ -240,6 +240,9 @@ def to_sdfg(self, *args, simplify=None, save=False, validate=False, use_cache=Fa warnings.warn("You are calling to_sdfg() on a dace program that " "has set 'recompile' to False. " "This may not be what you want.") + if self.autoopt == True: + warnings.warn("You are calling to_sdfg() on a dace program that " + "has set `auto_optimize` to True, which is ignored here.") if use_cache: # Update global variables with current closure From 0e1dd62f6364372cde9bb63f05755d8b209a8cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= <147368808+philip-paul-mueller@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:58:39 +0200 Subject: [PATCH 2/2] Update dace/frontend/python/parser.py Co-authored-by: Tal Ben-Nun --- dace/frontend/python/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dace/frontend/python/parser.py b/dace/frontend/python/parser.py index a3ca13d113..1b6817a7d0 100644 --- a/dace/frontend/python/parser.py +++ b/dace/frontend/python/parser.py @@ -242,7 +242,7 @@ def to_sdfg(self, *args, simplify=None, save=False, validate=False, use_cache=Fa "This may not be what you want.") if self.autoopt == True: warnings.warn("You are calling to_sdfg() on a dace program that " - "has set `auto_optimize` to True, which is ignored here.") + "has set `auto_optimize` to True. Automatic optimization will not be applied.") if use_cache: # Update global variables with current closure