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

Some refactoring #15

Merged
merged 36 commits into from
Jan 12, 2021
Merged

Some refactoring #15

merged 36 commits into from
Jan 12, 2021

Conversation

siddharth-krishna
Copy link
Collaborator

This PR will make the following changes:

  • Rename Module to Function to be consistent with MLIR
  • Add a name property to Function
  • Unify type and shape inference into a single pass to be performed after the full Function is constructed
  • At op creation time, only look up op signature in terms of number of inputs and outputs
  • Use dataclasses to define core IR classes and use the frozen option to ensure they are immutable (should Functions be immutable? Shape/type inference happens after creation. Discussion needed.)
  • Removes any leftover uses of deepcopy.

So far, I've only done the renaming, but I'm opening the PR so we can discuss any issues early.

Also, this is going to touch pretty much every file, so we should figure out how to handle merge conflicts with the pipeline parallel PR.

@santhnm2
Copy link
Collaborator

Those list of changes sound good, and good find on dataclasses - this is exactly the functionality I was trying to replicate in my commits yesterday re: removing ModuleView. :) Will this remove the need to do deep copies though?

@santhnm2
Copy link
Collaborator

I rebased this branch off of main after merging #12 - all the tests pass but there's an issue with prettyprint.py which I left a comment about

@siddharth-krishna siddharth-krishna mentioned this pull request Jan 4, 2021
siddharth-krishna and others added 3 commits January 5, 2021 16:04
* Make dataclass types hashable and update SequentialExecutor tests

* Remove main from sequential executor tests

* Fix pipeline parallel scheduler
Copy link
Collaborator Author

@siddharth-krishna siddharth-krishna left a comment

Choose a reason for hiding this comment

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

Thanks for your PR to this PR. :)
I had some minor questions which I've added as a review here since I merged your PR into this one.

@siddharth-krishna siddharth-krishna merged commit 3c9905b into main Jan 12, 2021
@siddharth-krishna siddharth-krishna deleted the refactor branch January 12, 2021 22:16
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