Skip to content

Commit aa59fa9

Browse files
committed
remove prints
1 parent a2cfc24 commit aa59fa9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

crates/cudart-sys/src/utils.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ use std::path::{Path, PathBuf};
44
pub fn get_cuda_path() -> Option<&'static Path> {
55
#[cfg(target_os = "linux")]
66
{
7-
for path_name in [option_env!("CUDA_PATH"), Some("/usr/local/cuda")].iter().flatten() {
8-
println!("trying {path_name}...");
7+
for path_name in [option_env!("CUDA_PATH"), Some("/usr/local/cuda")]
8+
.iter()
9+
.flatten()
10+
{
911
let path = Path::new(path_name);
1012
if path.exists() {
11-
println!("CUDA installation found at `{}`", path.display());
12-
return Some(path)
13+
return Some(path);
1314
}
1415
}
1516
None
@@ -45,10 +46,8 @@ pub fn get_cuda_lib_path() -> Option<PathBuf> {
4546

4647
pub fn get_cuda_version() -> Option<String> {
4748
if let Some(version) = option_env!("CUDA_VERSION") {
48-
println!("CUDA version defined in CUDA_VERSION as `{}`", version);
4949
Some(version.to_string())
5050
} else if let Some(path) = get_cuda_path() {
51-
println!("inferring CUDA version from nvcc output...");
5251
let re = regex_lite::Regex::new(r"V(?<version>\d{2}\.\d+\.\d+)").unwrap();
5352
let nvcc_out = std::process::Command::new("nvcc")
5453
.arg("--version")
@@ -61,7 +60,6 @@ pub fn get_cuda_version() -> Option<String> {
6160
.expect("unable to find nvcc version in the form VMM.mm.pp in the output of `nvcc --version`:\n{nvcc_str}")
6261
.as_str()
6362
.to_string();
64-
println!("CUDA version inferred to be `{version}`.");
6563
Some(version)
6664
} else {
6765
None

0 commit comments

Comments
 (0)