Skip to content

Commit

Permalink
Add skip to sdfg dot simplify (#1897)
Browse files Browse the repository at this point in the history
I think this change would be convenient, allows us to skip some passes
even if we call sdfg.simplify()
  • Loading branch information
ThrudPrimrose authored Jan 23, 2025
1 parent f0ca36b commit 7771baf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dace/sdfg/sdfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2509,15 +2509,18 @@ def apply_strict_transformations(self, validate=True, validate_all=False):
warnings.warn('SDFG.apply_strict_transformations is deprecated, use SDFG.simplify instead.', DeprecationWarning)
return self.simplify(validate, validate_all)

def simplify(self, validate=True, validate_all=False, verbose=False, options=None):
def simplify(self, validate=True, validate_all=False, verbose=False, skip:Optional[Set[str]]=None, options=None):
""" Applies safe transformations (that will surely increase the
performance) on the SDFG. For example, this fuses redundant states
(safely) and removes redundant arrays.
:note: This is an in-place operation on the SDFG.
"""
from dace.transformation.passes.simplify import SimplifyPass
return SimplifyPass(validate=validate, validate_all=validate_all, verbose=verbose,
return SimplifyPass(validate=validate,
validate_all=validate_all,
verbose=verbose,
skip=skip,
pass_options=options).apply_pass(self, {})

def auto_optimize(self,
Expand Down

0 comments on commit 7771baf

Please sign in to comment.