MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ValidateGemmParams

Function ValidateGemmParams

tensorflow/lite/kernels/cpu_backend_gemm_params.h:151–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149template <typename AccumScalar, typename DstScalar,
150 QuantizationFlavor quantization_flavor>
151void ValidateGemmParams(
152 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params) {
153 // Guard consistency of the quantized multiplier fields.
154 if (quantization_flavor == QuantizationFlavor::kFloatingPoint) {
155 TFLITE_DCHECK(!params.multiplier_fixedpoint);
156 TFLITE_DCHECK(!params.multiplier_exponent);
157 TFLITE_DCHECK(!params.multiplier_fixedpoint_perchannel);
158 TFLITE_DCHECK(!params.multiplier_exponent_perchannel);
159 } else if (quantization_flavor ==
160 QuantizationFlavor::kIntegerWithUniformMultiplier) {
161 TFLITE_DCHECK(params.multiplier_fixedpoint);
162 // Nothing to check about multiplier_exponent
163 TFLITE_DCHECK(!params.multiplier_fixedpoint_perchannel);
164 TFLITE_DCHECK(!params.multiplier_exponent_perchannel);
165 } else if (quantization_flavor ==
166 QuantizationFlavor::kIntegerWithPerRowMultiplier) {
167 TFLITE_DCHECK(!params.multiplier_fixedpoint);
168 TFLITE_DCHECK(!params.multiplier_exponent);
169 TFLITE_DCHECK(params.multiplier_fixedpoint_perchannel);
170 TFLITE_DCHECK(params.multiplier_exponent_perchannel);
171 }
172}
173
174namespace detail {
175

Callers 2

ValidateParamsFunction · 0.85
MakeRuySpecFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected