@@ -4,7 +4,6 @@ open Expecto
44open Expecto.Logging
55open GraphBLAS.FSharp .Backend .Common
66open GraphBLAS.FSharp .Tests
7- open GraphBLAS.FSharp .Tests .Utils
87open Context
98open Brahma.FSharp
109open GraphBLAS.FSharp .Backend .Objects
@@ -20,7 +19,8 @@ let q = defaultContext.Queue
2019let correctnessGenericTest < 'a when 'a : struct and 'a : equality > isZero exists ( array : 'a []) =
2120
2221 if array.Length > 0 then
23- let vector = createVectorFromArray Dense array isZero
22+ let vector =
23+ Utils.createVectorFromArray Dense array isZero
2424
2525 let result =
2626 match vector.ToDevice context with
@@ -41,7 +41,7 @@ let correctnessGenericTest<'a when 'a: struct and 'a: equality> isZero exists (a
4141 |> Expect.equal result ( Array.exists ( not << isZero) array)
4242
4343let testFixtures =
44- let config = defaultConfig
44+ let config = Utils. defaultConfig
4545
4646 let wgSize = 32
4747
@@ -66,14 +66,15 @@ let testFixtures =
6666 correctnessGenericTest< byte> ((=) 0 uy) exists ( Array.create 1000 0 uy)
6767 |> testPropertyWithConfig config ( getCorrectnessTestName " byte zeros" )
6868
69- let exists =
70- ClArray.exists context wgSize Predicates.isSome
69+ if Utils.isFloat64Available context.ClDevice then
70+ let exists =
71+ ClArray.exists context wgSize Predicates.isSome
7172
72- correctnessGenericTest< float> ((=) 0.0 ) exists
73- |> testPropertyWithConfig config ( getCorrectnessTestName " float" )
73+ correctnessGenericTest< float> ((=) 0.0 ) exists
74+ |> testPropertyWithConfig config ( getCorrectnessTestName " float" )
7475
75- correctnessGenericTest< float> ((=) 0.0 ) exists ( Array.create 1000 0.0 )
76- |> testPropertyWithConfig config ( getCorrectnessTestName " float zeros" )
76+ correctnessGenericTest< float> ((=) 0.0 ) exists ( Array.create 1000 0.0 )
77+ |> testPropertyWithConfig config ( getCorrectnessTestName " float zeros" )
7778
7879 let exists =
7980 ClArray.exists context wgSize Predicates.isSome
0 commit comments