LightGlue icon indicating copy to clipboard operation
LightGlue copied to clipboard

@torch.cuda.amp.custom_fwd deprecated on newer versions of PyTorch

Open Parskatt opened this issue 5 months ago • 0 comments

@torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) in https://github.com/cvg/LightGlue/blob/main/lightglue/lightglue.py#L24

gives

FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)

I think it's not as simple as changing it, as I can't find torch.amp.custom_fwd for old PyTorch versions (and seems like you want to support back to 1.9). Anyway, just a heads up.

Parskatt avatar Sep 14 '24 07:09 Parskatt