@@ -279,14 +279,11 @@ def set_spec(module, options):
279
279
update_program (* get_program_info (exported_program ))
280
280
281
281
282
- def get_preserve_ops () -> Tuple [torch ._ops .OpOverload , ...]:
283
- return (torch .ops .aten .adaptive_avg_pool2d .default ,)
284
-
285
-
286
282
def get_decomp_table () -> Dict [torch ._ops .OperatorBase , Callable ]:
287
283
source_decompositions = core_aten_decompositions ()
288
284
# The below super ops are supported by QNN
289
285
skip_decompositions = [
286
+ torch .ops .aten .adaptive_avg_pool2d .default ,
290
287
torch .ops .aten .pixel_shuffle .default ,
291
288
torch .ops .aten .pixel_unshuffle .default ,
292
289
torch .ops .aten .hardsigmoid .default ,
@@ -342,7 +339,7 @@ def capture_program(
342
339
custom_pass_config : FrozenSet [str ] = frozenset (),
343
340
) -> exir .ExirExportedProgram :
344
341
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 ())
346
343
# We choose call_operator by target in ConvertBinaryOpsWithScalar
347
344
# because it is the same source_fn_stack for MultiheadAttention
348
345
# TODO: Should modify the scalar op in the op builder instead of
0 commit comments