Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
louisfd committed Jul 17, 2024
1 parent 5f1e6f1 commit 08c09a4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions crates/cubecl-lac/src/matmul/cmma/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Default for CmmaConfig {
}

pub fn cmma_cube_count<R: Runtime>(
output_shape: &Vec<usize>,
output_shape: &[usize],
block_size_m: usize,
block_size_n: usize,
) -> CubeCount<R::Server> {
Expand All @@ -54,8 +54,8 @@ pub fn cmma_cube_count<R: Runtime>(
let cubes_x = f32::ceil(num_rows as f32 / block_size_m as f32) as u32;
let cubes_y = f32::ceil(num_cols as f32 / block_size_n as f32) as u32;
let mut num_iter = 1;
for i in 0..rank - 2 {
num_iter *= output_shape[i];
for shape in output_shape.iter().take(rank - 2) {
num_iter *= shape;
}

CubeCount::Static(cubes_x, cubes_y, num_iter as u32)
Expand Down
6 changes: 3 additions & 3 deletions crates/cubecl-lac/src/matmul/tiling2d/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl CubeTiling2dConfig {
}

pub fn tiling2d_cube_count<R: Runtime>(
output_shape: &Vec<usize>,
output_shape: &[usize],
config: &Tiling2dConfig,
) -> CubeCount<R::Server> {
let rank = output_shape.len();
Expand All @@ -113,8 +113,8 @@ pub fn tiling2d_cube_count<R: Runtime>(
let cubes_x = f32::ceil(num_rows as f32 / config.block_size_m as f32) as u32;
let cubes_y = f32::ceil(num_cols as f32 / config.block_size_n as f32) as u32;
let mut num_iter = 1;
for i in 0..rank - 2 {
num_iter *= output_shape[i];
for shape in output_shape.iter().take(rank - 2) {
num_iter *= shape;
}

CubeCount::Static(cubes_x, cubes_y, num_iter as u32)
Expand Down
12 changes: 6 additions & 6 deletions xtask/src/commands/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,20 @@ fn run_lint(target: &Target) -> anyhow::Result<()> {
}

fn run_unit_tests(target: &Target) -> anyhow::Result<()> {
run_unit(&target)
run_unit(target)
}

fn run_integration_tests(target: &Target) -> anyhow::Result<()> {
run_integration(&target)
run_integration(target)
}

fn run_doc_tests(target: &Target) -> anyhow::Result<()> {
run_documentation(&target)
run_documentation(target)
}

fn run_all_tests(target: &Target) -> anyhow::Result<()> {
run_unit_tests(&target)?;
run_integration_tests(&target)?;
run_doc_tests(&target)?;
run_unit_tests(target)?;
run_integration_tests(target)?;
run_doc_tests(target)?;
Ok(())
}
2 changes: 1 addition & 1 deletion xtask/src/utils/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn ensure_cargo_crate_is_installed(
if let Some(features) = features {
if !features.is_empty() {
args.push("--features");
args.push(&features);
args.push(features);
}
}
run_cargo(
Expand Down

0 comments on commit 08c09a4

Please sign in to comment.