pytorch
a2cccb2d - add oneDNN graph fuser context API and unittest (#82491)

Commit
2 years ago
add oneDNN graph fuser context API and unittest (#82491) ### 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: https://github.com/pytorch/pytorch/pull/82491 Approved by: https://github.com/malfet
Author
Committer
Parents
Loading