@@ -150,9 +150,13 @@ inline bool check_cpuid() {
150150}
151151// clang-format on
152152
153- // Check if the SVS implementation supports Qquantization mode
153+ // Check if the SVS implementation supports Quantization mode
154154// @param quant_bits requested SVS quantization mode
155155// @return pair<fallbackMode, bool>
156+ // @note even if VecSimSvsQuantBits is a simple enum value,
157+ // in theory, it can be a complex type with a combination of modes:
158+ // - primary bits, secondary/residual bits, dimesionality reduction, etc.
159+ // which can be incompatible to each-other.
156160inline std::pair<VecSimSvsQuantBits, bool > isSVSQuantBitsSupported (VecSimSvsQuantBits quant_bits) {
157161 // If HAVE_SVS_LVQ is not defined, we don't support any quantization mode
158162 // else we check if the CPU supports SVS LVQ
@@ -163,9 +167,13 @@ inline std::pair<VecSimSvsQuantBits, bool> isSVSQuantBitsSupported(VecSimSvsQuan
163167 ;
164168
165169 // If the quantization mode is not supported, we fallback to non-quantized mode
170+ // - this is temporary solution until we have a basic quantization mode in SVS
171+ // TODO: use basic SVS quantization as a fallback for unsupported modes
166172 auto fallBack = supported ? quant_bits : VecSimSvsQuant_NONE;
167173
168- // And always return true, as far as non-quantized mode is always supported
174+ // And always return true, as far as fallback mode is always supported
175+ // Upon further decision changes, some cases should treated as not-supported
176+ // So we will need return false.
169177 return std::make_pair (fallBack, true );
170178}
171179} // namespace svs_details
0 commit comments