Skip to content

Commit

Permalink
revert: benchmarks changes
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiipatov committed Nov 25, 2023
1 parent d6373cc commit 9a9b7f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 31 deletions.
29 changes: 2 additions & 27 deletions benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions
open GraphBLAS.FSharp.Backend.Quotes

[<AbstractClass>]
[<IterationCount(10)>]
[<WarmupCount(3)>]
[<IterationCount(100)>]
[<WarmupCount(10)>]
[<Config(typeof<Configs.Matrix>)>]
type Benchmarks<'elem when 'elem : struct>(
buildFunToBenchmark,
Expand Down Expand Up @@ -139,30 +139,6 @@ type BFSWithoutTransferBenchmarkInt32() =
static member InputMatrixProvider =
Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt"

type BFSPushPullWithoutTransferBenchmarkInt32() =

inherit WithoutTransferBenchmark<int>(
(Algorithms.BFS.singleSourcePushPull ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption),
int32,
(fun _ -> Utils.nextInt (System.Random())),
0,
(fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context))

static member InputMatrixProvider =
Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt"

type SSSPWithoutTransferBenchmarkInt32() =

inherit WithoutTransferBenchmark<int>(
Algorithms.SSSP.run,
int32,
(fun _ -> Utils.nextInt (System.Random())),
0,
(fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context))

static member InputMatrixProvider =
Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt"

type WithTransferBenchmark<'elem when 'elem : struct>(
buildFunToBenchmark,
converter: string -> 'elem,
Expand Down Expand Up @@ -211,4 +187,3 @@ type BFSWithTransferBenchmarkInt32() =

static member InputMatrixProvider =
Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt"

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<Compile Include="Matrix/Map2/MathNET.fs" />
<Compile Include="Vector/Map2.fs" />
<Compile Include="Algorithms/BFS.fs" />
<Compile Include="Algorithms/PageRank.fs" />
<Compile Include="Program.fs" />
<Folder Include="Datasets" />
</ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ open BenchmarkDotNet.Running
[<EntryPoint>]
let main argv =
let benchmarks =
BenchmarkSwitcher [| typeof<Algorithms.BFS.BFSWithoutTransferBenchmarkInt32>
typeof<Algorithms.BFS.BFSPushPullWithoutTransferBenchmarkInt32>
typeof<Algorithms.PageRank.PageRankWithoutTransferBenchmarkFloat32> |]
BenchmarkSwitcher [| typeof<Algorithms.BFS.BFSWithoutTransferBenchmarkInt32> |]

benchmarks.Run argv |> ignore
0

0 comments on commit 9a9b7f9

Please sign in to comment.