Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA12 Compile failed, cublas.h and cublas_v2.h conflict #2655

Closed
3 of 4 tasks
matrixji opened this issue Jan 9, 2023 · 0 comments
Closed
3 of 4 tasks

CUDA12 Compile failed, cublas.h and cublas_v2.h conflict #2655

matrixji opened this issue Jan 9, 2023 · 0 comments
Labels

Comments

@matrixji
Copy link
Contributor

matrixji commented Jan 9, 2023

Summary

As cuda12 "Disallow including cublas.h and cublas_v2.h in the same translation unit."

Platform

Ubuntu 22.04 + Cuda 12.0 x86_64

Faiss version: master 38bf321

Installed from: Compile from source

Faiss compilation options: "cmake -DFAISS_ENABLE_C_API=YES .."

Running on:

  • CPU
  • GPU

Interface:

  • C++
  • Python

Actually, it should be an error from c_api

Reproduction instructions

make, will leads below error:

[ 69%] Building CXX object c_api/CMakeFiles/faiss_c.dir/gpu/DeviceUtils_c.cpp.o
In file included from /home/jibin/working/faiss/faiss/gpu/utils/DeviceUtils.h:10,
                 from /home/jibin/working/faiss/c_api/gpu/DeviceUtils_c.cpp:12:
/usr/local/cuda/include/cublas_v2.h:59:2: error: #error "It is an error to include both cublas.h and cublas_v2.h"
   59 | #error "It is an error to include both cublas.h and cublas_v2.h"
      |  ^~~~~

And changing cublas.h => cublas_v2.h in c_api/gpu/DeviceUtils_c.h could resolve this issue.

I'll provide PR for it.

@mdouze mdouze added the GPU label Jan 9, 2023
Enet4 pushed a commit to Enet4/faiss that referenced this issue Aug 26, 2023
Summary:
Closes facebookresearch#2655

Pull Request resolved: facebookresearch#2656

Reviewed By: algoriddle

Differential Revision: D42471852

Pulled By: mdouze

fbshipit-source-id: 72162acc1590e565cdfcbd78510ae757c396e970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants