File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import sympy
19
19
import torch
20
+ from torch ._dispatch .python import enable_python_dispatcher
20
21
from torch ._dynamo .convert_frame import compile_lock
21
22
from torch .fx .experimental import proxy_tensor
22
23
from torch .utils ._pytree import tree_map_only
@@ -2151,7 +2152,7 @@ def _to_proxy(arg: TypeInfo) -> object:
2151
2152
2152
2153
def propagate_types (func : HostFunction , fake_args : list [object ]) -> None :
2153
2154
# Lock needed since patch.object(torch.SymInt.__index__, ...) is not thread safe
2154
- with compile_lock , func :
2155
+ with compile_lock , func , enable_python_dispatcher () :
2155
2156
global_scope = GlobalScope (function = func )
2156
2157
local_scope = LocalScope (parent = global_scope )
2157
2158
params = inspect .signature (func .fn ).bind (* fake_args )
You can’t perform that action at this time.
0 commit comments