File tree Expand file tree Collapse file tree
python/src/coreai_models/export Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def quantize_pytorch_model(
122122 calibration_data_fn: Optional function that returns calibration data samples.
123123 Required when calibrate_activations is enabled.
124124 export_backend: Backend for the finalized quantized model.
125- Defaults to ExportBackend.MLIR if not specified.
125+ Defaults to ExportBackend.CoreAI if not specified.
126126
127127 Returns:
128128 Quantized model ready for the specified export backend.
@@ -135,7 +135,7 @@ def quantize_pytorch_model(
135135 _require_coreai_opt ()
136136
137137 if export_backend is None :
138- export_backend = ExportBackend .MLIR
138+ export_backend = ExportBackend .CoreAI
139139
140140 run_calibration = quantization_config .pop ("calibrate_activations" , False )
141141 config = QuantizerConfig .from_dict ({"quantization_config" : quantization_config })
@@ -240,7 +240,7 @@ def palettize_pytorch_model(
240240 palettizer = KMeansPalettizer (model , config )
241241 prepared_model = palettizer .prepare (example_inputs = example_inputs , num_workers = 32 )
242242
243- finalized_model = palettizer .finalize (prepared_model , backend = ExportBackend .MLIR )
243+ finalized_model = palettizer .finalize (prepared_model , backend = ExportBackend .CoreAI )
244244
245245 logger .info ("Palettization with coreai-opt complete" )
246246 return finalized_model
You can’t perform that action at this time.
0 commit comments