NGT: Cannot use QuantizedGraph::quantize

Hello @masajiro ,

I am adapting ngt-rs to latest NGT 2.0 and I am having trouble with QuantizedGraph::quantize. In versions 1.14.x I used to call quantize on a path containing a pre-built NGT index and it worked fine. Now I get the error:

QuantizedGraph::quantize: Quantized graph is already existed.

It looks like the issue is at this test, however if NGTQ_QBG is not defined we branch to the same test but this time it will quantize the graph (same behavior as before 2.0 I guess).

Is there something I am not using correctly ? When QBG is enabled we cannot use QuantizedGraph ?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (21 by maintainers)

Most upvoted comments

Whenever NGT is built with NGT_SHARED_MEMORY_ALLOCATOR=ON, QBG and QG are disabled.

@dmyzk found how to avoid this issue as well. Thanks!

Since cargo build environment is a little different from ordinary build environments, you have to explicitly specify using AVX2, even if the cpu has AVX2. Could you insert the line below to this line? config.define("NGT_AVX2", "ON");

When you build it, please add --release. cargo build --release