[Bootcamp T124004534] Better Transformer fastpath diagnostics (#81013)
Summary:
update the boolean logic for TransformerEncoder => https://www.internalfb.com/code/fbsource/[0da9d46c97ca76432303e55492b1e8b4131c781a]/fbcode/caffe2/torch/nn/modules/transformer.py?lines=206-212%2C228-230
and TransformerEncoderLayer => https://www.internalfb.com/code/fbsource/[0da9d46c97ca76432303e55492b1e8b4131c781a]/fbcode/caffe2/torch/nn/modules/transformer.py?lines=410-417%2C432-436
according to the decision logic => https://www.internalfb.com/code/fbsource/[0da9d46c97ca76432303e55492b1e8b4131c781a]/fbcode/caffe2/torch/nn/modules/activation.py?lines=1059-1091%2C1103-1109
Differential Revision: D37666451
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81013
Approved by: https://github.com/jbschlosser