You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for SchemaKind.mutable to to_out_variant (#2541)
Summary:
Pull Request resolved: #2541
Ideally custom mutator ops would not be in aten OpOverload but would instead be edge ops. The pass that results in mutator ops being in the graph is shared with core for now though and its hard to mix and match EP passes and GM passes. So just add the logic to the otherwise unused aten to_out_variant code.
Reviewed By: larryliu0820
Differential Revision: D55156605
), f"Expect a functionalish op, but get{schema.kind()}{schema}"
237
247
238
-
ifop_overloadnotin_func_to_out_variant_map:
248
+
if (
249
+
op_overloadnotin_func_to_out_variant_map
250
+
andop_overloadnotin_mutable_to_out_variant_map
251
+
):
239
252
# setup out_var
240
253
set_mapping_for_op(op_overload)
241
254
242
-
out_var=_func_to_out_variant_map.get(op_overload)
255
+
ifop_overloadin_mutable_to_out_variant_map:
256
+
out_var=_mutable_to_out_variant_map[op_overload]
257
+
else:
258
+
out_var=_func_to_out_variant_map.get(op_overload)
243
259
244
260
ifnotout_var:
245
261
msg=f"Missing out variant for functional op: {schema} . Make sure you have loaded your custom operator library for compiler. E.g., custom_ops_generated_lib"
0 commit comments