diff --git a/faiss/gpu/GpuIndexIVFPQ.cu b/faiss/gpu/GpuIndexIVFPQ.cu index da0e5ac8f3..f6e314e9b6 100644 --- a/faiss/gpu/GpuIndexIVFPQ.cu +++ b/faiss/gpu/GpuIndexIVFPQ.cu @@ -566,17 +566,13 @@ void GpuIndexIVFPQ::verifyPQSettings_() const { "Bits per code must be 8 (passed %d)", bitsPerCode_); } - } - - // The number of bytes per encoded vector must be one we support - FAISS_THROW_IF_NOT_FMT( - ivfpqConfig_.interleavedLayout || - IVFPQ::isSupportedPQCodeLength(subQuantizers_), - "Number of bytes per encoded vector / sub-quantizers (%d) " - "is not supported", - subQuantizers_); - - if (!should_use_cuvs(config_)) { + // The number of bytes per encoded vector must be one we support + FAISS_THROW_IF_NOT_FMT( + ivfpqConfig_.interleavedLayout || + IVFPQ::isSupportedPQCodeLength(subQuantizers_), + "Number of bytes per encoded vector / sub-quantizers (%d) " + "is not supported", + subQuantizers_); // Sub-quantizers must evenly divide dimensions available FAISS_THROW_IF_NOT_FMT( this->d % subQuantizers_ == 0,