Repository: huggingface/candle (language: rust)

Issue:
Some Examples do not successfully build on older versions of CUDA whereby cuMemAdvise_v2 and cuMemPrefetchAsync_v2 are not present
This has been identified on the upstream `cudarc` project in [this issue](https://github.com/coreylowman/cudarc/issues/269) with the associated fix in an open PR [here](https://github.com/coreylowman/cudarc/pull/270). It has not yet been merged yet though.

It's unclear to me what this additional functionality brings and whether it is actually used within Candle. I am happy to open a PR which includes pinning `cuadrc` to `cudarc = { version = "<=0.11.6" }` within  affected `candle-*` crates if folks think it's worthwhile.


Discussion / hints:
Right, I also add the problem on some of my projects and fixed it by explicitely pinning cudarc in my crates but probably better for users not to have to do this so having the constraint in the main `Cargo.toml` file sounds good.
I'll make that change now, run it locally to see if it fixes it and then open the PR 👍🏼 

Edit: From looking at the root `Cargo.toml`, it's pinned already. I am unfamiliar with how version constraints get passed to sub-crates. Does the change need to be applied within each sub-crate `Cargo.toml`?

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 810cb51aed..bdd3c2801a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,7 +43,7 @@ candle-onnx = { path = "./candle-onnx", version = "0.6.0" }
 candle-transformers = { path = "./candle-transformers", version = "0.6.0" }
 clap = { version = "4.2.4", features = ["derive"] }
 criterion = { version = "0.5.1", default-features=false }
-cudarc = { version = "0.11.4", features = ["std", "cublas", "cublaslt", "curand", "driver", "nvrtc", "f16", "cuda-version-from-build-system", "dynamic-linking"], default-features=false }
+cudarc = { version = "=0.11.6", features = ["std", "cublas", "cublaslt", "curand", "driver", "nvrtc", "f16", "cuda-version-from-build-system", "dynamic-linking"], default-features=false }
 fancy-regex = "0.13.0"
 gemm = { version = "0.17.0", features = ["wasm-simd128-enable"] }
 hf-hub = "0.3.0"


Test patch: