Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linking with link.exe failed: exit code: 1120 #1882

Open
kulame opened this issue Mar 20, 2024 · 5 comments
Open

linking with link.exe failed: exit code: 1120 #1882

kulame opened this issue Mar 20, 2024 · 5 comments

Comments

@kulame
Copy link

kulame commented Mar 20, 2024

i try to compile candle in windows.

cargo run --example stable-diffusion --release --features=cuda,cudnn -- --prompt "a cosmonaut on a horse (hd, realistic, high-def)"

it failed on link

   Compiling candle-examples v0.4.2 (C:\code\rust\candle\candle-examples)
error: linking with `link.exe` failed: exit code: 1181
  = note: libcudarc-7e61ad986ae469c0.rlib(cudarc-7e61ad986ae469c0.cudarc.1b8aab8e6cfb60e0-cgu.06.rcgu.o) : error LNK2019: unresolved external symbol cudnnAdvInferVersionCheck referenced in function _ZN6cudarc5cudnn6result13version_check17h43d83b8ee3072371E
          libcudarc-7e61ad986ae469c0.rlib(cudarc-7e61ad986ae469c0.cudarc.1b8aab8e6cfb60e0-cgu.06.rcgu.o) : error LNK2019: unresolved external symbol cudnnAdvTrainVersionCheck referenced in function _ZN6cudarc5cudnn6result13version_check17h43d83b8ee3072371E
          libcudarc-7e61ad986ae469c0.rlib(cudarc-7e61ad986ae469c0.cudarc.1b8aab8e6cfb60e0-cgu.06.rcgu.o) : error LNK2019: unresolved external symbol cudnnCnnInferVersionCheck referenced in function _ZN6cudarc5cudnn6result13version_check17h43d83b8ee3072371E
          libcudarc-7e61ad986ae469c0.rlib(cudarc-7e61ad986ae469c0.cudarc.1b8aab8e6cfb60e0-cgu.06.rcgu.o) : error LNK2019: unresolved external symbol cudnnCnnTrainVersionCheck referenced in function _ZN6cudarc5cudnn6result13version_check17h43d83b8ee3072371E
          libcudarc-7e61ad986ae469c0.rlib(cudarc-7e61ad986ae469c0.cudarc.1b8aab8e6cfb60e0-cgu.06.rcgu.o) : error LNK2019: unresolved external symbol cudnnOpsInferVersionCheck referenced in function _ZN6cudarc5cudnn6result13version_check17h43d83b8ee3072371E
          libcudarc-7e61ad986ae469c0.rlib(cudarc-7e61ad986ae469c0.cudarc.1b8aab8e6cfb60e0-cgu.06.rcgu.o) : error LNK2019: unresolved external symbol cudnnOpsTrainVersionCheck referenced in function _ZN6cudarc5cudnn6result13version_check17h43d83b8ee3072371E
          C:\code\rust\candle\target\release\examples\stable_diffusion.exe : fatal error LNK1120: 6 unresolved externals


error: could not compile `candle-examples` (example "stable-diffusion") due to 1 previous error

what's wrong with this error?

@kulame
Copy link
Author

kulame commented Mar 25, 2024

I'm still waiting for an answer.

@newfla
Copy link

newfla commented Mar 26, 2024

I encountered the same problem. Pipeline log

@newfla
Copy link

newfla commented May 3, 2024

I can confirm the issue on cuda 12.4 with both cudnn 9.1 and 8.9.7
It would be nice if some of the developers could look into this issue

@LaurentMazare
Copy link
Collaborator

We've just the upgrade for the latest version of the cuda bindings (cudarc 0.11) in #2165 It might be good to try again though it's worth pointing out that it's only supposed to support cuda up to 12.3, cuda 12.4 support is upcoming.

@newfla
Copy link

newfla commented May 7, 2024

We've just the upgrade for the latest version of the cuda bindings (cudarc 0.11) in #2165 It might be good to try again though it's worth pointing out that it's only supposed to support cuda up to 12.3, cuda 12.4 support is upcoming.

Unfortunately it has not solved completely the issue: now it's complaining about cublasHgemm 😢
Windows 11, cuda 12.3, cudnn 8.9.7
Env vars:
image

 LINK : warning LNK4098: la libreria predefinita 'LIBCMT' è in conflitto con l'utilizzo di altre librerie; usare /NODEFAULTLIB:libreria
          libcudarc-d549b1345f494693.rlib(cudarc-d549b1345f494693.cudarc.80447e6473cb0ba3-cgu.11.rcgu.o) : error LNK2019: riferimento al simbolo esterno cublasHgemm non risolto nella funzione _ZN6cudarc6cublas6result5hgemm17h2070933db030342cE
          libcudarc-d549b1345f494693.rlib(cudarc-d549b1345f494693.cudarc.80447e6473cb0ba3-cgu.11.rcgu.o) : error LNK2019: riferimento al simbolo esterno cublasHgemmStridedBatched non risolto nella funzione _ZN6cudarc6cublas6result21hgemm_strided_batched17h4a8dda451c959c9fE

Related to coreylowman/cudarc#228

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

No branches or pull requests

3 participants