Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skip to sdfg dot simplify #1897

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading