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
fbshipit-source-id: 3003a51b83bb211345c1d6c6e5bb7e97c19dfeb1
), f"Expect a functionalish op, but get {schema.kind()}{schema}"
248
+
249
+
if (
250
+
op_overloadnotin_func_to_out_variant_map
251
+
andop_overloadnotin_mutable_to_out_variant_map
252
+
):
239
253
# setup out_var
240
254
set_mapping_for_op(op_overload)
241
255
242
-
out_var=_func_to_out_variant_map.get(op_overload)
256
+
ifop_overloadin_mutable_to_out_variant_map:
257
+
out_var=_mutable_to_out_variant_map[op_overload]
258
+
else:
259
+
out_var=_func_to_out_variant_map.get(op_overload)
243
260
244
261
ifnotout_var:
245
262
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