mirror of https://github.com/tracel-ai/burn.git
Fix wgsl remainder definition (#1979)
This commit is contained in:
parent
e8b915a2da
commit
e7a3cc4fba
|
@ -268,9 +268,9 @@ impl Display for Instruction {
|
|||
Instruction::Modulo { lhs, rhs, out } => {
|
||||
f.write_fmt(format_args!("{out} = {lhs} % {rhs};\n"))
|
||||
}
|
||||
Instruction::Remainder { lhs, rhs, out } => {
|
||||
f.write_fmt(format_args!("{out} = (({lhs} % {rhs}) + {rhs}) % {rhs};\n"))
|
||||
}
|
||||
Instruction::Remainder { lhs, rhs, out } => f.write_fmt(format_args!(
|
||||
"{out} = {lhs} - {rhs} * floor({lhs} / {rhs});\n"
|
||||
)),
|
||||
Instruction::Sub { lhs, rhs, out } => {
|
||||
f.write_fmt(format_args!("{out} = {lhs} - {rhs};\n"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue