Skip to content

Commit

Permalink
Fix cast float test precision (tracel-ai#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
laggui authored Dec 9, 2024
1 parent 170b3bb commit 19975e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/burn-tensor/src/tests/ops/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ mod tests {
let output = tensor.cast(DType::F32);

assert_eq!(output.dtype(), DType::F32);
output.into_data().assert_approx_eq(&data, 5);
// Use precision 2 for parametrized tests in f16 and bf16
output.into_data().assert_approx_eq(&data, 2);
}
}

0 comments on commit 19975e9

Please sign in to comment.