报错:Faiss assertion 'err == CUBLAS_STATUS_SUCCESS' failed in void faiss::gpu::runMatrixMult(faiss::gpu::Tensor<flo
at, 2, true>&, bool, faiss::gpu::Tensor<T, 2, true>&, bool, faiss::gpu::Tensor<IndexType, 2, true>&, bool, flo
at, float, cublasHandle_t, cudaStream_t) [with AT = float; BT = float; cublasHandle_t = cublasContext*; cudaSt
ream_t = CUstream_st*] at /project/faiss/faiss/gpu/utils/MatrixMult-inl.cuh:265; details: cublas failed (13):
(512, 512) x (50000, 512)' = (512, 50000) gemm params m 50000 n 512 k 512 trA T trB N lda 512 ldb 512 ldc 5000

原因分析:github上说是因为pip安装不可用,使用conda安装官方库中的版本

解决办法:

安装cpu版本:

conda install faiss-cpu -c pytorch

安装gpu版本:

# 安装faiss的GPU 版本
conda install faiss-gpu cudatoolkit=8.0 -c pytorch # For CUDA8
conda install faiss-gpu cudatoolkit=9.0 -c pytorch # For CUDA9
conda install faiss-gpu cudatoolkit=10.0 -c pytorch # For CUDA10
conda install faiss-gpu cudatoolkit=11.0 -c pytorch # For CUDA11

问题解决!

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐