RoMa icon indicating copy to clipboard operation
RoMa copied to clipboard

Recent update greatly increased GPU memory usage

Open ducha-aiki opened this issue 1 year ago • 2 comments

Matching 2 images with 20000 matches works with commit https://github.com/Parskatt/RoMa/commit/69cefb130b3ec7586da792ed897adf6e801acb1a and doesn't with currentmain.

I guess that is because of removing

    torch.backends.cuda.matmul.allow_tf32 = True # allow tf32 on matmul TODO: these probably ruin stuff, should be careful
    torch.backends.cudnn.allow_tf32 = True # allow tf32 on cudnn

ducha-aiki avatar Feb 07 '24 14:02 ducha-aiki

I think it's rather due to the implementation of the KDE which is naive: https://github.com/Parskatt/RoMa/blob/main/roma/utils/kde.py

20k matches from the KDE requires starting from 80k and then resampling down to 20k.

Parskatt avatar Feb 07 '24 14:02 Parskatt

https://github.com/Parskatt/RoMa/pull/22

Parskatt avatar Feb 07 '24 14:02 Parskatt