retry - enable NVFuser by default

Enable NVFuser in OSS.

Retry of #77213, because it was breaking torchvision tests.

Fix in #77471 has been verified by jjsjann123

Pull Request resolved: https://github.com/pytorch/pytorch/pull/77579

Approved by: https://github.com/eellison, https://github.com/malfet, https://github.com/atalman, https://github.com/seemethere
This commit is contained in:
David Berard
2022-05-16 11:28:28 -07:00
committed by PyTorch MergeBot
parent 2bc2adf2ba
commit 38bc10ae25

View File

@ -111,9 +111,12 @@ class NVFuserEnabler {
if (getCachedFuserEnabledEnvVar().has_value()) {
return *getCachedFuserEnabledEnvVar();
}
// 3. default value (if you switch this to true, make sure
// to check nvfuserCanBeEnabled())
// 3. default value
#ifdef FBCODE_CAFFE2
return false;
#else
return nvfuserCanBeEnabled();
#endif
}
public: