I have an AMD 6700S that I want to use for Qiskit simulations. The test case below is calculating the QFT.
If I set my code up like this:
backend = Aer.get_backend('aer_simulator')
backend.set_options(device='GPU')
result = execute(qft, backend, noise_model=noise_model,backend_options=backend_options).result()
then I get the following output:
Simulation failed and returned the following error message:
ERROR: Failed to load qobj: Simulation device "GPU" is not supported on this system'
.
However, if I set it up like this:
simulator = AerSimulator()
backend_options['method'] = 'statevector'
backend_options['device'] = 'GPU'
result = execute(qft, simulator, noise_model=noise_model, backend_options=backend_options).result()
then it outputs successfully. However, I'm unsure to what extent it's actually using the GPU. It seems to be, based on monitoring thermals/voltages, but is also definitely using the CPU. Changing backend_options['method'] = 'statevector'
to backend_options['method'] = 'statevector_gpu'
did not seem to affect runtime for the 2nd case.
I know Nvidia is the only officially supported card type currently according to this, but I was able to get Pytorch/ROCm working by passing the parameter HSA_OVERRIDE_GFX_VERSION=10.3.0 such that torch.cuda.is_available() outputs True in Jupyter Notebook, so I'm wondering if there are ways of monitoring the details of GPU usage in Qiskit or if/how others have been able to get their AMD cards to work.
My end goal is to be able to simulate molecules using the GPU with the VQE/qiskit-nature.
I also had an issue where pip install qiskit-aer-gpu gave this error when on the 3.10 Python kernel, but 3.9 did not.
ERROR: Could not find a version that satisfies the requirement qiskit-aer-gpu (from versions: none)
ERROR: No matching distribution found for qiskit-aer-gpu
However, both kernel versions had the same result in terms of the code output above, which doesn't make sense given qiskit-aer-gpu isn't installed under 3.10.
If it helps, my OS is OpenSUSE Tumbleweed. All Qiskit packages are on the latest versions.