@@ -279,14 +279,11 @@ def set_spec(module, options):
279279 update_program (* get_program_info (exported_program ))
280280
281281
282- def get_preserve_ops () -> Tuple [torch ._ops .OpOverload , ...]:
283- return (torch .ops .aten .adaptive_avg_pool2d .default ,)
284-
285-
286282def get_decomp_table () -> Dict [torch ._ops .OperatorBase , Callable ]:
287283 source_decompositions = core_aten_decompositions ()
288284 # The below super ops are supported by QNN
289285 skip_decompositions = [
286+ torch .ops .aten .adaptive_avg_pool2d .default ,
290287 torch .ops .aten .pixel_shuffle .default ,
291288 torch .ops .aten .pixel_unshuffle .default ,
292289 torch .ops .aten .hardsigmoid .default ,
@@ -342,7 +339,7 @@ def capture_program(
342339 custom_pass_config : FrozenSet [str ] = frozenset (),
343340) -> exir .ExirExportedProgram :
344341 ep = torch .export .export (module , inputs )
345- decomposed_ep = ep .run_decompositions (get_decomp_table (), get_preserve_ops () )
342+ decomposed_ep = ep .run_decompositions (get_decomp_table ())
346343 # We choose call_operator by target in ConvertBinaryOpsWithScalar
347344 # because it is the same source_fn_stack for MultiheadAttention
348345 # TODO: Should modify the scalar op in the op builder instead of
0 commit comments