@@ -16,12 +16,13 @@ open Brahma.FSharp.OpenCL.WorkflowBuilder.Evaluation
1616open Brahma.FSharp .OpenCL .Extensions
1717open OpenCL.Net
1818
19- type COOFormat < 'a > =
20- { Rows: int []
21- Columns: int []
22- Values: 'a []
23- RowCount: int
24- ColumnCount: int }
19+ type COOFormat < 'a > = {
20+ Rows: int []
21+ Columns: int []
22+ Values: 'a []
23+ RowCount: int
24+ ColumnCount: int
25+ }
2526
2627[<MinColumn; MaxColumn>]
2728[<Config( typeof< Config>) >]
@@ -42,8 +43,8 @@ type EWiseAddBenchmarks() =
4243 let mutable firstGraph = Unchecked.defaultof< COOFormat< float>>
4344 let mutable secondGraph = Unchecked.defaultof< COOFormat< float>>
4445
45- let contextCPU = OpenCLEvaluationContext( " *" , DeviceType.Cpu )
46- let contextGPU = OpenCLEvaluationContext( " *" , DeviceType.Gpu)
46+ let contextN = OpenCLEvaluationContext( " NVIDIA *" , DeviceType.Gpu )
47+ let contextA = OpenCLEvaluationContext( " AMD *" , DeviceType.Gpu)
4748
4849 [<ParamsSource( " GraphPaths" ) >]
4950 member val PathToGraphPair = Unchecked.defaultof< string * string> with get, set
@@ -90,7 +91,7 @@ type EWiseAddBenchmarks() =
9091 firstGraph <- fst this.PathToGraphPair |> getFullPathToGraph |> getCOO
9192 secondGraph <- snd this.PathToGraphPair |> getFullPathToGraph |> getCOO
9293
93- [<IterationSetup( Targets=[| " CpuEWiseAdditionCOO " ; " GpuEWiseAdditionCOO " |]) >]
94+ [<IterationSetup( Targets=[| " NEWiseAdditionCOO " ; " AEWiseAdditionCOO " |]) >]
9495 member this.BuildCOO () =
9596 leftCOO <-
9697 Matrix.Build< float>(
@@ -149,14 +150,14 @@ type EWiseAddBenchmarks() =
149150 ( List.ofArray <| Array.zip3 secondGraph.Rows secondGraph.Columns secondGraph.Values)
150151
151152 [<Benchmark>]
152- member this.CpuEWiseAdditionCOO () =
153+ member this.NEWiseAdditionCOO () =
153154 leftCOO.EWiseAdd rightCOO None FloatSemiring.addMult
154- |> contextCPU .RunSync
155+ |> contextN .RunSync
155156
156157 [<Benchmark>]
157- member this.GpuEWiseAdditionCOO () =
158+ member this.AEWiseAdditionCOO () =
158159 leftCOO.EWiseAdd rightCOO None FloatSemiring.addMult
159- |> contextGPU .RunSync
160+ |> contextA .RunSync
160161
161162 [<Benchmark>]
162163 member this.EWiseAdditionCSR () =
0 commit comments