mmdetection icon indicating copy to clipboard operation
mmdetection copied to clipboard

[Feature] BetterTransformer in PyTorch 1.13

Open levan92 opened this issue 2 years ago • 1 comments

What's the feature?

BetterTransformer, now with stable versions in PyTorch 1.13, allows for accelerated forward pass for "free". More details here. If torch.nn.MultiheadAttention is used, we get these without any code change at all as described here. However, it seems like for some of our models in mmdetection, say, Swin, it is using our own implemented MHSA via mmdet.models.backbones.swin.WindowMSA. Do we have plans to integrate these accelerations into mmdet?

Any other context?

No response

levan92 avatar Dec 01 '22 01:12 levan92

Thank you very much for your suggestion, if you have time it is very hopeful that you can contribute algorithms to MMDetection!

BIGWangYuDong avatar Dec 01 '22 13:12 BIGWangYuDong