open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.84k stars 1.63k forks source link

[Feature] remove an 'assert' statement in favor of a 'raise' statement to make MultiScaleDeformableAttention compatible with torch.compile() #3126

Open isaacfinberg opened 3 months ago

isaacfinberg commented 3 months ago

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

The goal is to make MultiScaleDeformableAttention compatible with torch.compile().

Modification

The only modification is to change an assert statement to a raise statement and add an error message.

BC-breaking (Optional)

N/A

Use cases (Optional)

The use case is using torch.compile() to make training and inference faster.

Checklist

Before PR:

After PR:

dinkarjuyal commented 3 months ago

+1, this is a blocker for me as well

CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

johnabel commented 3 months ago

+1

mgriffin1994 commented 3 months ago

+1, Would love for this to be fixed

dtborders commented 3 months ago

+1 would be great to see this fixed :)

harshith2794 commented 3 months ago

+1 would be great to have this fixed!