Skip to content

Conversation

@min-jean-cho
Copy link
Collaborator

@min-jean-cho min-jean-cho commented Oct 11, 2022

This PR adds linear-batchnormNd folding for JIT frozen graphs.

Performance benchmark
A preliminary benchmark with a simple model of linear+bn1d tested on first socket, physical cores of skylake machine.

FP32, JIT
without linear-bn folding
Screenshot (1368)

with linear-bn folding
Screenshot (1367)

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @mingfeima @XiaobingSuper @ashokei @jingxu10

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 11, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86706

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 879df37:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Oct 11, 2022
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 11, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@min-jean-cho
Copy link
Collaborator Author

@eellison @davidberard98, could you please help review this PR?

@davidberard98 davidberard98 added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 11, 2022
@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@davidberard98
Copy link
Contributor

I started the tests. I will review after they run. If I forget feel free to tag me @min-jean-cho.

Also, please sign the CLA when you get a chance.

@davidberard98 davidberard98 added oncall: jit Add this issue/PR to JIT oncall triage queue open source labels Oct 11, 2022
@davidberard98
Copy link
Contributor

@min-jean-cho I see some build failures. Please take a look. If you aren't sure what the issues are, ping me and I can help investigate.

@min-jean-cho
Copy link
Collaborator Author

Thank you @davidberard98 for the help, I will ping you after resolving the build issues. Thank you!

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@min-jean-cho
Copy link
Collaborator Author

Also, please sign the CLA when you get a chance.

I have signed the CLA, seems like it's taking some time to process.

@davidberard98
Copy link
Contributor

davidberard98 commented Oct 11, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@sanchitintel
Copy link
Collaborator

sanchitintel commented Oct 11, 2022

@min-jean-cho, I think the CLA gets processed immediately with EasyCLA.
It looks like 4 of your commits were pushed with git config that didn't allow EasyCLA to match user.email that it has in its database.

If only the latest commit is considered by EasyCLA, then rebasing with GitHub website UI (as you did earlier once in this PR) would help pass this check.
If that wouldn't help, you can update your git config locally, probably soft reset these 5 commits, then create a single commit, and force push to GitHub.

@min-jean-cho min-jean-cho force-pushed the minjean/lin_bn_folding branch from 4a0db24 to 87f2c4a Compare October 11, 2022 22:32
@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@min-jean-cho min-jean-cho force-pushed the minjean/lin_bn_folding branch from 87f2c4a to 86eca9f Compare October 11, 2022 22:45
@min-jean-cho
Copy link
Collaborator Author

Thank you @davidberard98 @sanchitintel for the guidance. CLA has passed now.

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@samdow samdow added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 12, 2022
@min-jean-cho
Copy link
Collaborator Author

Hi @davidberard98, looks like the meta internal CI/CD has passed as well. Could you please help review when available? Thanks!

@sanchitintel
Copy link
Collaborator

sanchitintel commented Oct 12, 2022

@min-jean-cho, just FYI - that checkmark only suggests that the commit of this PR imported for Meta internal CI checks is the same as the latest commit of this PR, but the status of those CI checks is not visible to folks outside Meta.

@davidberard98 davidberard98 self-requested a review October 13, 2022 04:26
Copy link
Contributor

@davidberard98 davidberard98 left a comment

Choose a reason for hiding this comment

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

@min-jean-cho minor nit: could you use linux newlines instead of dos newlines in the new files you added, just for consistency in the codebase?

still looking at the content of the PR, just wanted to mention that before I forget :)

@min-jean-cho
Copy link
Collaborator Author

min-jean-cho commented Oct 14, 2022

@min-jean-cho minor nit: could you use linux newlines instead of dos newlines in the new files you added, just for consistency in the codebase?
still looking at the content of the PR, just wanted to mention that before I forget :)

Thanks @davidberard98 :) . I double checked that all files were already in linux newlines. Could you help double check this?

@sanchitintel
Copy link
Collaborator

minor nit: could you use linux newlines instead of dos newlines in the new files you added, just for consistency in the codebase?

Thanks, this reminded me that I might also need to fix this in the code already merged, and should proactively check for it in future PRs.

@sanchitintel
Copy link
Collaborator

@pytorchbot rebase -b master

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased minjean/lin_bn_folding onto refs/remotes/origin/master, please pull locally before adding more changes (for example, via git checkout minjean/lin_bn_folding && git pull --rebase)

@pytorchmergebot
Copy link
Collaborator

Successfully rebased minjean/lin_bn_folding onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout minjean/lin_bn_folding && git pull --rebase)

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@davidberard98
Copy link
Contributor

@pytorchbot merge

@davidberard98
Copy link
Contributor

fyi, the previous failure was also a flaky test; if this one doesn't pass we can probably force merge.

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@min-jean-cho
Copy link
Collaborator Author

Thanks @davidberard98 ~ sounds good !

@min-jean-cho
Copy link
Collaborator Author

@davidberard98, I see it's merged! Appreciate your help and review to landing one of my first PRs to PyTorch!

@davidberard98
Copy link
Contributor

@min-jean-cho Glad to help - and sorry it took me so long, feel free to ping me more frequently if you need code review in the future, because sometimes I miss the notifications

@davidberard98
Copy link
Contributor

@pytorchbot revert -m "possibly causing internal build failures, will revert and investigate later" -c ghfirst

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

@min-jean-cho your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Dec 16, 2022
This reverts commit e585156.

Reverted #86706 on behalf of https://github.com/davidberard98 due to possibly causing internal build failures, will revert and investigate later
@davidberard98
Copy link
Contributor

@min-jean-cho sorry about that, we're seeing some internal failures associated with this PR that I need to investigate before we can try re-landing...

do you think you can re-open a second PR with the same contents? (this will help avoid any issues with syncing between the internal and external version of the PR)

min-jean-cho added a commit to min-jean-cho/pytorch that referenced this pull request Dec 16, 2022
pytorchmergebot pushed a commit to min-jean-cho/pytorch that referenced this pull request Dec 18, 2022
pytorchmergebot pushed a commit to min-jean-cho/pytorch that referenced this pull request Dec 19, 2022
pytorchmergebot pushed a commit that referenced this pull request Dec 21, 2022
)

Re-landing #86706

This PR adds linear-batchnormNd folding for JIT frozen graphs.

**Performance benchmark**
A preliminary benchmark with a simple model of linear+bn1d tested on first socket, physical cores of skylake machine.

**FP32, JIT**
without linear-bn folding
![Screenshot (1368)](https://user-images.githubusercontent.com/93151422/195168944-cfc5b920-bc82-4be1-a221-d194c8fa6c18.png)

with linear-bn folding
![Screenshot (1367)](https://user-images.githubusercontent.com/93151422/195168926-267b0515-45a1-4f08-922d-c150845199ae.png)
Pull Request resolved: #91020
Approved by: https://github.com/davidberard98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request intel This tag is for PR from Intel Merged oncall: jit Add this issue/PR to JIT oncall triage queue open source release notes: jit release notes category Reverted triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants