Skip to content

Commit

Permalink
Issue a warning when to_sdfg() ignores the auto_optimize flag (Issue
Browse files Browse the repository at this point in the history
…#1380). (#1395)

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.

---------

Co-authored-by: Philip Mueller, KY <philip.paul.mueller@bluemail.ch>
Co-authored-by: Tal Ben-Nun <tbennun@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 14, 2023
1 parent e5b64bf commit 43ca982
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dace/frontend/python/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. Automatic optimization will not be applied.")

if use_cache:
# Update global variables with current closure
Expand Down

0 comments on commit 43ca982

Please sign in to comment.