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

[Unity][Transform] Extract partial-tuple-usage from FuseOps #16119

Closed

Conversation

Lunderberg
Copy link
Contributor

Prior to this commit, the FuseOps pass explicitly tracked usage of
tuple arguments, to minimize the set of arguments provided to each
kernel. The additional tgracking and handling of partially-used
tuples makes it difficult to follow the primary changes being made by
FuseOps.

This commit implements the same functionality in terms of the
ExpandTupleArguments and RemoveUnusedParameters transforms,
introduced in #16115 and
#16116 respectively. By using these
passes before the main FuseOps changes, partial tuple usage is
already handled at that point.

This commit is intended to minimize any changes to user-facing
behavior, and so these pre-process passes are currently used
internally by FuseOps. This may be avoided in the future by pulling
this internal delegation out into a lowering pipeline.

@Lunderberg
Copy link
Contributor Author

This PR is marked as a draft, until the pre-requisite PRs #16115, #16116, #16117, and #16118 land.

@Lunderberg Lunderberg force-pushed the unity_transform_refactor_fuse_ops branch from 26b675b to 14e315e Compare December 1, 2023 21:53
@Lunderberg Lunderberg marked this pull request as ready for review December 1, 2023 21:53
@Lunderberg Lunderberg changed the title [Draft][Unity][Transform] Extract partial-tuple-usage from FuseOps [Unity][Transform] Extract partial-tuple-usage from FuseOps Dec 1, 2023
@Lunderberg
Copy link
Contributor Author

All prerequisite PRs have now landed, and this PR is ready for review.

Prior to this commit, the `FuseOps` pass explicitly tracked usage of
tuple arguments, to minimize the set of arguments provided to each
kernel.  The additional tgracking and handling of partially-used
tuples makes it difficult to follow the primary changes being made by
`FuseOps`.

This commit implements the same functionality in terms of the
`ExpandTupleArguments` and `RemoveUnusedParameters` transforms,
introduced in apache#16115 and
apache#16116 respectively.  By using these
passes before the main `FuseOps` changes, partial tuple usage is
already handled at that point.

This commit is intended to minimize any changes to user-facing
behavior, and so these pre-process passes are currently used
internally by `FuseOps`.  This may be avoided in the future by pulling
this internal delegation out into a lowering pipeline.
@Lunderberg Lunderberg force-pushed the unity_transform_refactor_fuse_ops branch from 14e315e to a7af9b8 Compare January 3, 2024 17:11
@Lunderberg
Copy link
Contributor Author

Failing unit tests are due to MSC relying on relax variable names being preserved. #16349 is submitted to fix these unit tests, after which CI can be re-run for this PR.

@tqchen tqchen deleted the branch apache:unity March 29, 2024 12:18
@tqchen tqchen closed this Mar 29, 2024
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