Pytorch with APL - LAPACK issue

We have a successful build of Pytorch from the source code on Windows with APL. But while trying to use we are getting errors such as: 

RuntimeError: svd: LAPACK library not found in compilation.

Can you point me to the right direction of understanding the problem? We followed the Windows guidelines but maybe we are not linking something correctly or not linking at all. 

Parents
  • Hi Irem,

    Would you be able to provide some more details of how you're building PyTorch and linking to Arm PL?

    PyTorch might not be able to idenify ArmPL correctly during the build, it may not think it provides LAPACK.

    I believe that, in order for PyTorch to have full BLAS and LAPACK support from Arm PL, it should think that it's linking to a lib. with BLAS and LAPACK support (like OpenBLAS), rather than one that only provides BLAS functionality (like BLIS). You may be able to see from the build log how it has identified Arm PL.

    You should be able to force PyTorch to treat Arm PL as if it were OpenBLAS by setting `BLAS="OpenBLAS"` as well as setting `OpenBLAS_HOME` to the location of Arm PL. In this case it should support both BLAS and LAPACK.
    See, for example, this Linux build script: github.com/.../build-pytorch.sh

    Hope that helps,
    Nathan.

Reply
  • Hi Irem,

    Would you be able to provide some more details of how you're building PyTorch and linking to Arm PL?

    PyTorch might not be able to idenify ArmPL correctly during the build, it may not think it provides LAPACK.

    I believe that, in order for PyTorch to have full BLAS and LAPACK support from Arm PL, it should think that it's linking to a lib. with BLAS and LAPACK support (like OpenBLAS), rather than one that only provides BLAS functionality (like BLIS). You may be able to see from the build log how it has identified Arm PL.

    You should be able to force PyTorch to treat Arm PL as if it were OpenBLAS by setting `BLAS="OpenBLAS"` as well as setting `OpenBLAS_HOME` to the location of Arm PL. In this case it should support both BLAS and LAPACK.
    See, for example, this Linux build script: github.com/.../build-pytorch.sh

    Hope that helps,
    Nathan.

Children