Skip to content

Commit

Permalink
Fix exporting qnn quantized model (#3513)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3513

As title, a small bug preventing qnn quantized model to be exported.

Reviewed By: cccclai

Differential Revision: D56954147

fbshipit-source-id: c8f900824ac9c7a94fdcb59c102c498e1c2efc3d
  • Loading branch information
Yupeng Zhang authored and facebook-github-bot committed May 6, 2024
1 parent 9ceee37 commit f96e035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/models/llama2/export_llama_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def _export_llama(modelname, args) -> str: # noqa: C901
quantizers = get_pt2e_quantizers(pt2e_quant_params, args)
quant_dtype = None
if args.qnn and args.pt2e_quantize:
assert quantizers is None, "Should not enable both xnnpack and qnn"
assert len(quantizers) == 0, "Should not enable both xnnpack and qnn"
qnn_quantizer, quant_dtype = get_qnn_quantizer(args)
quantizers.append(qnn_quantizer)

Expand Down

0 comments on commit f96e035

Please sign in to comment.