8000 [Easy][pytree] enable CXX pytree under `torch::deploy` (#130144) · DiweiSun/pytorch@453db63 · GitHub
[go: up one dir, main page]

Skip to content

Commit 453db63

Browse files
XuehaiPanDiweiSun
authored andcommitted
[Easy][pytree] enable CXX pytree under torch::deploy (pytorch#130144)
Pull Request resolved: pytorch#130144 Approved by: https://github.com/zou3519 ghstack dependencies: pytorch#130895, pytorch#130139
1 parent 5cc8e0a commit 453db63

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

torch/utils/_cxx_pytree.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
)
3030
from typing_extensions import deprecated
3131

32-
import torch
33-
34-
if torch._running_with_deploy(): # type: ignore[no-untyped-call]
35-
raise ImportError("C++ pytree utilities do not work with torch::deploy.")
36-
3732
import optree
3833
from optree import PyTreeSpec # direct import for type annotations
3934

0 commit comments

Comments
 (0)
0