huggingface / huggingface/candle
Cannot run docs example: no gpu codes parsed from nvcc
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 1.8k
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 25
Description
Following the [installation](https://huggingface.github.io/candle/guide/installation.html) and [hello world example](https://huggingface.github.io/candle/guide/hello_world.html) from the docs and running into the following error. I've tried setting
the environment variable `CUDA_COMPUTE_CAP=75` and still same issue.
Tried reinstalling Nvidia drivers to latest (535) and toolkit and still running into the same problem. Not sure what I'm doing wrong. Any help would be much appreciated!
## Error output from `cargo run --release`
```
Compiling candle-kernels v0.3.1 (https://github.com/huggingface/candle.git#f4fcf609)
error: failed to run custom build command for `candle-kernels v0.3.1 (https://github.com/huggingface/candle.git#f4fcf609)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/home/x/repos/candle-experiments/first-candle/target/release/build/candle-kernels-4fadf4131cec851f/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rustc-env=CUDA_INCLUDE_DIR=/usr/include
cargo:rerun-if-changed=src/
cargo:rerun-if-env-changed=CUDA_COMPUTE_CAP
cargo:rustc-env=CUDA_COMPUTE_CAP=75
--- stderr
thread 'main' panicked at 'Could not get Cuda compute cap: no gpu codes parsed from nvcc
Stack backtrace:
0: build_script_build::cuda::compute_cap
1: build_script_build::cuda::build_ptx
2: build_script_build::main
3: core::ops::function::FnOnce::call_once
4: std::sys_common::backtrace::__rust_begin_short_backtrace
5: std::rt::lang_start::{{closure}}
6: core::ops::function::impls:: for &F>::call_once
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/ops/function.rs:284:13
std::panicking::try::do_call
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:500:40
std::panicking::try
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:464:19
std::panic::catch_unwind
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panic.rs:142:14
std::rt::lang_start_internal::{{closure}}
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/rt.rs:148:48
std::panicking::try::do_call
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:500:40
std::panicking::try
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:464:19
std::panic::catch_unwind
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panic.rs:142:14
std::rt::lang_start_internal
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/rt.rs:148:20
7: std::rt::lang_start
8: main
9: __libc_start_main
10: _start', /home/x/.cargo/git/checkouts/candle-0c2b4fa9e5801351/f4fcf60/candle-kernels/build.rs:106:41
stack backtrace:
0: rust_begin_unwind
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/panicking.rs:67:14
2: core::result::unwrap_failed
at /rustc/8ede3aae28fe6e4d52b38157d7bfe0d3bceef225/library/core/src/result.rs:1651:5
3: core::result::Result::expect
4: build_script_build::cuda::build_ptx
5: build_script_build::main
6: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
## Output from `nvcc --version`
```
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
```
## Output from `nvidia-smi --query-gpu=compute_cap --format=csv`
```
compute_cap
7.5
```
## fwiw:
- Machine GPU: Nvidia GeForce GTX 1660 TI.
- OS: Ubuntu 20.04 (WSL2)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with candle-kernels/build.rs at the compute_cap entry point reported near line 106, then compare its nvcc parsing with the issue's nvcc --version and GPU output. Reproduce with the documented installation and hello world commands; done means the example builds successfully or the failure has a clear diagnostic and documented workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, ubuntu
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100