PennyLaneAI / pennylane-lightning

The PennyLane-Lightning plugin provides a fast state-vector simulator written in C++ for use with PennyLane
https://docs.pennylane.ai/projects/lightning
Apache License 2.0
82 stars 35 forks source link

ENABLE_LAPACK breaks LGPU tests under aarch64 #822

Closed mlxd closed 1 month ago

mlxd commented 1 month ago

Having the Lapack-option enabled by default causes catastrophic failures on aarch64 with LightningGPU. This option should be opt in rather than opt out by default.

https://github.com/PennyLaneAI/pennylane-lightning/blob/777467d9c02cc6c59997ffff0ff45d9af583e1da/CMakeLists.txt#L50

Running the C++ test suite yields the following failures, all of which disappear with -DENABLE_LAPACK=OFF.

      1 - Algorithms::adjointJacobian (SEGFAULT)
      8 - Expval Shot - HermitianObs  (SEGFAULT)
      9 - Expval - HermitianObs (SEGFAULT)
     10 - Expval Shot- TensorProdObs (SEGFAULT)
     12 - Var - HermitianObs (SEGFAULT)
     13 - Var - HermitianObs Shot (SEGFAULT)
     14 - Var Shot- TensorProdObs (SEGFAULT)
     17 - Expval Shot - HamiltonianObs  (SEGFAULT)
     18 - Var Shot - HamiltonianObs  (SEGFAULT)
     21 - Methods implemented in the HermitianObsBase class (SEGFAULT)
     22 - Methods implemented in the TensorProdObsBase class (SEGFAULT)
     42 - AdjointJacobianGPU::AdjointJacobianGPU Test HermitianObs (SEGFAULT)
     53 - StateVectorCudaManaged::Hamiltonian_expval - float (SEGFAULT)
     54 - StateVectorCudaManaged::Hamiltonian_expval - double (SEGFAULT)
     71 - Test variance of HermitianObs - float (SEGFAULT)
     72 - Test variance of HermitianObs - double (SEGFAULT)
    188 - Observables::HermitianHasher - StateVectorCudaManaged<float> (SEGFAULT)
    189 - Observables::HermitianHasher - StateVectorCudaManaged<double> (SEGFAULT)
    231 - Util::compute_diagonalizing_gates - float (SEGFAULT)
    232 - Util::compute_diagonalizing_gates - double (SEGFAULT)
maliasadi commented 1 month ago

We've discussed a few different approaches to fix this and other scipy related issues properly (cc: @multiphaseCFD). We may just disable it for installations from source for now. :thinking:

multiphaseCFD commented 1 month ago

As discussed, I've defaulted ENABLE_LAPACK as OFF [SC-70045

mlxd commented 1 month ago

Closed with https://github.com/PennyLaneAI/pennylane-lightning/pull/825