π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
remove deprecated torch.cuda.amp fallback in lightglue (#3775)
Faizan Inamdar1357f7014291
diff --git a/kornia/feature/lightglue.py b/kornia/feature/lightglue.pyindex 7568ad133..bb8e7aef7 100644--- a/kornia/feature/lightglue.py+++ b/kornia/feature/lightglue.py@@ -44,11 +44,7 @@ def math_clamp(x, min_, max_): # type: ignorereturn min(max(x, min_), max_)-AMP_CUSTOM_FWD_F32 = (- torch.amp.custom_fwd(cast_inputs=torch.float32, device_type="cuda")- if hasattr(torch, "amp") and hasattr(torch.amp, "custom_fwd")- else torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)-)+AMP_CUSTOM_FWD_F32 = torch.amp.custom_fwd(cast_inputs=torch.float32, device_type="cuda")@AMP_CUSTOM_FWD_F32