|
23 | 23 | make_output_dir,
|
24 | 24 | make_quantizer,
|
25 | 25 | parse_skip_delegation_node,
|
26 |
| - QnnPartitioner, |
27 | 26 | setup_common_args_and_variables,
|
28 | 27 | SimpleADB,
|
29 | 28 | )
|
@@ -273,19 +272,15 @@ def calibrator(gm):
|
273 | 272 |
|
274 | 273 | quantizer = make_quantizer(quant_dtype=quant_dtype)
|
275 | 274 | backend_options = generate_htp_compiler_spec(quant_dtype is not None)
|
276 |
| - partitioner = QnnPartitioner( |
277 |
| - generate_qnn_executorch_compiler_spec( |
278 |
| - soc_model=getattr(QcomChipset, args.model), |
279 |
| - backend_options=backend_options, |
280 |
| - ), |
281 |
| - skip_node_id_set=skip_node_id_set, |
282 |
| - skip_node_op_set=skip_node_op_set, |
| 275 | + compiler_specs = generate_qnn_executorch_compiler_spec( |
| 276 | + soc_model=getattr(QcomChipset, args.model), |
| 277 | + backend_options=backend_options, |
283 | 278 | )
|
284 | 279 | # skip embedding layer cause it's quantization sensitive
|
285 | 280 | graph_module, _ = skip_annotation(
|
286 | 281 | nn_module=model,
|
287 | 282 | quantizer=quantizer,
|
288 |
| - partitioner=partitioner, |
| 283 | + compiler_specs=compiler_specs, |
289 | 284 | sample_input=inputs[0],
|
290 | 285 | calibration_cb=calibrator,
|
291 | 286 | fp_node_op_set={torch.ops.aten.embedding.default},
|
|
0 commit comments