Compile vector search lib without AVX2

Hey there,

We distribute Couchbase Lite in our desktop application, and we’re running into difficultites with vector search on devices without AVX2 support. I know this is expected behavior, but this is impacting more users than we’d like, so we need to develop a workaround.

I noticed that vector search uses the FAISS library which appears to have a cmake flag to disable AVX2. I believe the source code for vector search is private so we can’t recompile this ourselves, but would it be possible for Couchase to distribute alternative vector search libs with AVX2 disabled?

We’re also working on detecting at runtime if the CPU has AVX2 support, but this is a little dangerous becuase if it returns a false positive then our app will crash.

Thanks for the help,
Brian

I don’t think this is something we can consider because it has a high cost associated with maintenance versus the benefit of getting support for devices over a decade old. However, I can say that we also do runtime detection of AVX2 and so it’s possible, and probably not very error prone (if a false positive happens we’d be able to point the finger at cpuid returning an invalid value).

Thanks for the reply. I totally get the concerns about the maintenance cost for legacy device support - we were in the same boat at first. However, we found that 5-10% of our user base are on these older devices. This isn’t a acceptable amount, so we had to release a pretty hacky/slow patch for these users. With that in mind, could you consider an alternative that minimizes the dev impact on your team or allows us to take on more of the implementation? We’re more than willing to collaborate. Thanks