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

Compile problem from source with cuda support #648

Open
KardRi opened this issue Dec 7, 2023 · 0 comments
Open

Compile problem from source with cuda support #648

KardRi opened this issue Dec 7, 2023 · 0 comments

Comments

@KardRi
Copy link

KardRi commented Dec 7, 2023

I am trying to compile qsimcirq with cuda support from source and also tried v0.19.0 release zip, since the precompiled version on pypi doesn't come with cuda. (gpu_mode=1 or 2 doesn't work)

Following the instructions here https://quantumai.google/qsim/tutorials/gcp_gpu, after pip install -v ., first I met cmake complaining about target_link_libraries should be all keyword or all plain. The conflict resolves by adding keyword (PUBLIC?) to FindCUDA.cmake (deprecated cmake module) or instead using findCUDAToolKit for all the CMakeList under pybind_interface folder.

CMake Error at pybind_interface/cuda/CMakeLists.txt:30 (target_link_libraries):
      The plain signature for target_link_libraries has already been used with
      the target "qsim_cuda".  All uses of target_link_libraries with a target
      must be either all-keyword or all-plain.

      The uses of the plain signature are here:

       * /usr/local/share/cmake-3.24/Modules/FindCUDA.cmake:1996 (target_link_libraries)

Next I encounter the error about the code itself and have no idea how to get rid of.

/home/user/qsim19/qsim-0.19.0/pybind_interface/cuda/pybind_main_cuda.cpp(30): error: no instance of constructor "qsim::StateSpaceCUDA<FP>::Parameter::Parameter [with FP=float]" matches the argument list
                argument types are: (unsigned int, unsigned int)
          ) : ss_params{num_state_threads, num_dblocks} {}
                       ^

    1 error detected in the compilation of "/home/user/qsim19/qsim-0.19.0/pybind_interface/cuda/pybind_main_cuda.cpp".

I am using Ubuntu 20.04, python 3.8/3.10, cuda 12.3, tried gcc11.1.0 or gcc9.4.0, cmake 3.27.9/3.24 on python venv, tried several configurations, all stucks here.

CUQUANTUM_ROOT is set to the python package ~/.local/lib/python3.8/site-packages/cuquantum/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant