I tried to change the version of pennylane-lightning-gpu but the same error still happens.
Here is my procedure to install pennylane-gpu vesion.
step 1: pip install cuquantum-python-cu11 (installed successfully)
step 2: pip install PennyLane-Lightning-GPU==0.33.0 (failed.)
Below is the info of nvidia smi.
±----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.12 Driver Version: 525.85.12 CUDA Version: 12.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA A800 80G… Off | 00000000:CA:00.0 Off | Off |
| N/A 28C P0 62W / 300W | 1643MiB / 81920MiB | 0% Default |
| | | Disabled |
±------------------------------±---------------------±---------------------+
±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
±----------------------------------------------------------------------------+
Our latest version available of PennyLane and pennylane-lightning-gpu is version 0.36. Are you able to update to this version? You would also need to update custatevec to use CUDA 12.
Firstly, you can try upgrading the lightning.gpu installed package as python -m pip install pennylane pennylane-lightning pennylane-lightning-gpu --upgrade to ensure the version is the most recent (v0.36.0 as of writing). Once this is installed and up to date, you can try pip install custatevec-cu12 to bring in the CUDA 12 variant of the NVIDIA cuQuantum custatevec library.
lightning.gpu requires a CUDA compute capability of SM7.0 or newer (Volta era and newer) to work. This is a hard requirement from the NVIDIA cuQuantum SDK (specifically the custatevec library), as the library expects data-center/HPC grade hardware to run. I cannot tell which GPUs you have installed, but it may be possible they are not supported by the library. You can inspect the compute capabilities for a variety of NVIDIA devices here
I’ve confirmed that “custatevec-cu12” is already installed, but I’m still encountering issues when attempting to install “pennylane-lightning-gpu” using the command “python -m pip install pennylane pennylane-lightning pennylane-lightning-gpu --upgrade.” The error persists as shown in the screenshot below:
The Nvidia device I’m using is an A800. Based on my experience with successfully running VisionTransformer code using the PyTorch library, I suspect that the installation issue lies with “pennylane-lightning-gpu.”
Hi @Feng_Xiong, this looks like version conflicts somewhere.
Would you be able to create a new virtual environment following the instructions in Option 2 in the document below? Once you’ve created a new virtual environment please install PennyLane, Lightning-GPU, and custatevec as I mentioned in my previous post. Please let me know if this fixes your issue! If not you may need to use venv instead of miniconda.
Hi, I am encountering the same issue. Despite using the command pip install pennylane-lightning-gpu -i https://pypi.org/simple --no-cache-dir, I continue to receive an error. Furthermore, even after downloading and attempting to install the pennylane_lightning_gpu-0.37.0.tar.gz file, the issue persists. Any assistance or guidance on this matter would be greatly appreciated.
If you’re having trouble with a Miniconda virtual environment you can use venv instead. You can find instructions on how to install PennyLane with venv below.