Skip to content

Commit

Permalink
Fix library path to cuQuantum and cuTENSOR (Qiskit#1801)
Browse files Browse the repository at this point in the history
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
  • Loading branch information
2 people authored and hitomitak committed May 17, 2023
1 parent 3607961 commit a51c5ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ if(AER_THRUST_SUPPORTED)
set(AER_COMPILER_DEFINITIONS ${AER_COMPILER_DEFINITIONS} AER_CUSTATEVEC AER_CUTENSORNET)
if(DEFINED CUQUANTUM_ROOT)
set(AER_COMPILER_FLAGS "${AER_COMPILER_FLAGS} -I${CUQUANTUM_ROOT}/include")
set(THRUST_DEPENDANT_LIBS "-L${CUQUANTUM_ROOT}/lib")
set(THRUST_DEPENDANT_LIBS "-L${CUQUANTUM_ROOT}/lib/${CUDA_VERSION_MAJOR}")
endif()
if(DEFINED CUTENSOR_ROOT)
set(AER_COMPILER_FLAGS "${AER_COMPILER_FLAGS} -I${CUTENSOR_ROOT}/include")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUTENSOR_ROOT}/lib/11")
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -L${CUTENSOR_ROOT}/lib/${CUDA_VERSION_MAJOR}")
endif()
if(CUQUANTUM_STATIC)
set(THRUST_DEPENDANT_LIBS "${THRUST_DEPENDANT_LIBS} -lcustatevec_static -lcutensornet_static -lcutensor -lcublas")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
This is fix for library path setting in CMakeLists.txt for cuQuantum SDK.
Because the latest cuQuantum includes libraries for CUDA 11.x and 12.x,
this fix uses CUDA version returned from FindCUDA to the path of libraries
of cuQuantum and cuTENSOR.

0 comments on commit a51c5ba

Please sign in to comment.