一、错误示例
首先尝试使用pip安装faiss-gpu
pip install faiss-gpu
报错:
Faiss assertion 'err == CUBLAS_STATUS_SUCCESS' failed in void faiss::gpu::runMatrixMult(faiss::gpu::Tensor<float, 2, true>&, bool, faiss::gpu::Tensor<T, 2, true>&, bool, faiss::gpu::Tensor<IndexType, 2, true>&, bool, float, float, cublasHandle_t, cudaStream_t) [with AT = float; BT = float; cublasHandle_t = cublasContext*; cudaStream_t = CUstream_st*] at /project/faiss/faiss/gpu/utils/MatrixMult-inl.cuh:265; details: cublas failed (13): (512, 2) x (2, 128)' = (512, 2) gemm params m 2 n 512 k 128 trA T trB N lda 128 ldb 128 ldc 2
尝试利用conda安装
conda install faiss-gpu
找不到资源。
二、解决方式
切换清华源
conda config --add channels https://mirrors.tuna.ts