Commit 4bc6426
Han Wang
fix(pt): guard against double-loading libdeepmd_op_pt.so
When JAX backend loads libdeepmd_op_pt.so first, a subsequent
import deepmd.pt triggers cxx_op.py to load it again, causing a
fatal c10::Error double-registration crash. Add a guard that checks
if ops are already registered before calling torch.ops.load_library.1 parent 443a140 commit 4bc6426
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
0 commit comments