Skip to content

Commit a978baf

Browse files
committed
refactor: Brahma update, SpMV.localMemSize
1 parent cf2dfe6 commit a978baf

4 files changed

Lines changed: 19 additions & 26 deletions

File tree

paket.dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ nuget System.CodeDom >= 7.0
1616
nuget FSharp.Quotations.Evaluator 2.1.0
1717
nuget FSharpx.Collections >= 3.1
1818
nuget FSharpx.Text.StructuredFormat >= 3.1
19-
nuget Brahma.FSharp >= 2.0.1
19+
nuget Brahma.FSharp >= 2.0.4
2020
nuget BenchmarkDotNet
2121
nuget MathNet.Numerics.FSharp 4.0.0
2222
nuget MathNet.Numerics.MKL.Win-x64 2.5.0

paket.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ NUGET
1818
System.Reflection.Emit.Lightweight (>= 4.7) - restriction: >= netstandard2.0
1919
System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: >= netstandard2.0
2020
BenchmarkDotNet.Annotations (0.13.2) - restriction: >= netstandard2.0
21-
Brahma.FSharp (2.0.3)
22-
Brahma.FSharp.OpenCL.Printer (>= 2.0.3) - restriction: >= net7.0
23-
Brahma.FSharp.OpenCL.Shared (>= 2.0.3) - restriction: >= net7.0
24-
Brahma.FSharp.OpenCL.Translator (>= 2.0.3) - restriction: >= net7.0
21+
Brahma.FSharp (2.0.4)
22+
Brahma.FSharp.OpenCL.Printer (>= 2.0.4) - restriction: >= net7.0
23+
Brahma.FSharp.OpenCL.Shared (>= 2.0.4) - restriction: >= net7.0
24+
Brahma.FSharp.OpenCL.Translator (>= 2.0.4) - restriction: >= net7.0
2525
FSharp.Core (7.0) - restriction: >= net7.0
2626
FSharp.Quotations.Evaluator (>= 2.1) - restriction: >= net7.0
27-
YC.OpenCL.NET (>= 2.0.3) - restriction: >= net7.0
28-
Brahma.FSharp.OpenCL.AST (2.0.3) - restriction: >= net7.0
27+
YC.OpenCL.NET (>= 2.0.4) - restriction: >= net7.0
28+
Brahma.FSharp.OpenCL.AST (2.0.4) - restriction: >= net7.0
2929
FSharp.Core (7.0) - restriction: >= net7.0
30-
Brahma.FSharp.OpenCL.Printer (2.0.3) - restriction: >= net7.0
31-
Brahma.FSharp.OpenCL.AST (>= 2.0.3) - restriction: >= net7.0
32-
Brahma.FSharp.OpenCL.Translator (>= 2.0.3) - restriction: >= net7.0
30+
Brahma.FSharp.OpenCL.Printer (2.0.4) - restriction: >= net7.0
31+
Brahma.FSharp.OpenCL.AST (>= 2.0.4) - restriction: >= net7.0
32+
Brahma.FSharp.OpenCL.Translator (>= 2.0.4) - restriction: >= net7.0
3333
FSharp.Core (7.0) - restriction: >= net7.0
3434
FSharpx.Collections (>= 3.1) - restriction: >= net7.0
3535
FSharpx.Text.StructuredFormat (>= 3.1) - restriction: >= net7.0
36-
Brahma.FSharp.OpenCL.Shared (2.0.3) - restriction: >= net7.0
37-
YC.OpenCL.NET (>= 2.0.3) - restriction: >= net7.0
38-
Brahma.FSharp.OpenCL.Translator (2.0.3) - restriction: >= net7.0
39-
Brahma.FSharp.OpenCL.AST (>= 2.0.3) - restriction: >= net7.0
40-
Brahma.FSharp.OpenCL.Shared (>= 2.0.3) - restriction: >= net7.0
36+
Brahma.FSharp.OpenCL.Shared (2.0.4) - restriction: >= net7.0
37+
YC.OpenCL.NET (>= 2.0.4) - restriction: >= net7.0
38+
Brahma.FSharp.OpenCL.Translator (2.0.4) - restriction: >= net7.0
39+
Brahma.FSharp.OpenCL.AST (>= 2.0.4) - restriction: >= net7.0
40+
Brahma.FSharp.OpenCL.Shared (>= 2.0.4) - restriction: >= net7.0
4141
FSharp.Core (7.0) - restriction: >= net7.0
4242
FSharp.Quotations.Evaluator (>= 2.1) - restriction: >= net7.0
4343
FSharpx.Collections (>= 3.1) - restriction: >= net7.0
@@ -501,7 +501,7 @@ NUGET
501501
System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
502502
System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
503503
System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
504-
System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0))
504+
System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0))
505505
Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos))
506506
Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos))
507507
System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (>= netstandard2.0)
@@ -744,7 +744,7 @@ NUGET
744744
System.Xml.XmlDocument (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
745745
TypeShape (9.0)
746746
FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0
747-
YC.OpenCL.NET (2.0.3) - restriction: >= net7.0
747+
YC.OpenCL.NET (2.0.4) - restriction: >= net7.0
748748
ExtraConstraints.Fody (1.14) - restriction: >= net7.0
749749
Microsoft.Build.Framework (16.10) - restriction: >= net7.0
750750
System.CodeDom (>= 7.0) - restriction: >= net7.0

src/GraphBLAS-sharp.Backend/Common/Utils.fs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ module internal Utils =
2626

2727
let ceilToMultiple multiple x = ((x - 1) / multiple + 1) * multiple
2828

29-
let getLocalMemorySize (clContext: ClContext) =
30-
let error = ref Unchecked.defaultof<ClErrorCode>
31-
32-
Cl
33-
.GetDeviceInfo(clContext.ClDevice.Device, OpenCL.Net.DeviceInfo.LocalMemSize, error)
34-
.CastTo<int>()
35-
3629
let getClArrayOfValueTypeSize<'a when 'a: struct> localMemorySize = localMemorySize / sizeof<'a>
3730

3831
//Option type in C is represented as structure with additional integer field

src/GraphBLAS-sharp.Backend/Vector/SpMV.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module SpMV =
1313
(mul: Expr<'a option -> 'b option -> 'c option>)
1414
workGroupSize
1515
=
16-
//Until LocalMemSize added to ClDevice as member
17-
let localMemorySize = Utils.getLocalMemorySize clContext
16+
17+
let localMemorySize = clContext.ClDevice.LocalMemSize / 1<Byte>
1818

1919
let localPointersArraySize = workGroupSize + 1
2020

0 commit comments

Comments
 (0)