Skip to content

Conversation

wenzhe-nrv
Copy link
Collaborator

@wenzhe-nrv wenzhe-nrv commented Jul 29, 2022

Description

Add oneDNN graph context manager API to be consistent with other fusers.

NNC and nvFuser have two ways to use: 1) a function to enable/disable and 2) a context manager. And the later way is used extensively in libraries like Dynamo. Currently oneDNN Graph fuser only has the former way. To promote the usage of oneDNN graph fuser, this PR creates the context manager for oneDNN graph fuser.

This PR should not affect any performance.

Testing

A unit-test test_context_manager is added under test/test_jit_llga_fuser.py

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 29, 2022

🔗 Helpful links

✅ 1 Base Failures

As of commit c6f5d6ec31 (more details on the Dr. CI page):

Expand to see more

None of the CI failures appear to be your fault 💚



🚧 1 fixed upstream failure:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jul 29, 2022
@wenzhe-nrv
Copy link
Collaborator Author

cc: @chunyuan-w @jgong5

@albanD albanD requested review from eellison and suo August 3, 2022 14:35
@albanD albanD added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 3, 2022
@yanbing-j yanbing-j added the intel This tag is for PR from Intel label Aug 16, 2022
@wenzhe-nrv
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

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

@yanbing-j yanbing-j added the intel priority matters to intel architecture from performance wise label Aug 18, 2022
Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

LGTM, but what would be the test time increase after this one is enabled?

@wenzhe-nrv
Copy link
Collaborator Author

@malfet thank you.

The added test test_context_manager ran in 0.065s based on the log.

Ran 1 test in 0.065s 

@wenzhe-nrv
Copy link
Collaborator Author

@malfet I want to check with you if the above test time is ok and we could merge. Thanks.

@malfet
Copy link
Contributor

malfet commented Sep 1, 2022

@pytorchbot merge -g

Yeah, this test time is fine

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the green (-g) flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR is too stale; the last push date was more than 3 days ago. Please rebase and try again.

Details for Dev Infra team Raised by workflow job

@wenzhe-nrv
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

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

@wenzhe-nrv
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

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

@wenzhe-nrv
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

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

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 12, 2022

🔗 Helpful Links

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

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

✅ No Failures, 1 Pending

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

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

@wenzhe-nrv
Copy link
Collaborator Author

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the green (-g) flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@github-actions
Copy link
Contributor

Hey @wenzhe-nrv.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@wenzhe-nrv wenzhe-nrv deleted the onednn_fuser_api branch September 12, 2022 20:11
mehtanirav pushed a commit that referenced this pull request Oct 4, 2022
### Description
Add oneDNN graph context manager API to be consistent with other fusers.

NNC and nvFuser have two ways to use: 1) a function to enable/disable and 2) a context manager. And the later way is used extensively in libraries like Dynamo. Currently oneDNN Graph fuser only has the former way. To promote the usage of oneDNN graph fuser, this PR creates the context manager for oneDNN graph fuser.

This PR should not affect any performance.

### Testing
A unit-test `test_context_manager` is added under `test/test_jit_llga_fuser.py`

Pull Request resolved: #82491
Approved by: https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed intel priority matters to intel architecture from performance wise intel This tag is for PR from Intel Merged oncall: jit Add this issue/PR to JIT oncall triage queue open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants