We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 728043e commit 9a517a9Copy full SHA for 9a517a9
torch_xla/experimental/unbounded_dynamism_export.py
@@ -8,6 +8,7 @@
8
from torch.fx import Graph, GraphModule, subgraph_rewriter
9
from torch.utils import _pytree as pytree
10
from torch.utils._pytree import tree_map
11
+from torch._dispatch.python import enable_python_dispatcher
12
13
aten = torch.ops.aten
14
@@ -30,7 +31,8 @@ def call_function(
30
31
) -> torch.fx.Node:
32
node = graph.call_function(target, args, kwargs)
33
_, args, kwargs = get_fake_args_kwargs(node)
- node.meta["val"] = target(*args, **kwargs)
34
+ with enable_python_dispatcher():
35
+ node.meta["val"] = target(*args, **kwargs)
36
return node
37
38
0 commit comments