Skip to content

fused-local-corr/local_corr/ops.py has VRAM leak when used with RoMaV2 #40

@ferrouswheel

Description

@ferrouswheel

When running 100s of images through RoMA installed with romav2[fused-local-corr] the VRAM continues to creep upwards.

The solution appears to be changing these lines in fused-local-corr/local_corr/ops.py

89      saved_a = a if ctx.needs_input_grad[0] else None                                                                                                
90 -    saved_b = b if ctx.needs_input_grad[0] else None                                                                                                
91 -    saved_c = c if ctx.needs_input_grad[0] else None                                                                                                
90 +    saved_b = b if ctx.needs_input_grad[1] else None                                                                                                
91 +    saved_c = c if ctx.needs_input_grad[2] else None

Since fused-local-corr is on a gitlab instance I have no access to, I am unable to submit a patch directly to https://gitlab.liu.se/johed13/fused-local-corr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions