@@ -126,9 +126,18 @@ let testFixturesEWiseAdd case =
126126 let floatToCOO = Matrix.toCOO context wgSize
127127
128128 case
129- |> correctnessGenericTest 0.0 (+) floatAdd floatToCOO ( fun x y -> abs ( x - y ) < Accuracy.medium.absolute ) q
129+ |> correctnessGenericTest 0.0 (+) floatAdd floatToCOO Utils.floatIsEqual q
130130 |> testPropertyWithConfig config ( getCorrectnessTestName " float" )
131131
132+ let float32Add =
133+ Matrix.map2 context ArithmeticOperations.float32Sum wgSize
134+
135+ let float32ToCOO = Matrix.toCOO context wgSize
136+
137+ case
138+ |> correctnessGenericTest 0.0 f (+) float32Add float32ToCOO Utils.float32IsEqual q
139+ |> testPropertyWithConfig config ( getCorrectnessTestName " float32" )
140+
132141 let byteAdd =
133142 Matrix.map2 context ArithmeticOperations.byteSum wgSize
134143
@@ -174,9 +183,18 @@ let testFixturesEWiseAddAtLeastOne case =
174183 let floatToCOO = Matrix.toCOO context wgSize
175184
176185 case
177- |> correctnessGenericTest 0.0 (+) floatAdd floatToCOO ( fun x y -> abs ( x - y ) < Accuracy.medium.absolute ) q
186+ |> correctnessGenericTest 0.0 (+) floatAdd floatToCOO Utils.floatIsEqual q
178187 |> testPropertyWithConfig config ( getCorrectnessTestName " float" )
179188
189+ let float32Add =
190+ Matrix.map2AtLeastOne context ArithmeticOperations.float32SumAtLeastOne wgSize
191+
192+ let float32ToCOO = Matrix.toCOO context wgSize
193+
194+ case
195+ |> correctnessGenericTest 0.0 f (+) float32Add float32ToCOO Utils.float32IsEqual q
196+ |> testPropertyWithConfig config ( getCorrectnessTestName " float32" )
197+
180198 let byteAdd =
181199 Matrix.map2AtLeastOne context ArithmeticOperations.byteSumAtLeastOne wgSize
182200
@@ -222,9 +240,27 @@ let testFixturesEWiseAddAtLeastOneToCOO case =
222240 let floatToCOO = Matrix.toCOO context wgSize
223241
224242 case
225- |> correctnessGenericTest 0.0 (+) floatAdd floatToCOO ( fun x y -> abs ( x - y ) < Accuracy.medium.absolute ) q
243+ |> correctnessGenericTest 0.0 (+) floatAdd floatToCOO Utils.floatIsEqual q
226244 |> testPropertyWithConfig config ( getCorrectnessTestName " float" )
227245
246+ let float32Add =
247+ Matrix.map2AtLeastOneToCOO context ArithmeticOperations.float32SumAtLeastOne wgSize
248+
249+ let floatToCOO = Matrix.toCOO context wgSize
250+
251+ case
252+ |> correctnessGenericTest 0.0 f (+) float32Add floatToCOO Utils.float32IsEqual q
253+ |> testPropertyWithConfig config ( getCorrectnessTestName " float32" )
254+
255+ let float32Add =
256+ Matrix.map2AtLeastOneToCOO context ArithmeticOperations.float32SumAtLeastOne wgSize
257+
258+ let floatToCOO = Matrix.toCOO context wgSize
259+
260+ case
261+ |> correctnessGenericTest 0.0 f (+) float32Add floatToCOO Utils.float32IsEqual q
262+ |> testPropertyWithConfig config ( getCorrectnessTestName " float32" )
263+
228264 let byteAdd =
229265 Matrix.map2AtLeastOneToCOO context ArithmeticOperations.byteSumAtLeastOne wgSize
230266
@@ -270,9 +306,18 @@ let testFixturesEWiseMulAtLeastOne case =
270306 let floatToCOO = Matrix.toCOO context wgSize
271307
272308 case
273- |> correctnessGenericTest 0.0 (*) floatAdd floatToCOO ( fun x y -> abs ( x - y ) < Accuracy.medium.absolute ) q
309+ |> correctnessGenericTest 0.0 (*) floatAdd floatToCOO Utils.floatIsEqual q
274310 |> testPropertyWithConfig config ( getCorrectnessTestName " float" )
275311
312+ let float32Add =
313+ Matrix.map2AtLeastOne context ArithmeticOperations.float32MulAtLeastOne wgSize
314+
315+ let floatToCOO = Matrix.toCOO context wgSize
316+
317+ case
318+ |> correctnessGenericTest 0.0 f (*) float32Add floatToCOO Utils.float32IsEqual q
319+ |> testPropertyWithConfig config ( getCorrectnessTestName " float32" )
320+
276321 let byteAdd =
277322 Matrix.map2AtLeastOne context ArithmeticOperations.byteMulAtLeastOne wgSize
278323
0 commit comments