From 7162418b42fb6b054917f8b79c0aa16fa12df168 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Mon, 9 Dec 2024 12:57:47 -0500 Subject: [PATCH] New version 6.2.2001 rename feature rocm_622 to rocm__6_2_2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/cubecl-hip-sys/Cargo.toml | 2 +- crates/cubecl-hip-sys/build.rs | 15 +++++++++++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 871449f..5db2dcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -172,7 +172,7 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "cubecl-hip-sys" -version = "6.2.4000" +version = "6.2.2001" dependencies = [ "libc", "rstest", diff --git a/Cargo.toml b/Cargo.toml index ee1db24..71a010d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ [workspace.package] edition = "2021" -version = "6.2.4000" +version = "6.2.2001" license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/crates/cubecl-hip-sys/Cargo.toml b/crates/cubecl-hip-sys/Cargo.toml index 4573bb5..b726b0b 100644 --- a/crates/cubecl-hip-sys/Cargo.toml +++ b/crates/cubecl-hip-sys/Cargo.toml @@ -12,7 +12,7 @@ version.workspace = true rust-version = "1.81" [features] -default = ["rocm__6_2_4"] +default = ["rocm__6_2_2"] rocm__6_2_2 = [] rocm__6_2_4 = [] diff --git a/crates/cubecl-hip-sys/build.rs b/crates/cubecl-hip-sys/build.rs index 88012ff..8656f0d 100644 --- a/crates/cubecl-hip-sys/build.rs +++ b/crates/cubecl-hip-sys/build.rs @@ -1,5 +1,5 @@ -use std::{env, io}; use std::path::Path; +use std::{env, io}; const ROCM_FEATURE_PREFIX: &str = "CARGO_FEATURE_ROCM__"; @@ -32,7 +32,11 @@ fn get_system_hip_version(rocm_path: impl AsRef) -> std::io::Result<(u8, u println!("cargo::warning=Unknown release version for patch version {system_patch}. This patch does not correspond to an official release patch."); } - Ok((system_major, system_minor, release_patch.unwrap_or(system_patch))) + Ok(( + system_major, + system_minor, + release_patch.unwrap_or(system_patch), + )) } /// The official patch number of a ROCm release is not the same of the patch number @@ -79,12 +83,15 @@ fn ensure_single_rocm_feature_set() { for (key, value) in env::vars() { if key.starts_with(ROCM_FEATURE_PREFIX) && value == "1" { - enabled_features.push(format!("rocm__{}", key.strip_prefix(ROCM_FEATURE_PREFIX).unwrap())); + enabled_features.push(format!( + "rocm__{}", + key.strip_prefix(ROCM_FEATURE_PREFIX).unwrap() + )); } } match enabled_features.len() { - 1 => {}, + 1 => {} 0 => panic!("No ROCm version features are enabled. One ROCm version feature must be set."), _ => panic!( "Multiple ROCm version features are enabled: {:?}. Only one can be set.",