Skip to content

Commit 2db0be2

Browse files
committed
merge: dev
2 parents d0133ec + e0485c5 commit 2db0be2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2338
-1853
lines changed

benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksBFS.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type BFSBenchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem :
8383
(matrix :> IDeviceMemObject).Dispose this.Processor
8484

8585
member this.ClearResult() =
86-
this.ResultVector.Dispose this.Processor
86+
this.ResultVector.FreeAndWait this.Processor
8787

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

105105
inherit BFSBenchmarks<ClMatrix.CSR<int>, int>(
106-
(fun context wgSize -> BFS.singleSource context ArithmeticOperations.intSum ArithmeticOperations.intMul wgSize),
106+
(fun context wgSize -> BFS.singleSource context ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption wgSize),
107107
int,
108108
(fun _ -> Utils.nextInt (System.Random())),
109109
Matrix.ToBackendCSR)

benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksEWiseAdd.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ module M =
195195
type EWiseAddBenchmarks4Float32COOWithoutDataTransfer() =
196196

197197
inherit EWiseAddBenchmarksWithoutDataTransfer<ClMatrix.COO<float32>,float32>(
198-
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32Sum wgSize),
198+
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32SumOption wgSize),
199199
float32,
200200
(fun _ -> Utils.nextSingle (System.Random())),
201201
Matrix.ToBackendCOO
@@ -207,7 +207,7 @@ type EWiseAddBenchmarks4Float32COOWithoutDataTransfer() =
207207
type EWiseAddBenchmarks4Float32COOWithDataTransfer() =
208208

209209
inherit EWiseAddBenchmarksWithDataTransfer<ClMatrix.COO<float32>,float32>(
210-
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32Sum wgSize),
210+
(fun context wgSize -> COO.Matrix.map2 context ArithmeticOperations.float32SumOption wgSize),
211211
float32,
212212
(fun _ -> Utils.nextSingle (System.Random())),
213213
Matrix.ToBackendCOO<float32>,
@@ -234,7 +234,7 @@ type EWiseAddBenchmarks4BoolCOOWithoutDataTransfer() =
234234
type EWiseAddBenchmarks4Float32CSRWithoutDataTransfer() =
235235

236236
inherit EWiseAddBenchmarksWithoutDataTransfer<ClMatrix.CSR<float32>,float32>(
237-
(fun context wgSize -> CSR.Matrix.map2 context ArithmeticOperations.float32Sum wgSize),
237+
(fun context wgSize -> CSR.Matrix.map2 context ArithmeticOperations.float32SumOption wgSize),
238238
float32,
239239
(fun _ -> Utils.nextSingle (System.Random())),
240240
Matrix.ToBackendCSR

benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksMxm.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ module Operations =
229229
type MxmBenchmarks4Float32MultiplicationOnly() =
230230

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

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

255255
inherit MxmBenchmarksMultiplicationOnly<bool>(
256-
(Matrix.mxm Operations.logicalOr Operations.logicalAnd),
256+
(Matrix.SpGeMM.masked Operations.logicalOr Operations.logicalAnd),
257257
(fun _ -> true),
258258
(fun _ -> true),
259259
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
@@ -265,7 +265,7 @@ type MxmBenchmarks4BoolMultiplicationOnly() =
265265
type MxmBenchmarks4BoolWithTransposing() =
266266

267267
inherit MxmBenchmarksWithTransposing<bool>(
268-
(Matrix.mxm Operations.logicalOr Operations.logicalAnd),
268+
(Matrix.SpGeMM.masked Operations.logicalOr Operations.logicalAnd),
269269
(fun _ -> true),
270270
(fun _ -> true),
271271
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))
@@ -277,7 +277,7 @@ type MxmBenchmarks4BoolWithTransposing() =
277277
type MxmBenchmarks4Float32MultiplicationOnlyWithZerosFilter() =
278278

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

291291
inherit MxmBenchmarksWithTransposing<float32>(
292-
(Matrix.mxm Operations.addWithFilter Operations.mult),
292+
(Matrix.SpGeMM.masked Operations.addWithFilter Operations.mult),
293293
float32,
294294
(fun _ -> Utils.nextSingle (System.Random())),
295295
(fun context matrix -> ClMatrix.CSR (Matrix.ToBackendCSR context matrix))

benchmarks/GraphBLAS-sharp.Benchmarks/VectorEWiseAddGen.fs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,53 +159,53 @@ type VectorEWiseBenchmarksWithDataTransfer<'elem when 'elem : struct>(
159159
type VectorEWiseBenchmarks4FloatSparseWithoutDataTransfer() =
160160

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

165165
type VectorEWiseBenchmarks4Int32SparseWithoutDataTransfer() =
166166

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

171171
/// General
172172
173173
type VectorEWiseGeneralBenchmarks4FloatSparseWithoutDataTransfer() =
174174

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

179179
type VectorEWiseGeneralBenchmarks4Int32SparseWithoutDataTransfer() =
180180

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

185185
/// With data transfer
186186
187187
type VectorEWiseBenchmarks4FloatSparseWithDataTransfer() =
188188

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

193193
type VectorEWiseBenchmarks4Int32SparseWithDataTransfer() =
194194

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

199199
/// General with data transfer
200200
201201
type VectorEWiseGeneralBenchmarks4FloatSparseWithDataTransfer() =
202202

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

207207
type VectorEWiseGeneralBenchmarks4Int32SparseWithDataTransfer() =
208208

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

src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module BFS =
6767
not
6868
<| (containsNonZero queue front).ToHostAndFree queue
6969

70-
front.Dispose queue
70+
front.Free queue
7171

7272
levels
7373
| _ -> failwith "Not implemented"

src/GraphBLAS-sharp.Backend/COOVector/AssignSubVector.fs

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/GraphBLAS-sharp.Backend/COOVector/EWiseAdd.fs

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/GraphBLAS-sharp.Backend/COOVector/FillSubVector.fs

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)