Skip to content

Commit

Permalink
Merge pull request #65 from tracel-ai/fix/wgpu-float
Browse files Browse the repository at this point in the history
Revert float precision changes to wgsl compiler
  • Loading branch information
laggui authored Aug 12, 2024
2 parents c3ef475 + 4aa75fd commit 546f588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/cubecl-wgpu/src/compiler/wgsl/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ impl Display for Variable {
FloatKind::BF16 => {
todo!("Unsupported")
}
FloatKind::F32 => f.write_fmt(format_args!("{:.9}f", *val as f32)),
FloatKind::F64 => f.write_fmt(format_args!("{:.17}f", { *val })),
FloatKind::F32 => f.write_fmt(format_args!("{}f", *val as f32)),
FloatKind::F64 => f.write_fmt(format_args!("{}f", { *val })),
},
ConstantScalarValue::UInt(val) => f.write_fmt(format_args!("{}u", *val as u32)),
ConstantScalarValue::Bool(val) => f.write_fmt(format_args!("{}", val)),
Expand Down

0 comments on commit 546f588

Please sign in to comment.