Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
wingertge committed Jan 9, 2025
1 parent 05e54fb commit 855157e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions crates/cubecl-cuda/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub use device::*;
pub use runtime::*;

#[cfg(test)]
#[allow(unexpected_cfgs)]
mod tests {
pub type TestRuntime = crate::CudaRuntime;
pub use half::{bf16, f16};
Expand Down
6 changes: 1 addition & 5 deletions crates/cubecl-macros/src/parse/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ impl Unroll {
pub value: Expr,
}

let attr = attrs.iter().find(|attr| attr.path().is_ident("unroll"));
let attr = match attr {
Some(attr) => attr,
None => return None,
};
let attr = attrs.iter().find(|attr| attr.path().is_ident("unroll"))?;

match &attr.meta {
syn::Meta::Path(_) => None,
Expand Down
6 changes: 1 addition & 5 deletions crates/cubecl-opt/src/gvn/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,7 @@ impl GvnState {
.map(|child| &self.block_sets[child].antic_in);
// Only add expressions expected at all successors to this block's anticipated list
for (val, expr) in potential_out {
if rest
.clone()
.map(|child| child.iter().any(|v| v.0 == *val))
.all(|b| b)
{
if rest.clone().all(|child| child.iter().any(|v| v.0 == *val)) {
result.push_back((*val, expr.clone()));
}
}
Expand Down
2 changes: 2 additions & 0 deletions crates/cubecl-wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub use runtime::*;
pub use compiler::spirv;

#[cfg(test)]
#[allow(unexpected_cfgs)]
mod tests {
pub type TestRuntime = crate::WgpuRuntime<crate::WgslCompiler>;

Expand All @@ -33,6 +34,7 @@ mod tests {
}

#[cfg(all(test, feature = "spirv"))]
#[allow(unexpected_cfgs)]
mod tests_spirv {
pub type TestRuntime = crate::WgpuRuntime<crate::spirv::VkSpirvCompiler>;
use cubecl_core::flex32;
Expand Down

0 comments on commit 855157e

Please sign in to comment.