huggingface / huggingface/candle

linking with `link.exe` failed: exit code: 1120

Open
#1,882 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21k
Forks
1.8k
Avg merge
16h 42m
Merged PRs (30d)
25

Description

i try to compile candle in windows.

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

```bash
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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by rerunning the reported cargo run command on Windows and inspect the six unresolved cuDNN symbols in the linker output. Check the cuDNN libraries and versions being linked for the CUDA-enabled stable-diffusion example; done means the example links and compiles successfully without unresolved externals.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, machine-learning, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.