Skip to content

Commit 6ac0624

Browse files
committed
Fix BuildCOO for bool bench
1 parent 8c06823 commit 6ac0624

3 files changed

Lines changed: 22 additions & 16 deletions

File tree

benchmarks/GraphBLAS-sharp.Benchmarks/BenchmarksEWiseAdd.fs

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type BoolConfig = Config<bool>
4343
type EWiseAddBenchmarks() =
4444
[<ParamsSource("AvaliableContexts")>]
4545
member val OclContext = Unchecked.defaultof<ClContext> with get, set
46-
46+
4747
[<IterationCleanup>]
4848
member this.ClearBuffers() =
4949
let (ClContext context) = this.OclContext
@@ -115,9 +115,9 @@ type EWiseAddBenchmarks4Float32() =
115115
Matrix.Build<float32>(
116116
this.FirstMatrix.RowCount,
117117
this.FirstMatrix.ColumnCount,
118-
this.FirstMatrix.Rows,
119-
this.FirstMatrix.Columns,
120-
this.FirstMatrix.Values,
118+
leftRows,
119+
leftCols,
120+
leftVals,
121121
COO
122122
)
123123

@@ -132,9 +132,9 @@ type EWiseAddBenchmarks4Float32() =
132132
Matrix.Build<float32>(
133133
this.SecondMatrix.RowCount,
134134
this.SecondMatrix.ColumnCount,
135-
this.SecondMatrix.Rows,
136-
this.SecondMatrix.Columns,
137-
this.SecondMatrix.Values,
135+
rightRows,
136+
rightCols,
137+
rightVals,
138138
COO
139139
)
140140

@@ -195,6 +195,11 @@ type EWiseAddBenchmarks4Bool() =
195195
[<ParamsSource("InputMatricesProvider")>]
196196
member val InputMatrix = Unchecked.defaultof<InputMatrixFormat<bool>> with get, set
197197

198+
[<GlobalSetup>]
199+
member this.FormInputData() =
200+
this.FirstMatrix <- this.InputMatrix.MatrixStructure
201+
this.SecondMatrix <- this.InputMatrix.MatrixStructure |> Utils.transposeCOO
202+
198203
[<IterationSetup>]
199204
member this.BuildCOO() =
200205
let leftRows = Array.zeroCreate<int> this.FirstMatrix.Rows.Length
@@ -207,9 +212,9 @@ type EWiseAddBenchmarks4Bool() =
207212
Matrix.Build<bool>(
208213
this.FirstMatrix.RowCount,
209214
this.FirstMatrix.ColumnCount,
210-
this.FirstMatrix.Rows,
211-
this.FirstMatrix.Columns,
212-
this.FirstMatrix.Values,
215+
leftRows,
216+
leftCols,
217+
leftVals,
213218
COO
214219
)
215220

@@ -223,9 +228,9 @@ type EWiseAddBenchmarks4Bool() =
223228
Matrix.Build<bool>(
224229
this.SecondMatrix.RowCount,
225230
this.SecondMatrix.ColumnCount,
226-
this.SecondMatrix.Rows,
227-
this.SecondMatrix.Columns,
228-
this.SecondMatrix.Values,
231+
rightRows,
232+
rightCols,
233+
rightVals,
229234
COO
230235
)
231236

src/GraphBLAS-sharp/GraphBLAS-sharp.fsproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.1;net461</TargetFrameworks>
5-
<AppConfig>app.config</AppConfig>
6-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
75
</PropertyGroup>
86
<PropertyGroup Condition="'$(Configuration)'=='Release'">
97
<Optimize>true</Optimize>
@@ -30,6 +28,9 @@
3028
<Compile Include="Algorithms/BFS.fs" />
3129
<Compile Include="Algorithms/SSSP.fs" />
3230
<Compile Include="Algorithms/TriangleCounting.fs" />
31+
<Content Include="YC.OpenCL.NET.dll.config">
32+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
33+
</Content>
3334
</ItemGroup>
3435
<Import Project="..\..\.paket\Paket.Restore.targets" />
35-
</Project>
36+
</Project>
File renamed without changes.

0 commit comments

Comments
 (0)