Skip to content

c api - faiss_index_cpu_to_gpu_multiple_with_options not available from c api  #2357

@AviadHAv

Description

@AviadHAv

Summary

Platform

OS: linux ubuntu 18.04

Faiss version: c08cbff v1.7.2

Installed from: compiled from source

Faiss compilation options: -DBUILD_TESTING=OFF -DFAISS_ENABLE_GPU=ON -DCMAKE_CXX_COMPILER=g++-6 -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON -DFAISS_ENABLE_PYTHON=OFF -DFAISS_OPT_LEVEL=avx2

Running on:

  • CPU
  • GPU

Interface:

  • C
  • C++
  • Python

Reproduction instructions

compiling faiss from source version 1.7.2

cd /faiss && git checkout v1.7.2 && cmake -B build . -DBUILD_TESTING=OFF -DFAISS_ENABLE_GPU=ON -DCMAKE_CXX_COMPILER=g++-6 -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON -DFAISS_ENABLE_PYTHON=OFF -DFAISS_OPT_LEVEL=avx2\
    && make -C build -j4 faiss \
    && make -C build -j4 install \
    && cp ./build/c_api/libfaiss_c.so /usr/lib/

Problem

while compiling faiss to consume from c app the function faiss_index_cpu_to_gpu_multiple_with_options is supported only in cpp and not from c

root@2d434f518b21:/build/reid-service# readelf --symbols --wide /usr/lib/libfaiss_c.so | grep faiss_index_cpu_to_gpu_multiple_with_options
   272: 0000000000030475  1170 FUNC    GLOBAL DEFAULT   12 _Z44faiss_index_cpu_to_gpu_multiple_with_optionsPP27FaissGpuResourcesProvider_HmPimPK12FaissIndex_HPK23FaissGpuClonerOptions_HPPS3_
   491: 0000000000030475  1170 FUNC    GLOBAL DEFAULT   12 _Z44faiss_index_cpu_to_gpu_multiple_with_optionsPP27FaissGpuResourcesProvider_HmPimPK12FaissIndex_HPK23FaissGpuClonerOptions_HPPS3_

i wanted to get this from readelf faiss_index_cpu_to_gpu_multiple_with_options but got this_Z44faiss_index_cpu_to_gpu_multiple_with_optionsPP27FaissGpuResourcesProvider_HmPimPK12FaissIndex_HPK23FaissGpuClonerOptions_HPPS3_

while other functions are aviable for c api

566: 000000000002fff7  1150 FUNC    GLOBAL DEFAULT   12 faiss_index_cpu_to_gpu_multiple
   308: 000000000002fff7  1150 FUNC    GLOBAL DEFAULT   12 faiss_index_cpu_to_gpu_multiple

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions