You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: move _load_custom_ops after deepmd.pt import in gen scripts
The _load_custom_ops() call was placed before deepmd.pt was imported,
so the guard `hasattr(torch.ops.deepmd, "border_op")` didn't see the
op registered by the standard install path. This caused the build
directory's .so to be loaded, and then when deepmd.pt was imported
later for .pth export, it loaded the same op again — crash.
Fix: move _load_custom_ops() to after the deepmd.pt import so the
guard correctly detects the already-registered op and skips.
0 commit comments