Skip to content

Commit

Permalink
fix: single kernel launch for exec driven transpose
Browse files Browse the repository at this point in the history
  • Loading branch information
romnn committed Feb 11, 2024
1 parent bdc864b commit d916bdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions benchmarks/src/transpose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ where
rows,
cols,
};
// run once
let mut result = transpose::<T, naive::Transpose<T>>(&tracer, rows, cols, &mut kernel).await?;

// repeat more times
for _ in 0..repetitions {
let (commands, traces) =
transpose::<T, naive::Transpose<T>>(&tracer, rows, cols, &mut kernel).await?;
Expand Down
12 changes: 6 additions & 6 deletions validate/src/simulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,15 @@ pub mod exec {
#[derive(Debug, serde::Deserialize)]
struct TransposeInput {
dim: usize,
#[allow(dead_code)]
repeat: Option<usize>,
variant: benchmarks::transpose::Variant,
}
let TransposeInput {
dim,
variant,
repeat,
} = serde_json::from_value(values.clone()).map_err(parse_err)?;
benchmarks::transpose::benchmark::<f32>(dim, variant, repeat.unwrap_or(0)).await
let TransposeInput { dim, variant, .. } =
serde_json::from_value(values.clone()).map_err(parse_err)?;
// hotfix .unwrap_or(0)
let repeat = 0;
benchmarks::transpose::benchmark::<f32>(dim, variant, repeat).await
}
"babelstream" => return Err(RunError::Skipped),
other => {
Expand Down

0 comments on commit d916bdf

Please sign in to comment.