tensorflow/compiler/mlir/lite/quantization/lite/quantize_weights.cc
// In MLIR use_updated_hybrid_scheme = true means per-channel operation.
In MLIR use_updated_hybrid_scheme = true means per-channel operation.
In MLIR use_updated_hybrid_scheme = true means per - channel operation .
TfLiteStatus QuantizeWeights(flatbuffers::FlatBufferBuilder* builder,
                             const tflite::Model* input_model,
                             BufferType quant_type,
                             bool use_updated_hybrid_scheme) {
  tflite::StderrReporter error_reporter;
  tflite::TensorType inference_type;
  switch (quant_type) {
    case BufferType::QUANTIZED_FLOAT16:
      inference_type = tflite::TensorType_FLOAT16;
      break;
    default:
      inference_type = tflite::TensorType_INT8;
  }
  return QuantizeWeights(builder, input_model, &error_reporter, inference_type,
                         {},
                         {},
                         1024,
                         !use_updated_hybrid_scheme,
                         false,
                         true);
}
TfLiteStatus QuantizeWeights ( flatbuffers :: FlatBufferBuilder * builder , const tflite :: Model * input_model , BufferType quant_type , bool use_updated_hybrid_scheme ) { tflite :: StderrReporter error_reporter ; tflite :: TensorType inference_type ; switch ( quant_type ) { case BufferType :: QUANTIZED_FLOAT16 : inference_type = tflite :: TensorType_FLOAT16 ; break ; default : inference_type = tflite :: TensorType_INT8 ; } return QuantizeWeights ( builder , input_model , & error_reporter , inference_type , { } , { } , 1024 , ! use_updated_hybrid_scheme , false , true ) ; }
In MLIR use_updated_hybrid_scheme = true means per-channel operation.
In MLIR use_updated_hybrid_scheme = true means per - channel operation .
/*denylisted_ops=*/ /*custom_op_map=*/ /*minimum_elements_for_weights=*/ /*disable_per_channel=*/ /*weight_only_quantization=*/ /*legacy_float_scale=*/