Suppress pyright redefinition error on legacy amp fallback import

This commit is contained in:
yesMohanHere committed 2026-07-18 00:23:27 +05:30
1 parent 9e623f2ff6
commit 4c8c27c11a
1 file changed
+1 -1
+1 -1
View File
@@ -33,7 +33,7 @@ try:
custom_bwd = _custom_bwd(device_type="cuda")
except ImportError:
# torch < 2.4: custom_fwd/custom_bwd live in torch.cuda.amp (no device_type argument)
from torch.cuda.amp import custom_bwd, custom_fwd
from torch.cuda.amp import custom_bwd, custom_fwd # type: ignore
class _TruncExp(Function):