Open rht opened 1 year ago
Thanks for the note, @rht ! We'll check it out and get back to you soon.
I fixed the cuquantum
not found by removing --no-deps
and instead doing pip install cuquantum
in https://github.com/PennyLaneAI/pennylane-lightning-gpu/blob/1e129b2e7dbc7d885b16da61b6c5b1a02e45970d/docker/Dockerfile#L18.
However, subsequently, I encountered lots of compile error, for example
#0 101.4 /pennylane-lightning-gpu/pennylane_lightning_gpu/src/algorithms/AdjointDiffGPU.hpp:370:76: error: could not convert ‘{<expression error>, <expression error>, <expression error>, <expression error>, <expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘Pennylane::Pennylane::Algorithms::OpsData<double>’
#0 101.4 370 | return {ops_name, ops_params, ops_wires, ops_inverses, ops_matrices};
#0 101.4 | ^
#0 101.4 | |
#0 101.4 | <brace-enclosed initializer list>
#0 101.4 /pennylane-lightning-gpu/pennylane_lightning_gpu/src/algorithms/AdjointDiffGPU.hpp: In instantiation of ‘void Pennylane::Pennylane::Algorithms::AdjointJacobianGPU<T>::batchAdjointJacobian(const CFP_t*, int, int) [with T = double; Pennylane::Pennylane::Algorithms::AdjointJacobianGPU<T>::CFP_t = double2]’:
#0 101.4 /pennylane-lightning-gpu/pennylane_lightning_gpu/src/algorithms/AdjointDiffGPU.cpp:5:39: required from here
#0 101.4 /pennylane-lightning-gpu/pennylane_lightning_gpu/src/algorithms/AdjointDiffGPU.hpp:441:66: error: ‘jac_local’ was not declared in this scope; did you mean ‘dt_local’?
I additionally had to specify Python_SITELIB
to point to the virtualenv site-packages path.
Hi @rht
Thanks for posting. We haven't been using the docker builder process for some time as we run our own custom AMIs now through Github Actions (https://github.com/PennyLaneAI/pennylane-lightning-gpu/blob/main/.github/workflows/build_wheel_manylinux2014.yml). We will need some time to investigate what changes are needed to get this process back working, but I suspect the issue is a combination of compiler versions, changing dependencies, and updated C++ language features.
Yeah, I managed to make it work by consulting the GH Actions yml file. One difference is that manylinux2014
uses Red Hat Toolset 10, which works with the Docker image, but this is different from the GH Actions file, which uses g++-11
and gcc-11
.
My changes in the CMakelists.txt:
find_package (Python3 COMPONENTS Interpreter Development.Module)
(i.e. Python3 instead of Python, Development.Module instead of Development)set(Python_SITELIB /pennylane-lightning-gpu/pyenv3.8/lib/python3.8/site-packages)
(hardcoded to 3.8 because I wanted quick result ASAP)In the Dockerfile, I replaced yum -y install cuda
with yum -y install cuda-11-5
.
With those changes, everything should work.
Hi @rht, I'm glad you managed to make it work! Thank you for sharing your solution here. Please let us know if you encounter any further issues.
Issue description
I did a vanilla clone of the repo, and ran
docker build . -f ./docker/Dockerfile -t "lightning-gpu-wheels"
. But failed with the following error:Source code and tracebacks