Skip to content

cuda: link the static LAPACK library on CUDA 12 and later - #3742

Merged
melonakos merged 1 commit into
v3.10from
fix/3349-cuda12-static-lapack
Nov 11, 2026
Merged

melonakos merged 1 commit into
v3.10from
fix/3349-cuda12-static-lapack

Conversation

@melonakos

Copy link
Copy Markdown
Member

With AF_WITH_STATIC_CUDA_NUMERIC_LIBS=ON on CUDA 12 or later, libafcuda.so is left with an unresolved symbol and nothing can link against it:

libafcuda.so: undefined reference to `cudsh_dlasq1_'

The CUDA 12 branch finds libcusolver_lapack_static.a but the link step still reads the CUDA 11 variable, which that branch never sets. Both branches now set one variable that the link step uses. Checked on Rocky Linux 8 with CUDA 13.4.3: the unpatched library has one unresolved LAPACK symbol, the patched one has none. Based on v3.10; master carries the same lines.

Fixes #3349

With AF_WITH_STATIC_CUDA_NUMERIC_LIBS=ON, the CUDA 12 branch found
libcusolver_lapack_static.a but the link step still used the CUDA 11 variable,
CUDA_lapack_static_LIBRARY, which that branch never sets. libcusolver_static.a
pulls cudsh_dlasq1_ from that library, so libafcuda.so carried an unresolved
symbol and no executable could link against it:

  libafcuda.so: undefined reference to `cudsh_dlasq1_'

Both branches now set one variable that the link step uses. Checked on Rocky
Linux 8 with CUDA 13.4.3.

Fixes #3349
@WilliamTambellini

Copy link
Copy Markdown
Contributor

Tks @melonakos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants