Skip to content

Commit

Permalink
Fix incorrect cargo instruction invocation (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Sylvain Benner <[email protected]>
  • Loading branch information
VlaDexa and syl20bnr authored Dec 9, 2024
1 parent 5e0e5d3 commit dffa6d5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/cubecl-hip-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ fn check_version(rocm_path: impl AsRef<Path>) -> std::io::Result<bool> {
fn main() {
ensure_single_rocm_feature_set();

println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-env-changed=CUBECL_ROCM_PATH");
println!("cargo:rerun-if-env-changed=ROCM_PATH");
println!("cargo:rerun-if-env-changed=HIP_PATH");
println!("cargo::rerun-if-changed=build.rs");
println!("cargo::rerun-if-env-changed=CUBECL_ROCM_PATH");
println!("cargo::rerun-if-env-changed=ROCM_PATH");
println!("cargo::rerun-if-env-changed=HIP_PATH");

let mut paths: Vec<_> = ["CUBECL_ROCM_PATH", "ROCM_PATH", "HIP_PATH"]
.into_iter()
Expand All @@ -149,9 +149,9 @@ fn main() {
let rocm_path = rocm_path_candidates.find(|path| check_version(path).unwrap_or_default());

if let Some(valid_rocm_path) = rocm_path {
println!("cargo:rustc-link-lib=dylib=hiprtc");
println!("cargo:rustc-link-lib=dylib=amdhip64");
println!("cargo:rustc-link-search=native={}/lib", valid_rocm_path);
println!("cargo::rustc-link-lib=dylib=hiprtc");
println!("cargo::rustc-link-lib=dylib=amdhip64");
println!("cargo::rustc-link-search=native={}/lib", valid_rocm_path);
} else if have_candidates {
panic!(
"None of the found ROCm installations match crate version {}",
Expand Down

0 comments on commit dffa6d5

Please sign in to comment.