File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 29
29
OperatorNode ,
30
30
ValueNode ,
31
31
)
32
+
33
+ from torch ._higher_order_ops .auto_functionalize import (
34
+ auto_functionalized ,
35
+ auto_functionalized_v2 ,
36
+ )
32
37
from torch ._subclasses import FakeTensor
33
38
34
39
@@ -121,6 +126,12 @@ def _parse_args( # noqa: C901
121
126
# pyre-ignore
122
127
named_args = node .target ._schema .arguments
123
128
129
+ if node .op == "call_function" and (
130
+ node .target == auto_functionalized or node .target == auto_functionalized_v2
131
+ ):
132
+ # for functioanlized HOPs, args for the corresponding functional op are stored in kwargs
133
+ args = tuple (kwargs .values ())
134
+
124
135
for index , arg in enumerate (args ):
125
136
if isinstance (arg , torch .fx .node .Node ):
126
137
if arg .target == exir .memory .alloc :
You can’t perform that action at this time.
0 commit comments