mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 04:13:57 +08:00
Suppress pyright redefinition error on legacy amp fallback import
This commit is contained in:
1 parent
9e623f2ff6
commit
4c8c27c11a
1 file changed
+1
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user