Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d55d34f
add: Gather
IgorErin Mar 12, 2023
a136bd3
add: Expand module
IgorErin Mar 13, 2023
f77b4d2
add: requiredRawsLengths test
IgorErin Mar 13, 2023
d22621e
wip: module Expand test
IgorErin Mar 13, 2023
9d25601
refactor: globalMap
IgorErin Mar 13, 2023
5479816
add: Expand stage
IgorErin Mar 13, 2023
be13d6e
add: Expand test
IgorErin Mar 16, 2023
890bdd1
merge: dev
IgorErin Mar 26, 2023
6da457b
add: reduceByKey2D
IgorErin Mar 27, 2023
66c2711
refactor: wip
IgorErin Apr 1, 2023
91a72e2
add: Gather tests
IgorErin Apr 3, 2023
b679650
wip: segments computing tests
IgorErin Apr 4, 2023
7e09219
wip: expand tests passed
IgorErin Apr 4, 2023
84fb950
wip: getUniqueBitmap{first/last} occurrence
IgorErin Apr 5, 2023
8ec7fd7
add: Scatter.firstOccurrence
IgorErin Apr 5, 2023
63037b6
spgemm: left filtering
IgorErin Apr 6, 2023
03e7e95
add: init gather
IgorErin Apr 6, 2023
6f02570
add: init scatter
IgorErin Apr 6, 2023
29c564c
add: scatter init value
IgorErin Apr 6, 2023
972b392
refactor: init in spgemm
IgorErin Apr 6, 2023
73d755f
refactor: deforestation in ClArray.choose
IgorErin Apr 6, 2023
f34e590
add: ClArray.choose2
IgorErin Apr 6, 2023
751ee68
add: filter after multiplication
IgorErin Apr 6, 2023
69be680
add: reduce by key option
IgorErin Apr 6, 2023
3f7c0bf
add: spgemm
IgorErin Apr 7, 2023
96c0c08
refactor: spgemm
IgorErin Apr 7, 2023
95fea31
refactor: duplication, allTests in Reduce
IgorErin Apr 7, 2023
c5fa0d0
refactor: ClArray.Free and *.FreeAndWait
IgorErin Apr 7, 2023
6ff1971
refactor: remove use in test
IgorErin Apr 7, 2023
048477d
refactor: formatting
IgorErin Apr 7, 2023
3703609
merge: dev
IgorErin Apr 7, 2023
4d26023
refactor: formatting
IgorErin Apr 7, 2023
cf7cc1d
refactor: expand endSize
IgorErin Apr 8, 2023
fdb9041
refactor: Scatter.test memory release
IgorErin Apr 8, 2023
a6ebc30
refactor: tests, names
IgorErin Apr 8, 2023
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksBFS.fs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type BFSBenchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem :
(matrix :> IDeviceMemObject).Dispose this.Processor

member this.ClearResult() =
this.ResultVector.Dispose this.Processor
this.ResultVector.FreeAndWait this.Processor

member this.ReadMatrix() =
let matrixReader = this.InputMatrixReader
Expand All @@ -103,7 +103,7 @@ type BFSBenchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem :
type BFSBenchmarksWithoutDataTransfer() =

inherit BFSBenchmarks<ClMatrix.CSR<int>, int>(
(fun context wgSize -> BFS.singleSource context ArithmeticOperations.intSum ArithmeticOperations.intMul wgSize),
(fun context wgSize -> BFS.singleSource context ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption wgSize),
int,
(fun _ -> Utils.nextInt (System.Random())),
Matrix.ToBackendCSR)
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksEWiseAdd.fs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ module M =
type EWiseAddBenchmarks4Float32COOWithoutDataTransfer() =

inherit EWiseAddBenchmarksWithoutDataTransfer<ClMatrix.COO<float32>,float32>(
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32Sum wgSize),
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32SumOption wgSize),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
Matrix.ToBackendCOO
Expand All @@ -207,7 +207,7 @@ type EWiseAddBenchmarks4Float32COOWithoutDataTransfer() =
type EWiseAddBenchmarks4Float32COOWithDataTransfer() =

inherit EWiseAddBenchmarksWithDataTransfer<ClMatrix.COO<float32>,float32>(
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32Sum wgSize),
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32SumOption wgSize),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
Matrix.ToBackendCOO<float32>,
Expand All @@ -234,7 +234,7 @@ type EWiseAddBenchmarks4BoolCOOWithoutDataTransfer() =
type EWiseAddBenchmarks4Float32CSRWithoutDataTransfer() =

inherit EWiseAddBenchmarksWithoutDataTransfer<ClMatrix.CSR<float32>,float32>(
(fun context wgSize -> CSR.Matrix.map2 context ArithmeticOperations.float32Sum wgSize),
(fun context wgSize -> CSR.Matrix.map2 context ArithmeticOperations.float32SumOption wgSize),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
Matrix.ToBackendCSR
Expand Down
12 changes: 6 additions & 6 deletions benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksMxm.fs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ module Operations =
type MxmBenchmarks4Float32MultiplicationOnly() =

inherit MxmBenchmarksMultiplicationOnly<float32>(
(Matrix.mxm Operations.add Operations.mult),
(Matrix.SpGeMM.masked Operations.add Operations.mult),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
Expand All @@ -241,7 +241,7 @@ type MxmBenchmarks4Float32MultiplicationOnly() =
type MxmBenchmarks4Float32WithTransposing() =

inherit MxmBenchmarksWithTransposing<float32>(
(Matrix.mxm Operations.add Operations.mult),
(Matrix.SpGeMM.masked Operations.add Operations.mult),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
Expand All @@ -253,7 +253,7 @@ type MxmBenchmarks4Float32WithTransposing() =
type MxmBenchmarks4BoolMultiplicationOnly() =

inherit MxmBenchmarksMultiplicationOnly<bool>(
(Matrix.mxm Operations.logicalOr Operations.logicalAnd),
(Matrix.SpGeMM.masked Operations.logicalOr Operations.logicalAnd),
(fun _ -> true),
(fun _ -> true),
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
Expand All @@ -265,7 +265,7 @@ type MxmBenchmarks4BoolMultiplicationOnly() =
type MxmBenchmarks4BoolWithTransposing() =

inherit MxmBenchmarksWithTransposing<bool>(
(Matrix.mxm Operations.logicalOr Operations.logicalAnd),
(Matrix.SpGeMM.masked Operations.logicalOr Operations.logicalAnd),
(fun _ -> true),
(fun _ -> true),
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
Expand All @@ -277,7 +277,7 @@ type MxmBenchmarks4BoolWithTransposing() =
type MxmBenchmarks4Float32MultiplicationOnlyWithZerosFilter() =

inherit MxmBenchmarksMultiplicationOnly<float32>(
(Matrix.mxm Operations.addWithFilter Operations.mult),
(Matrix.SpGeMM.masked Operations.addWithFilter Operations.mult),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
Expand All @@ -289,7 +289,7 @@ type MxmBenchmarks4Float32MultiplicationOnlyWithZerosFilter() =
type MxmBenchmarks4Float32WithTransposingWithZerosFilter() =

inherit MxmBenchmarksWithTransposing<float32>(
(Matrix.mxm Operations.addWithFilter Operations.mult),
(Matrix.SpGeMM.masked Operations.addWithFilter Operations.mult),
float32,
(fun _ -> Utils.nextSingle (System.Random())),
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
Expand Down
16 changes: 8 additions & 8 deletions benchmarks/GraphBLAS-sharp.Benchmarks/VectorEWiseAddGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -159,53 +159,53 @@ type VectorEWiseBenchmarksWithDataTransfer<'elem when 'elem : struct>(
type VectorEWiseBenchmarks4FloatSparseWithoutDataTransfer() =

inherit VectorEWiseBenchmarksWithoutDataTransfer<float>(
(fun context -> Vector.map2 context ArithmeticOperations.floatSum),
(fun context -> Vector.map2 context ArithmeticOperations.floatSumOption),
VectorGenerator.floatPair Sparse)

type VectorEWiseBenchmarks4Int32SparseWithoutDataTransfer() =

inherit VectorEWiseBenchmarksWithoutDataTransfer<int32>(
(fun context -> Vector.map2 context ArithmeticOperations.intSum),
(fun context -> Vector.map2 context ArithmeticOperations.intSumOption),
VectorGenerator.intPair Sparse)

/// General

type VectorEWiseGeneralBenchmarks4FloatSparseWithoutDataTransfer() =

inherit VectorEWiseBenchmarksWithoutDataTransfer<float>(
(fun context -> Vector.map2 context ArithmeticOperations.floatSum),
(fun context -> Vector.map2 context ArithmeticOperations.floatSumOption),
VectorGenerator.floatPair Sparse)

type VectorEWiseGeneralBenchmarks4Int32SparseWithoutDataTransfer() =

inherit VectorEWiseBenchmarksWithoutDataTransfer<int32>(
(fun context -> Vector.map2 context ArithmeticOperations.intSum),
(fun context -> Vector.map2 context ArithmeticOperations.intSumOption),
VectorGenerator.intPair Sparse)

/// With data transfer

type VectorEWiseBenchmarks4FloatSparseWithDataTransfer() =

inherit VectorEWiseBenchmarksWithDataTransfer<float>(
(fun context -> Vector.map2 context ArithmeticOperations.floatSum),
(fun context -> Vector.map2 context ArithmeticOperations.floatSumOption),
VectorGenerator.floatPair Sparse)

type VectorEWiseBenchmarks4Int32SparseWithDataTransfer() =

inherit VectorEWiseBenchmarksWithDataTransfer<int32>(
(fun context -> Vector.map2 context ArithmeticOperations.intSum),
(fun context -> Vector.map2 context ArithmeticOperations.intSumOption),
VectorGenerator.intPair Sparse)

/// General with data transfer

type VectorEWiseGeneralBenchmarks4FloatSparseWithDataTransfer() =

inherit VectorEWiseBenchmarksWithDataTransfer<float>(
(fun context -> Vector.map2 context ArithmeticOperations.floatSum),
(fun context -> Vector.map2 context ArithmeticOperations.floatSumOption),
VectorGenerator.floatPair Sparse)

type VectorEWiseGeneralBenchmarks4Int32SparseWithDataTransfer() =

inherit VectorEWiseBenchmarksWithDataTransfer<int32>(
(fun context -> Vector.map2 context ArithmeticOperations.intSum),
(fun context -> Vector.map2 context ArithmeticOperations.intSumOption),
VectorGenerator.intPair Sparse)
2 changes: 1 addition & 1 deletion src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module BFS =
not
<| (containsNonZero queue front).ToHostAndFree queue

front.Dispose queue
front.Free queue

levels
| _ -> failwith "Not implemented"
Loading