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

[Schedule] Create subschedule for subgraph replacement #52

Merged
merged 10 commits into from
Feb 13, 2023

Conversation

chhzh123
Copy link
Contributor

@chhzh123 chhzh123 commented Feb 11, 2023

Description

This PR creates subschedule for replaced subgraph module (vertical & horizontal fusion) and attach hooks to the new module. Previously, we only create subschedule for single module replacement. Also, the replace_function API is changed, accepting a tuple (str, fx.Node) instead of a single node, in order to match the API of replace_module. Corresponding tests are also added to ensure correctness.

Checklist

  • PR's title starts with a category (e.g. [Bugfix], [Model], [Tutorial], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

@chhzh123 chhzh123 mentioned this pull request Feb 11, 2023
15 tasks
@chhzh123 chhzh123 requested a review from comaniac February 11, 2023 02:36
Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Just some suggestions of refactoring.

slapo/schedule.py Outdated Show resolved Hide resolved
slapo/schedule.py Outdated Show resolved Hide resolved
slapo/schedule.py Outdated Show resolved Hide resolved
Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM

@chhzh123 chhzh123 merged commit b585e24 into awslabs:main Feb 13, 2023
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