Skip to content

[Unity][Transform] Raise error in FuseOpsByPattern for SSA violation - #16421

Merged
Lunderberg merged 1 commit into
apache:mainfrom
Lunderberg:unity_check_ssa_in_fuse_ops
Feb 23, 2024
Merged

Lunderberg merged 1 commit into
apache:mainfrom
Lunderberg:unity_check_ssa_in_fuse_ops

Conversation

@Lunderberg

Copy link
Copy Markdown
Contributor

Internally, FuseOpsByPattern makes a mapping from relax variables to the fused group containing that variable. If the input module violates SSA, this map may be ill-formed. While not strictly necessary for FuseOps to handle ill-formed inputs, checking it at this level provides better error handling than propagating it to downstream passes.

This commit checks for ill-formed inputs that would produce invalid fused outputs and raises an error.

@Lunderberg
Lunderberg changed the base branch from unity to main January 22, 2024 20:19
@Lunderberg
Lunderberg force-pushed the unity_check_ssa_in_fuse_ops branch from 205e97d to 65dc49a Compare January 22, 2024 20:20
Internally, `FuseOpsByPattern` makes a mapping from relax variables to
the fused group containing that variable.  If the input module
violates SSA, this map may be ill-formed.  While not strictly
necessary for FuseOps to handle ill-formed inputs, checking it at this
level provides better error handling than propagating it to downstream
passes.

This commit checks for ill-formed inputs that would produce invalid
fused outputs and raises an error.
@Lunderberg
Lunderberg force-pushed the unity_check_ssa_in_fuse_ops branch from 65dc49a to 47adfd6 Compare February 14, 2024 15:47
@Lunderberg

Copy link
Copy Markdown
Contributor Author

Rebased onto main to resolve conflicts

@slyubomirsky slyubomirsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always good to have better error-checking, especially when the messages can be more meaningful. Thanks!

@Lunderberg
Lunderberg merged commit fac9520 into apache:main Feb 23, 2024
@Lunderberg
Lunderberg deleted the unity_check_ssa_in_fuse_ops branch February 23, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants