From 46279079555acd95ff0b75aea6863e08185c829a Mon Sep 17 00:00:00 2001 From: IgorErin Date: Tue, 9 May 2023 10:35:02 +0300 Subject: [PATCH 001/102] refactor: SpGeMM memory release --- src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs | 1 + src/GraphBLAS-sharp.Backend/Common/Sum.fs | 9 +++++++++ src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs | 11 ++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 29f9e26a..feafce5e 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -318,6 +318,7 @@ module Radix = keysPair <- swap keysPair valuesPair <- swap valuesPair + globalOffset.Free processor localOffset.Free processor shift.Free processor diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index fe7feeb2..07d64a27 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -568,6 +568,10 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + reducedKeys.Free processor + resultPositions.Free processor + None else // write values @@ -848,6 +852,11 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + firstReducedKeys.Free processor + secondReducedKeys.Free processor + resultPositions.Free processor + None else // write value diff --git a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs index 92eba752..4434472e 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs @@ -399,6 +399,10 @@ module Expand = // compute sub result let length, result = runCOO subMatrix + + // release subMatrix (TODO(non blocking Free) + subMatrix.Dispose processor + // increase workOffset according to previous expand let workOffset = workOffset + length @@ -445,7 +449,12 @@ module Expand = if generalLength < maxAllocSize then segmentLengths.Free processor - runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix + let result = + runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix + + rightMatrixRowsNNZ.Free processor + + result else let result = runManySteps From a48d44eac3f7585b730a557d7595ca5fd2804935 Mon Sep 17 00:00:00 2001 From: IgorErin Date: Sat, 20 May 2023 14:50:59 +0300 Subject: [PATCH 002/102] refactor: SpGeMM benchmark --- .../Matrix/SpGeMM/Expand.fs | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index 0a7193e7..87e81239 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -15,7 +15,7 @@ open GraphBLAS.FSharp.Backend [] [] [] -[)>] +[)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, converter: string -> 'elem, @@ -24,11 +24,9 @@ type Benchmarks<'elem when 'elem : struct>( let mutable funToBenchmark = None - let mutable firstMatrix = Unchecked.defaultof> - let mutable secondMatrix = Unchecked.defaultof> + let mutable matrix = Unchecked.defaultof> - let mutable firstMatrixHost = Unchecked.defaultof<_> - let mutable secondMatrixHost = Unchecked.defaultof<_> + let mutable matrixHost = Unchecked.defaultof<_> member val ResultMatrix = Unchecked.defaultof option> with get, set @@ -38,7 +36,7 @@ type Benchmarks<'elem when 'elem : struct>( [] member val InputMatrixReader = Unchecked.defaultof with get, set - member this.OclContext:ClContext = (fst this.OclContextInfo).ClContext + member this.OclContext: ClContext = (fst this.OclContextInfo).ClContext member this.WorkGroupSize = snd this.OclContextInfo member this.Processor = @@ -78,11 +76,10 @@ type Benchmarks<'elem when 'elem : struct>( reader.ReadMatrix converter member this.Mxm() = - this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly firstMatrix secondMatrix + this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly matrix matrix member this.ClearInputMatrices() = - firstMatrix.Dispose this.Processor - secondMatrix.Dispose this.Processor + matrix.Dispose this.Processor member this.ClearResult() = match this.ResultMatrix with @@ -90,12 +87,10 @@ type Benchmarks<'elem when 'elem : struct>( | None -> () member this.ReadMatrices() = - firstMatrixHost <- this.ReadMatrix this.InputMatrixReader - secondMatrixHost <- this.ReadMatrix this.InputMatrixReader + matrixHost <- this.ReadMatrix this.InputMatrixReader member this.LoadMatricesToGPU () = - firstMatrix <- buildMatrix this.OclContext firstMatrixHost - secondMatrix <- buildMatrix this.OclContext secondMatrixHost + matrix <- buildMatrix this.OclContext matrixHost abstract member GlobalSetup : unit -> unit From 41309d93b430b7228651aac1f6a7c346f8296d4a Mon Sep 17 00:00:00 2001 From: IgorErin Date: Sat, 20 May 2023 16:11:05 +0300 Subject: [PATCH 003/102] refactor: paket update --- paket.lock | 222 ++++++++++++++++++++++++++++------------------------- 1 file changed, 118 insertions(+), 104 deletions(-) diff --git a/paket.lock b/paket.lock index 173127c1..dadffb7c 100644 --- a/paket.lock +++ b/paket.lock @@ -52,7 +52,7 @@ NUGET ExtraConstraints.Fody (1.14) Fody (>= 6.0) - restriction: || (>= net452) (>= netstandard1.4) NETStandard.Library (>= 1.6.1) - restriction: && (< net452) (>= netstandard1.4) - Fody (6.6.4) - restriction: || (>= net452) (>= netstandard1.4) + Fody (6.7) - restriction: || (>= net452) (>= netstandard1.4) FsCheck (2.16.5) - restriction: || (>= net461) (>= netstandard2.0) FSharp.Core (>= 4.2.3) - restriction: || (>= net452) (>= netstandard1.6) FSharp.Core (7.0) @@ -77,33 +77,33 @@ NUGET System.Runtime.Serialization.Xml (>= 4.3) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) MathNet.Numerics.MKL.Win-x64 (2.5) - Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.Build.Framework (16.10) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.5) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Analyzers (>= 3.3.3) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: && (< netcoreapp3.1) (>= netstandard2.0) - System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) + System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 6.0) - restriction: >= netstandard2.0 - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< netcoreapp3.1) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.5) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.5) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.5) - restriction: || (>= net45) (>= netcoreapp2.1) + System.Text.Encoding.CodePages (>= 7.0) - restriction: >= netstandard2.0 + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) + Microsoft.CodeAnalysis.CSharp (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.6) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.410101) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 1.1) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.421201) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 1.1) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 2.1.1) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Runtime (2.3.405304) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (2.4.416101) - restriction: >= netstandard2.0 Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.0.7) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (>= net462) (>= netstandard1.6) + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.3) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) Microsoft.Extensions.DependencyInjection (7.0) - restriction: >= netstandard2.0 @@ -138,17 +138,17 @@ NUGET System.ComponentModel.Primitives (>= 4.1) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (>= 4.1) - restriction: >= uap10.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: >= uap10.0 - Microsoft.NETCore.Platforms (7.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) + Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) Microsoft.SourceLink.Common (1.1.1) - copy_local: true Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.5) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.ObjectModel (17.6) - restriction: >= netcoreapp3.1 NuGet.Frameworks (>= 5.11) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.5) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.5) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.6) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.6) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -160,7 +160,7 @@ NUGET System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 - Mono.Cecil (0.11.4) - restriction: || (>= net461) (>= netstandard2.0) + Mono.Cecil (0.11.5) - restriction: || (>= net461) (>= netstandard2.0) NETStandard.Library (2.0.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard2.0)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< net452) (>= netstandard1.4)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) Microsoft.Win32.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (< netstandard1.4)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) @@ -206,16 +206,16 @@ NUGET System.Threading.Timer (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) System.Xml.ReaderWriter (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (< netstandard1.4)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) System.Xml.XDocument (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) - Newtonsoft.Json (13.0.2) - restriction: || (>= netcoreapp3.1) (>= uap10.0) + Newtonsoft.Json (13.0.3) - restriction: || (>= netcoreapp3.1) (>= uap10.0) Microsoft.CSharp (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) NETStandard.Library (>= 1.6.1) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.ComponentModel.TypeConverter (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.5) - restriction: >= netcoreapp3.1 - Perfolizer (0.2.1) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6) - restriction: >= netcoreapp3.1 + Perfolizer (0.3.4) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.4) - restriction: && (>= netstandard2.0) (< netstandard2.1) QuikGraph (2.5) NETStandard.Library (>= 1.6.1) - restriction: && (< net35) (>= netstandard1.3) (< netstandard2.0) runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) @@ -297,7 +297,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Diagnostics.DiagnosticSource (7.0.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Diagnostics.Tools (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -391,9 +391,9 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Management (7.0) - restriction: >= netstandard2.0 + System.Management (7.0.1) - restriction: >= netstandard2.0 System.CodeDom (>= 7.0) - restriction: >= netstandard2.0 - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (>= netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -486,7 +486,7 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.Metadata (7.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (7.0.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) @@ -503,7 +503,7 @@ NUGET System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - 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)) + 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)) 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)) 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)) 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) @@ -677,7 +677,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) System.Threading.Timer (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -765,16 +765,16 @@ NUGET FSharp.Compiler.Service (>= 41.0.1) - restriction: >= net5.0 FSharp.Core (>= 6.0.1) - restriction: >= net5.0 McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net5.0 - FSharp.Compiler.Service (43.7.200) - restriction: >= net5.0 - FSharp.Core (7.0.200) - restriction: >= netstandard2.0 + FSharp.Compiler.Service (43.7.300) - restriction: >= net5.0 + FSharp.Core (7.0.300) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 System.Diagnostics.DiagnosticSource (>= 6.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 6.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.200) - restriction: >= net5.0 + FSharp.Core (7.0.300) - restriction: >= net5.0 McMaster.NETCore.Plugins (1.4) - restriction: >= net5.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 @@ -789,7 +789,7 @@ NUGET System.Collections.Immutable (7.0) - restriction: >= net5.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.DiagnosticSource (7.0.1) - restriction: >= net5.0 + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net5.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Memory (4.5.5) - restriction: >= net5.0 @@ -797,7 +797,7 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (4.5) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) System.Reflection.Emit (4.7) - restriction: >= net5.0 - System.Reflection.Metadata (7.0) - restriction: >= net5.0 + System.Reflection.Metadata (7.0.1) - restriction: >= net5.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (>= net5.0) (&& (>= net6.0) (< net7.0)) @@ -946,28 +946,35 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.200) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.4) - restriction: >= netstandard2.0 + FSharp.Core (7.0.300) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 - System.Security.Permissions (>= 6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) - Microsoft.Build.Utilities.Core (17.4) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.4) - restriction: >= netstandard2.0 + System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.4) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Permissions (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.4) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (7.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) + Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) @@ -975,25 +982,25 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.768) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.10) - restriction: >= netstandard2.0 - Newtonsoft.Json (13.0.2) - restriction: >= netstandard2.0 - NuGet.Common (6.5) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Configuration (6.5) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.5) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.820) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 + Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 + NuGet.Common (6.6) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Configuration (6.6) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (6.5) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (6.6) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.5) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (6.5) - restriction: >= netstandard2.0 + NuGet.Protocol (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (6.6) - restriction: >= netstandard2.0 Octokit (0.48) System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 @@ -1010,7 +1017,7 @@ NUGET System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netstandard2.1)) (>= netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -1022,7 +1029,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) @@ -1048,7 +1055,7 @@ NUGET System.Security.Permissions (7.0) - restriction: >= netstandard2.0 System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding.CodePages (7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) @@ -1090,8 +1097,8 @@ NUGET Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (3.7.1) - restriction: >= netstandard2.0 - Fable.React (9.2) + Fable.Core (4.0) - restriction: >= netstandard2.0 + Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 @@ -1183,33 +1190,40 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.200) + FSharp.Core (7.0.300) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.4) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 - System.Security.Permissions (>= 6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) - Microsoft.Build.Utilities.Core (17.4) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.4) - restriction: >= netstandard2.0 + System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.4) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Permissions (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.4) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (7.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) + Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1221,25 +1235,25 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.768) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.10) - restriction: >= netstandard2.0 - Newtonsoft.Json (13.0.2) - restriction: >= netstandard2.0 - NuGet.Common (6.5) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Configuration (6.5) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.5) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.820) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 + Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 + NuGet.Common (6.6) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Configuration (6.6) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (6.5) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (6.6) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.5) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (6.5) - restriction: >= netstandard2.0 + NuGet.Protocol (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (6.6) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1388,7 +1402,7 @@ NUGET System.Reflection.Emit (4.7) - restriction: && (< net461) (>= netstandard2.0) System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Reflection.Metadata (7.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Reflection.Metadata (7.0.1) - restriction: || (>= net461) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1405,7 +1419,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (>= net461) (&& (>= net6.0) (< net7.0)) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1482,7 +1496,7 @@ NUGET System.Security.Permissions (7.0) - restriction: >= netstandard2.0 System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.6) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) From 6f08dad1113a6cb95bb3952189b5b407e5bd4518 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 20 May 2023 18:10:09 +0300 Subject: [PATCH 004/102] SSSP dense --- .../Algorithms/SSSP.fs | 95 +++++++++++++++++++ .../GraphBLAS-sharp.Backend.fsproj | 3 +- .../Quotes/Arithmetic.fs | 29 ++++++ src/GraphBLAS-sharp.Backend/Quotes/Mask.fs | 6 ++ .../Backend/Algorithms/SSSP.fs | 72 ++++++++++++++ .../Backend/QuickGraph/Algorithms/SSSP.fs | 37 ++++++++ .../GraphBLAS-sharp.Tests.fsproj | 4 +- tests/GraphBLAS-sharp.Tests/Program.fs | 5 +- 8 files changed, 248 insertions(+), 3 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs new file mode 100644 index 00000000..9438da30 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -0,0 +1,95 @@ +namespace GraphBLAS.FSharp.Backend.Algorithms + +open GraphBLAS.FSharp.Backend +open Brahma.FSharp +open FSharp.Quotations +open GraphBLAS.FSharp.Backend.Objects +open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Backend.Vector +open GraphBLAS.FSharp.Backend.Vector.Dense +open GraphBLAS.FSharp.Backend.Objects.ClContext +open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions +open GraphBLAS.FSharp.Backend.Objects.ClCell + +module SSSP = + let run (clContext: ClContext) workGroupSize = + + let less = ArithmeticOperations.less + let min = ArithmeticOperations.min + let plus = ArithmeticOperations.intSumAsMul + + let spMVTo = + SpMV.runTo min plus clContext workGroupSize + + let create = ClArray.create clContext workGroupSize + + let createMask = ClArray.create clContext workGroupSize + + let ofList = Vector.ofList clContext workGroupSize + + let eWiseMulLess = + ClArray.map2InPlace less clContext workGroupSize + + let eWiseAddMin = + ClArray.map2InPlace min clContext workGroupSize + + let fillSubVectorTo = + Vector.assignByMaskInPlace (Convert.assignToOption Mask.assignComplemented) clContext workGroupSize + + let containsNonZero = + ClArray.exists Predicates.isSome clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) (source: int) -> + let vertexCount = matrix.RowCount + + //None is System.Int32.MaxValue + let distance = + ofList queue DeviceOnly Dense vertexCount [ source, 0 ] + + let mutable f1 = + ofList queue DeviceOnly Dense vertexCount [ source, 0 ] + + let mutable f2 = + create queue DeviceOnly vertexCount None + |> ClVector.Dense + + let m = + createMask queue DeviceOnly vertexCount None + |> ClVector.Dense + + let mutable stop = false + + while not stop do + match f1, f2, distance, m with + | ClVector.Dense front1, ClVector.Dense front2, ClVector.Dense dist, ClVector.Dense mask -> + //Getting new frontier + spMVTo queue matrix front1 front2 + + //Checking which distances were updated + eWiseMulLess queue front2 dist mask + //Updating + eWiseAddMin queue dist front2 dist + + //Filtering unproductive vertices + fillSubVectorTo queue front2 mask (clContext.CreateClCell 0) front2 + + //Swap fronts + let temp = f1 + f1 <- f2 + f2 <- temp + + //Checking if no distances were updated + stop <- + not + <| (containsNonZero queue mask).ToHostAndFree(queue) + + | _ -> failwith "not implemented" + + f1.Dispose queue + f2.Dispose queue + m.Dispose queue + + match distance with + | ClVector.Dense dist -> dist + | _ -> failwith "not implemented" diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index 4709660f..cc47ee3d 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -1,4 +1,4 @@ - + @@ -63,6 +63,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index f7d51a89..1f2a9856 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -36,6 +36,16 @@ module ArithmeticOperations = if res = zero then None else Some res @> + let inline mkNumericSumAsMul zero = + <@ fun (x: 't option) (y: 't option) -> + let mutable res = zero + + match x, y with + | Some f, Some s -> res <- f + s + | _ -> () + + if res = zero then None else Some res @> + let inline mkNumericMul zero = <@ fun (x: 't option) (y: 't option) -> let mutable res = zero @@ -173,6 +183,8 @@ module ArithmeticOperations = let floatMulAtLeastOne = mkNumericMulAtLeastOne 0.0 let float32MulAtLeastOne = mkNumericMulAtLeastOne 0f + let intSumAsMul = mkNumericSumAsMul System.Int32.MaxValue + let notOption = <@ fun x -> match x with @@ -216,3 +228,20 @@ module ArithmeticOperations = let floatMul = createPair 0.0 (*) <@ (*) @> let float32Mul = createPair 0.0f (*) <@ (*) @> + + // other + let less<'a when 'a: comparison> = + <@ fun (x: 'a option) (y: 'a option) -> + match x, y with + | Some x, Some y -> if (x < y) then Some 1 else None + | Some x, None -> Some 1 + | _ -> None @> + + //TODO: noneValue + let min<'a when 'a: comparison> = + <@ fun (x: 'a option) (y: 'a option) -> + match x, y with + | Some x, Some y -> Some(min x y) + | Some x, None -> Some x + | None, Some y -> Some y + | _ -> None @> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs b/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs index 3a27b5d6..9b19b5b1 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs @@ -7,6 +7,12 @@ module Mask = | _, None -> left | _ -> right @> + let assignComplemented<'a when 'a: struct> = + <@ fun (left: 'a option) (right: 'a option) -> + match left, right with + | _, None -> right + | _ -> left @> + let op<'a, 'b when 'a: struct and 'b: struct> = <@ fun (left: 'a option) (right: 'b option) -> match right with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs new file mode 100644 index 00000000..5e75742c --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -0,0 +1,72 @@ +module GraphBLAS.FSharp.Tests.Backend.Algorithms.SSSP + +open Expecto +open GraphBLAS.FSharp.Backend +open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms +open GraphBLAS.FSharp.Tests.Backend.QuickGraph.CreateGraph +open GraphBLAS.FSharp.Backend.Objects +open GraphBLAS.FSharp.Objects.ClVectorExtensions +open GraphBLAS.FSharp.Objects + +let testFixtures (testContext: TestContext) = + [ let config = Utils.undirectedAlgoConfig + let context = testContext.ClContext + let queue = testContext.Queue + let workGroupSize = Utils.defaultWorkGroupSize + + let testName = + sprintf "Test on %A" testContext.ClContext + + let ssspDense = + Algorithms.SSSP.run context workGroupSize + + testPropertyWithConfig config testName + <| fun (matrix: int [,]) -> + + let matrix = Array2D.map (fun x -> abs x) matrix + + let graph = undirectedFromArray2D matrix 0 + + let largestComponent = + ConnectedComponents.largestComponent graph + + if largestComponent.Length > 0 then + let source = largestComponent.[0] + + let expected = + SSSP.runUndirected matrix (directedFromArray2D matrix 0) source + |> Array.map + (fun x -> + match x with + | Some x -> Some(int x) + | None -> None) + + let matrixHost = + Utils.createMatrixFromArray2D CSR matrix ((=) 0) + + let matrix = matrixHost.ToDevice context + + match matrix with + | ClMatrix.CSR mtx -> + let resDense = + ssspDense queue mtx source |> ClVector.Dense + + let resHost = resDense.ToHost queue + + (mtx :> IDeviceMemObject).Dispose queue + resDense.Dispose queue + + match resHost with + | Vector.Dense resHost -> + let actual = resHost + + Expect.sequenceEqual actual expected "Sequences must be equal" + | _ -> failwith "Not implemented" + | _ -> failwith "Not implemented" ] + +let tests = + TestCases.gpuTests "SSSP tests" testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs new file mode 100644 index 00000000..ba4f3328 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs @@ -0,0 +1,37 @@ +namespace GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms + +open QuikGraph +open QuikGraph.Algorithms.ShortestPath +open QuikGraph.Algorithms.Observers + +module SSSP = + let runUndirected (matrix: int [,]) (graph: AdjacencyGraph>) source = + let weight = + fun (e: Edge) -> float matrix.[e.Source, e.Target] + + let dijkstra = + DijkstraShortestPathAlgorithm>(graph, weight) + + // Attach a distance observer to give us the shortest path distances + let distObserver = + VertexDistanceRecorderObserver>(weight) + + distObserver.Attach(dijkstra) |> ignore + + // Attach a Vertex Predecessor Recorder Observer to give us the paths + let predecessorObserver = + VertexPredecessorRecorderObserver>() + + predecessorObserver.Attach(dijkstra) |> ignore + + // Run the algorithm with A set to be the source + dijkstra.Compute(source) + + let res: array = + Array.zeroCreate (Array2D.length1 matrix) + + for kvp in distObserver.Distances do + res.[kvp.Key] <- Some kvp.Value + + res.[source] <- Some 0.0 + res diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index 75a4f492..d03731b5 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -15,8 +15,10 @@ + + diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 9049b03e..53e031d5 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -87,7 +87,10 @@ let vectorTests = |> testSequenced let algorithmsTests = - testList "Algorithms tests" [ Algorithms.BFS.tests ] + testList + "Algorithms tests" + [ Algorithms.BFS.tests + Algorithms.SSSP.tests ] |> testSequenced let deviceTests = From 38ceee310bae7df16ddee91803d0e91a7c71d4d3 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 20 May 2023 19:19:16 +0300 Subject: [PATCH 005/102] Radix returns sorted keys --- .../Common/Sort/Radix.fs | 5 ++--- .../Matrix/SpGeMM/Expand.fs | 18 ++++++++++++++---- .../Backend/Common/Sort/Radix.fs | 14 ++++++++++---- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 29f9e26a..18654beb 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -268,7 +268,7 @@ module Radix = failwith "Mismatch of key lengths and value. Lengths must be the same" if values.Length <= 1 then - dataCopy processor allocationMode values + copy processor DeviceOnly keys, dataCopy processor DeviceOnly values else let firstKeys = copy processor DeviceOnly keys @@ -321,11 +321,10 @@ module Radix = localOffset.Free processor shift.Free processor - (fst keysPair).Free processor (snd keysPair).Free processor (snd valuesPair).Free processor - (fst valuesPair) + (fst keysPair, fst valuesPair) let runByKeysStandard clContext workGroupSize = runByKeys clContext workGroupSize defaultBitCount diff --git a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs index 92eba752..84d4ef6f 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs @@ -181,21 +181,31 @@ module Expand = fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> // sort by columns - let valuesSortedByColumns = + let keys, valuesSortedByColumns = sortByKeyValues processor DeviceOnly columns values - let rowsSortedByColumns = + keys.Free processor + + let keys, rowsSortedByColumns = sortByKeyIndices processor DeviceOnly columns rows + keys.Free processor + + //TODO: already sorted above? let sortedColumns = sortKeys processor columns // sort by rows - let valuesSortedByRows = + let keys, valuesSortedByRows = sortByKeyValues processor DeviceOnly rowsSortedByColumns valuesSortedByColumns - let columnsSortedByRows = + keys.Free processor + + let keys, columnsSortedByRows = sortByKeyIndices processor DeviceOnly rowsSortedByColumns sortedColumns + keys.Free processor + + //TODO: already sorted above? let sortedRows = sortKeys processor rowsSortedByColumns valuesSortedByColumns.Free processor diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs index 2f565f3e..b98262c1 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs @@ -17,8 +17,13 @@ let processor = Context.defaultContext.Queue let context = Context.defaultContext.ClContext -let checkResultByKeys (inputArray: (int * 'a) []) (actualValues: 'a []) = - let expectedValues = Seq.sortBy fst inputArray |> Seq.map snd +let checkResultByKeys (inputArray: (int * 'a) []) (actualKeys: int []) (actualValues: 'a []) = + let expected = Seq.sortBy fst inputArray + let expectedKeys = expected |> Seq.map fst + let expectedValues = expected |> Seq.map snd + + "Keys must be the same" + |> Expect.sequenceEqual expectedKeys actualKeys "Values must be the same" |> Expect.sequenceEqual expectedValues actualValues @@ -32,12 +37,13 @@ let makeTestByKeys<'a when 'a: equality> sortFun (array: (int * 'a) []) = let clKeys = keys.ToDevice context let clValues = values.ToDevice context - let clActualValues: ClArray<'a> = + let clActualKeys, clActualValues: ClArray * ClArray<'a> = sortFun processor HostInterop clKeys clValues + let actualKeys = clActualKeys.ToHostAndFree processor let actualValues = clActualValues.ToHostAndFree processor - checkResultByKeys array actualValues + checkResultByKeys array actualKeys actualValues let createTestByKeys<'a when 'a: equality and 'a: struct> = let sort = From 0d09177c7f9c8250682345ea1fafeda4a9b8e272 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 20 May 2023 19:21:54 +0300 Subject: [PATCH 006/102] SpMSpV bool only --- .../GraphBLAS-sharp.Backend.fsproj | 1 + src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs | 267 ++++++++++++++++++ .../Backend/Vector/SpMSpV.fs | 139 +++++++++ .../GraphBLAS-sharp.Tests.fsproj | 1 + tests/GraphBLAS-sharp.Tests/Program.fs | 1 + 5 files changed, 409 insertions(+) create mode 100644 src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index cc47ee3d..b88bc4e2 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -47,6 +47,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs new file mode 100644 index 00000000..76bef6be --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs @@ -0,0 +1,267 @@ +namespace GraphBLAS.FSharp.Backend.Vector + +open Brahma.FSharp +open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Backend.Vector.Sparse +open Microsoft.FSharp.Quotations +open GraphBLAS.FSharp.Backend.Objects +open GraphBLAS.FSharp.Backend.Objects.ClVector +open GraphBLAS.FSharp.Backend.Objects.ClContext +open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions +open GraphBLAS.FSharp.Backend.Objects.ClCell + +module SpMSpV = + + //For v in vectorIndices collect R[v] and R[v + 1] + let private collectRows (clContext: ClContext) workGroupSize = + + let collectRows = + <@ fun (ndRange: Range1D) inputSize (vectorIndices: ClArray) (rowOffsets: ClArray) (resultArray: ClArray) -> + + let i = ndRange.GlobalID0 + + //resultArray is twice vector size + if i < (inputSize * 2) then + let columnIndex = vectorIndices.[i / 2] + + if i % 2 = 0 then + resultArray.[i] <- rowOffsets.[columnIndex] + else + resultArray.[i] <- rowOffsets.[columnIndex + 1] + elif i = inputSize * 2 then + resultArray.[i] <- 0 @> + + let collectRows = clContext.Compile collectRows + + fun (queue: MailboxProcessor<_>) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> + + let ndRange = + Range1D.CreateValid(size * 2 + 1, workGroupSize) + + // Last element will contain length of array for gather + let resultRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, size * 2 + 1) + + let collectRows = collectRows.GetKernel() + + queue.Post( + Msg.MsgSetArguments(fun () -> collectRows.KernelFunc ndRange size vectorIndices rowOffsets resultRows) + ) + + queue.Post(Msg.CreateRunMsg<_, _>(collectRows)) + + resultRows + + //For above array compute result offsets + let private computeOffsetsInplace (clContext: ClContext) workGroupSize = + + let prepareOffsets = + <@ fun (ndRange: Range1D) inputSize (inputArray: ClArray) -> + + let i = ndRange.GlobalID0 + + if i < inputSize && i % 2 = 0 then + inputArray.[i + 1] <- inputArray.[i + 1] - inputArray.[i] + inputArray.[i] <- 0 @> + + let sum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + let prepareOffsets = clContext.Compile prepareOffsets + + fun (queue: MailboxProcessor<_>) size (input: ClArray) -> + + let ndRange = Range1D.CreateValid(size, workGroupSize) + + let prepareOffsets = prepareOffsets.GetKernel() + + queue.Post(Msg.MsgSetArguments(fun () -> prepareOffsets.KernelFunc ndRange size input)) + + queue.Post(Msg.CreateRunMsg<_, _>(prepareOffsets)) + + let resSize = (sum queue input).ToHostAndFree queue + + resSize + + //Gather rows from the matrix that will be used in multiplication + let private gather (clContext: ClContext) workGroupSize = + + let gather = + <@ fun (ndRange: Range1D) vectorNNZ (rowOffsets: ClArray) (matrixRowPointers: ClArray) (matrixColumns: ClArray) (matrixValues: ClArray<'a>) (vectorIndices: ClArray) (resultRowsArray: ClArray) (resultIndicesArray: ClArray) (resultValuesArray: ClArray<'a>) -> + + //Serial number of row to gather + let row = ndRange.GlobalID0 + + if row < vectorNNZ then + let offsetIndex = row * 2 + 1 + let rowOffset = rowOffsets.[offsetIndex] + + //vectorIndices.[row] --- actual number of row in matrix + let actualRow = vectorIndices.[row] + let matrixIndexOffset = matrixRowPointers.[actualRow] + + if rowOffset <> rowOffsets.[offsetIndex + 1] then + let rowSize = rowOffsets.[offsetIndex + 1] - rowOffset + + for i in 0 .. rowSize - 1 do + resultRowsArray.[i + rowOffset] <- actualRow + resultIndicesArray.[i + rowOffset] <- matrixColumns.[matrixIndexOffset + i] + resultValuesArray.[i + rowOffset] <- matrixValues.[matrixIndexOffset + i] @> + + let collectRows = collectRows clContext workGroupSize + + let computeOffsetsInplace = + computeOffsetsInplace clContext workGroupSize + + let gather = clContext.Compile gather + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + + //Collect R[v] and R[v + 1] for each v in vector + let collectedRows = + collectRows queue vector.NNZ vector.Indices matrix.RowPointers + + //Place R[v + 1] - R[v] in previous array and do prefix sum, computing offsets for gather array + let gatherArraySize = + computeOffsetsInplace queue (vector.NNZ * 2 + 1) collectedRows + + if gatherArraySize = 0 then + let resultRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, 1) + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, 1) + + let resultColumns = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, 1) + + resultRows, resultColumns, resultValues, gatherArraySize + else + let ndRange = + Range1D.CreateValid(vector.NNZ, workGroupSize) + + let gather = gather.GetKernel() + + let resultRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, gatherArraySize) + + let resultIndices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, gatherArraySize) + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, gatherArraySize) + + if gatherArraySize > 0 then + queue.Post( + Msg.MsgSetArguments + (fun () -> + gather.KernelFunc + ndRange + vector.NNZ + collectedRows + matrix.RowPointers + matrix.Columns + matrix.Values + vector.Indices + resultRows + resultIndices + resultValues) + ) + + queue.Post(Msg.CreateRunMsg<_, _>(gather)) + + collectedRows.Free queue + + resultRows, resultIndices, resultValues, gatherArraySize + + + let private multiplyScalar (clContext: ClContext) (mul: Expr<'a option -> 'b option -> 'c option>) workGroupSize = + + let multiply = + <@ fun (ndRange: Range1D) resultLength vectorLength (rowIndices: ClArray) (matrixValues: ClArray<'a>) (vectorIndices: ClArray) (vectorValues: ClArray<'b>) (resultValues: ClArray<'c option>) -> + let i = ndRange.GlobalID0 + + if i < resultLength then + let index = rowIndices.[i] + let matrixValue = matrixValues.[i] + + let vectorValue = + (%Search.Bin.byKey) vectorLength index vectorIndices vectorValues + + let res = (%mul) (Some matrixValue) vectorValue + resultValues.[i] <- res @> + + let multiply = clContext.Compile multiply + + fun (queue: MailboxProcessor<_>) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> + + let resultLength = columnIndices.Length + + let result = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + + let ndRange = + Range1D.CreateValid(resultLength, workGroupSize) + + let multiply = multiply.GetKernel() + + queue.Post( + Msg.MsgSetArguments + (fun () -> + multiply.KernelFunc + ndRange + resultLength + vector.NNZ + columnIndices + matrixValues + vector.Indices + vector.Values + result) + ) + + queue.Post(Msg.CreateRunMsg<_, _>(multiply)) + + result + + let runBoolStandard + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let gather = gather clContext workGroupSize + + let sort = + Sort.Radix.standardRunKeysOnly clContext workGroupSize + + let removeDuplicates = + ClArray.removeDuplications clContext workGroupSize + + let create = ClArray.create clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + + let gatherRows, gatherIndices, gatherValues, gatherLength = gather queue matrix vector + + gatherRows.Free queue + gatherValues.Free queue + + if gatherLength <= 0 then + { Context = clContext + Indices = gatherIndices + Values = clContext.CreateClArray [| false |] + Size = matrix.ColumnCount } + else + let sortedIndices = sort queue gatherIndices + + let resultIndices = removeDuplicates queue sortedIndices + + gatherIndices.Free queue + sortedIndices.Free queue + + { Context = clContext + Indices = resultIndices + Values = create queue DeviceOnly resultIndices.Length true + Size = matrix.ColumnCount } diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs new file mode 100644 index 00000000..bd9fd8b8 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -0,0 +1,139 @@ +module GraphBLAS.FSharp.Tests.Backend.Vector.SpMSpV + +open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions +open Expecto +open Brahma.FSharp +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Tests.TestCases +open Microsoft.FSharp.Collections +open Microsoft.FSharp.Core +open GraphBLAS.FSharp.Backend.Objects +open GraphBLAS.FSharp.Backend.Vector +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Backend.Objects.ClContext + +let config = Utils.defaultConfig + +let wgSize = Utils.defaultWorkGroupSize + +let checkResult + sumOp + mulOp + (zero: 'a) + (baseMtx: 'a [,]) + (baseVtr: 'a []) + (actualIndices: int []) + (actualValues: 'a []) + = + let rows = Array2D.length1 baseMtx + let columns = Array2D.length2 baseMtx + + let expectedV = Array.create columns zero + let mutable expectedIndices = List.Empty + let mutable expectedValues = List.Empty + + for c in 0 .. columns - 1 do + let mutable sum = zero + + for r in 0 .. rows - 1 do + sum <- sumOp sum (mulOp baseMtx.[r, c] baseVtr.[r]) + + expectedV.[c] <- sum + + for i in 0 .. columns - 1 do + if expectedV.[i] <> zero then + expectedIndices <- List.append expectedIndices [ i ] + expectedValues <- List.append expectedValues [ expectedV.[i] ] + + Expect.sequenceEqual + actualIndices + expectedIndices + $"Values should be the same. Actual is {actualIndices}, expected {expectedIndices}." + + Expect.sequenceEqual + actualValues + expectedValues + $"Values should be the same. Actual is {actualValues}, expected {expectedValues}." + +let correctnessGenericTest + (zero: 'a) + some + sumOp + mulOp + (spMV: MailboxProcessor<_> -> ClMatrix.CSR<'a> -> ClVector.Sparse<'a> -> ClVector.Sparse<'a>) + (isEqual: 'a -> 'a -> bool) + q + (testContext: TestContext) + (vector: 'a [], matrix: 'a [,], _: bool []) + = + + if (Array2D.length1 matrix > 0 && vector.Length > 0) then + //Ensure that result is not empty + vector.[0] <- some + matrix.[0, 0] <- some + + let mtx = + Utils.createMatrixFromArray2D CSR matrix (isEqual zero) + + let vtr = + Utils.createVectorFromArray Sparse vector (isEqual zero) + + if mtx.NNZ > 0 && vtr.Size > 0 then + try + let m = mtx.ToDevice testContext.ClContext + + match vtr, m with + | Vector.Sparse vtr, ClMatrix.CSR m -> + let v = vtr.ToDevice testContext.ClContext + + let res = spMV testContext.Queue m v + + (ClMatrix.CSR m).Dispose q + v.Dispose q + let hostResIndices = res.Indices.ToHost q + let hostResValues = res.Values.ToHost q + res.Dispose q + + checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues + | _ -> failwith "Impossible" + with + | ex when ex.Message = "InvalidBufferSize" -> () + | ex -> raise ex + +let createTest spmspv testContext (zero: 'a) some isEqual add mul addQ mulQ = + let context = testContext.ClContext + let q = testContext.Queue + + let getCorrectnessTestName datatype = + $"Correctness on %s{datatype}, %A{testContext.ClContext}" + + let spMSpV = spmspv addQ mulQ context wgSize + + testContext + |> correctnessGenericTest zero some add mul spMSpV isEqual q + |> testPropertyWithConfig config (getCorrectnessTestName $"{typeof<'a>}") + + +let testFixturesSpMSpV (testContext: TestContext) = + [ let context = testContext.ClContext + let q = testContext.Queue + q.Error.Add(fun e -> failwithf "%A" e) + + createTest + SpMSpV.runBoolStandard + testContext + false + true + (=) + (||) + (&&) + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption + //createTest testContext 0 1 (=) (+) (*) ArithmeticOperations.intSum ArithmeticOperations.intMul + //createTest testContext 0.0f 1f (=) (+) (*) ArithmeticOperations.float32Sum ArithmeticOperations.float32Mul + ] + +let tests = + gpuTests "Backend.Vector.SpMSpV tests" testFixturesSpMSpV diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index d03731b5..85a98712 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -65,6 +65,7 @@ + diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 53e031d5..1356cba3 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -75,6 +75,7 @@ let vectorTests = testList "Vector" [ Vector.SpMV.tests + Vector.SpMSpV.tests Vector.ZeroCreate.tests Vector.OfList.tests Vector.Copy.tests From a97631a8be26d547e2ca4dff00fdaad22a23fab1 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 20 May 2023 22:12:21 +0300 Subject: [PATCH 007/102] Choose with keys --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index d048c650..ded4aaf8 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -437,6 +437,91 @@ module ClArray = Some result + let assignWithKeysOption (op: Expr<'a -> 'b option>) (clContext: ClContext) workGroupSize = + + let assign = + <@ fun (ndRange: Range1D) length (keys: ClArray) (values: ClArray<'a>) (positions: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'b>) resultLength -> + + let gid = ndRange.GlobalID0 + + if gid < length then + let position = positions.[gid] + let value = values.[gid] + let key = keys.[gid] + + // seems like scatter (option scatter) ??? + if 0 <= position && position < resultLength then + match (%op) value with + | Some value -> + resultValues.[position] <- value + resultKeys.[position] <- key + + | None -> () @> + + let kernel = clContext.Compile assign + + fun (processor: MailboxProcessor<_>) (keys: ClArray) (values: ClArray<'a>) (positions: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'b>) -> + + if values.Length <> positions.Length then + failwith "lengths must be the same" + + let ndRange = + Range1D.CreateValid(values.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + values.Length + keys + values + positions + resultKeys + resultValues + resultValues.Length) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + let chooseWithKeys<'a, 'b> (predicate: Expr<'a -> 'b option>) (clContext: ClContext) workGroupSize = + let getBitmap = + map<'a, int> (Map.chooseBitmap predicate) clContext workGroupSize + + let prefixSum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + let assignValues = + assignWithKeysOption predicate clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (sourceKeys: ClArray) (sourceValues: ClArray<'a>) -> + + let positions = + getBitmap processor DeviceOnly sourceValues + + let resultLength = + (prefixSum processor positions) + .ToHostAndFree(processor) + + if resultLength = 0 then + positions.Free processor + + None + else + let resultKeys = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + assignValues processor sourceKeys sourceValues positions resultKeys resultValues + + positions.Free processor + + Some(resultKeys, resultValues) + let assignOption2 (op: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = let assign = From a87949e5e446f53f69bae34fcc6ecfb732445945 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 20 May 2023 23:48:15 +0300 Subject: [PATCH 008/102] SegReduce without offsets --- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 134 +++++++++++++++++- src/GraphBLAS-sharp.Backend/Quotes/Search.fs | 26 ++++ .../Backend/Common/Reduce/ReduceByKey.fs | 2 +- 3 files changed, 158 insertions(+), 4 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index fe7feeb2..1adc2541 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -428,7 +428,7 @@ module Reduce = let itemKeyId = lid + 1 let startKeyIndex = - (%Search.Bin.lowerPosition) length itemKeyId localBitmap + (%Search.Bin.lowerPositionLocal) length itemKeyId localBitmap match startKeyIndex with | Some startPosition -> @@ -473,6 +473,130 @@ module Reduce = reducedValues, reducedKeys module Option = + /// + /// Reduces values by key. Each segment is reduced by one work item. + /// + /// ClContext. + /// Work group size. + /// Operation for reducing values. + let segmentSequential<'a> + (reduceOp: Expr<'a option -> 'a option -> 'a option>) + (clContext: ClContext) + workGroupSize + = + + let kernel = + <@ fun (ndRange: Range1D) uniqueKeyCount keysLength (offsets: ClArray) (keys: ClArray) (values: ClArray<'a option>) (reducedValues: ClArray<'a>) (firstReducedKeys: ClArray) (resultPositions: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < uniqueKeyCount then + let startPosition = + (%Search.Bin.lowerPosition) keysLength gid offsets + + match startPosition with + | Some startPosition -> + let firstSourceKey = keys.[startPosition] + + let mutable sum = None + + let mutable currentPosition = startPosition + + while currentPosition < keysLength + && firstSourceKey = keys.[currentPosition] do + let result = (%reduceOp) sum values.[currentPosition] // brahma error + sum <- result + currentPosition <- currentPosition + 1 + + match sum with + | Some value -> + reducedValues.[gid] <- value + resultPositions.[gid] <- 1 + | None -> resultPositions.[gid] <- 0 + + firstReducedKeys.[gid] <- firstSourceKey + | None -> () @> // not possible if done correctly + + let kernel = clContext.Compile kernel + + let getUniqueBitmap = + ClArray.Bitmap.lastOccurrence clContext workGroupSize + + let scatterData = + Scatter.lastOccurrence clContext workGroupSize + + let scatterIndices = + Scatter.lastOccurrence clContext workGroupSize + + let prefixSum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> + + let offsets = + getUniqueBitmap processor DeviceOnly keys + + let uniqueKeysCount = + (prefixSum processor offsets) + .ToHostAndFree processor + + let reducedValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + let reducedKeys = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + let resultPositions = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + let ndRange = + Range1D.CreateValid(uniqueKeysCount, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + uniqueKeysCount + keys.Length + offsets + keys + values + reducedValues + reducedKeys + resultPositions) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + let resultLength = + (prefixSum processor resultPositions) + .ToHostAndFree processor + + if resultLength = 0 then + None + else + // write values + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + scatterData processor resultPositions reducedValues resultValues + + reducedValues.Free processor + + // write keys + let resultKeys = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + scatterIndices processor resultPositions reducedKeys resultKeys + + reducedKeys.Free processor + resultPositions.Free processor + + Some(resultValues, resultKeys) + /// /// Reduces values by key. Each segment is reduced by one work item. /// @@ -480,9 +604,13 @@ module Reduce = /// Work group size. /// Operation for reducing values. /// - /// The length of the result must be calculated in advance. + /// The length of the result and offsets for each segment must be calculated in advance. /// - let segmentSequential<'a> (reduceOp: Expr<'a -> 'a -> 'a option>) (clContext: ClContext) workGroupSize = + let segmentSequentialByOffsets<'a> + (reduceOp: Expr<'a -> 'a -> 'a option>) + (clContext: ClContext) + workGroupSize + = let kernel = <@ fun (ndRange: Range1D) uniqueKeyCount keysLength (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) (reducedValues: ClArray<'a>) (firstReducedKeys: ClArray) (resultPositions: ClArray) -> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs index d2ea346a..c3e2e000 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs @@ -98,6 +98,32 @@ module Search = /// Find lower position of item in array. /// let lowerPosition<'a when 'a: equality and 'a: comparison> = + <@ fun lenght sourceItem (keys: ClArray<'a>) -> + + let mutable leftEdge = 0 + let mutable rightEdge = lenght - 1 + let mutable resultPosition = None + + while leftEdge <= rightEdge do + let currentPosition = (leftEdge + rightEdge) / 2 + let currentKey = keys.[currentPosition] + + if sourceItem = currentKey then + // remember positions and move left + resultPosition <- Some currentPosition + + rightEdge <- currentPosition - 1 + elif sourceItem < currentKey then + rightEdge <- currentPosition - 1 + else + leftEdge <- currentPosition + 1 + + resultPosition @> + + /// + /// Find lower position of item in array. + /// + let lowerPositionLocal<'a when 'a: equality and 'a: comparison> = <@ fun lenght sourceItem (keys: 'a []) -> let mutable leftEdge = 0 diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs index 772eafb5..7e893b58 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs @@ -430,7 +430,7 @@ let testOption<'a> isEqual reduceOp testFun (array: (int * 'a) []) = |> checkResultOption isEqual keys values reduceOp let createTestOption (isEqual: 'a -> 'a -> bool) (reduceOpQ, reduceOp) = - Reduce.ByKey.Option.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize + Reduce.ByKey.Option.segmentSequentialByOffsets reduceOpQ context Utils.defaultWorkGroupSize |> testOption<'a> isEqual reduceOp |> testPropertyWithConfig { config with From 7c22108085c962897cf70a479fe0fcf717d1cf3f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 21 May 2023 18:03:54 +0300 Subject: [PATCH 009/102] SpMSpV general --- src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs | 61 +++++++++++++++++++ .../Backend/Vector/SpMSpV.fs | 38 +++++++++++- 2 files changed, 96 insertions(+), 3 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs index 76bef6be..52a1b700 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs @@ -224,6 +224,67 @@ module SpMSpV = result + let run + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + //TODO: Common.Gather? + let gather = gather clContext workGroupSize + + //TODO: Radix sort + let sort = + Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + + let multiplyScalar = + multiplyScalar clContext mul workGroupSize + + let segReduce = + Reduce.ByKey.Option.segmentSequential add clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + + let gatherRows, gatherIndices, gatherValues, gatherLength = gather queue matrix vector + + if gatherLength <= 0 then + gatherRows.Free queue + gatherValues.Free queue + + { Context = clContext + Indices = gatherIndices + Values = clContext.CreateClArray 0 + Size = matrix.ColumnCount } + else + sort queue gatherIndices gatherRows gatherValues + + let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues + + let multipliedValues = + multiplyScalar queue sortedRows sortedValues vector + + sortedValues.Free queue + sortedRows.Free queue + + match segReduce queue DeviceOnly sortedIndices multipliedValues with + | Some (reducedValues, reducedKeys) -> + multipliedValues.Free queue + sortedIndices.Free queue + + { Context = clContext + Indices = reducedKeys + Values = reducedValues + Size = matrix.ColumnCount } + | None -> + multipliedValues.Free queue + sortedIndices.Free queue + + { Context = clContext + Indices = clContext.CreateClArray 0 + Values = clContext.CreateClArray 0 + Size = matrix.ColumnCount } + let runBoolStandard (add: Expr<'c option -> 'c option -> 'c option>) (mul: Expr<'a option -> 'b option -> 'c option>) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index bd9fd8b8..0a04d081 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -1,5 +1,6 @@ module GraphBLAS.FSharp.Tests.Backend.Vector.SpMSpV +open System open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions open Expecto open Brahma.FSharp @@ -131,9 +132,40 @@ let testFixturesSpMSpV (testContext: TestContext) = (&&) ArithmeticOperations.boolSumOption ArithmeticOperations.boolMulOption - //createTest testContext 0 1 (=) (+) (*) ArithmeticOperations.intSum ArithmeticOperations.intMul - //createTest testContext 0.0f 1f (=) (+) (*) ArithmeticOperations.float32Sum ArithmeticOperations.float32Mul - ] + + createTest + SpMSpV.run + testContext + 0 + 1 + (=) + (+) + (*) + ArithmeticOperations.intSumOption + ArithmeticOperations.intMulOption + + createTest + SpMSpV.run + testContext + 0.0f + 1f + (=) + (+) + (*) + ArithmeticOperations.float32SumOption + ArithmeticOperations.float32MulOption + + if Utils.isFloat64Available context.ClDevice then + createTest + SpMSpV.run + testContext + 0.0 + 1 + (=) + (+) + (*) + ArithmeticOperations.floatSumOption + ArithmeticOperations.floatMulOption ] let tests = gpuTests "Backend.Vector.SpMSpV tests" testFixturesSpMSpV From d3bc08c4b1ad50d9a508c81e30755efc76e673a9 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 21 May 2023 18:59:06 +0300 Subject: [PATCH 010/102] None on empty vectors --- src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs | 67 +++++++------------ .../Backend/Vector/SpMSpV.fs | 19 +++--- 2 files changed, 33 insertions(+), 53 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs index 52a1b700..82116e43 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs @@ -127,16 +127,7 @@ module SpMSpV = computeOffsetsInplace queue (vector.NNZ * 2 + 1) collectedRows if gatherArraySize = 0 then - let resultRows = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, 1) - - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, 1) - - let resultColumns = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, 1) - - resultRows, resultColumns, resultValues, gatherArraySize + None else let ndRange = Range1D.CreateValid(vector.NNZ, workGroupSize) @@ -173,7 +164,7 @@ module SpMSpV = collectedRows.Free queue - resultRows, resultIndices, resultValues, gatherArraySize + Some(resultRows, resultIndices, resultValues) let private multiplyScalar (clContext: ClContext) (mul: Expr<'a option -> 'b option -> 'c option>) workGroupSize = @@ -246,17 +237,9 @@ module SpMSpV = fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - let gatherRows, gatherIndices, gatherValues, gatherLength = gather queue matrix vector - - if gatherLength <= 0 then - gatherRows.Free queue - gatherValues.Free queue - - { Context = clContext - Indices = gatherIndices - Values = clContext.CreateClArray 0 - Size = matrix.ColumnCount } - else + match gather queue matrix vector with + | None -> None + | Some (gatherRows, gatherIndices, gatherValues) -> sort queue gatherIndices gatherRows gatherValues let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues @@ -272,18 +255,17 @@ module SpMSpV = multipliedValues.Free queue sortedIndices.Free queue - { Context = clContext - Indices = reducedKeys - Values = reducedValues - Size = matrix.ColumnCount } + Some( + { Context = clContext + Indices = reducedKeys + Values = reducedValues + Size = matrix.ColumnCount } + ) | None -> multipliedValues.Free queue sortedIndices.Free queue - { Context = clContext - Indices = clContext.CreateClArray 0 - Values = clContext.CreateClArray 0 - Size = matrix.ColumnCount } + None let runBoolStandard (add: Expr<'c option -> 'c option -> 'c option>) @@ -304,17 +286,12 @@ module SpMSpV = fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - let gatherRows, gatherIndices, gatherValues, gatherLength = gather queue matrix vector - - gatherRows.Free queue - gatherValues.Free queue + match gather queue matrix vector with + | None -> None + | Some (gatherRows, gatherIndices, gatherValues) -> + gatherRows.Free queue + gatherValues.Free queue - if gatherLength <= 0 then - { Context = clContext - Indices = gatherIndices - Values = clContext.CreateClArray [| false |] - Size = matrix.ColumnCount } - else let sortedIndices = sort queue gatherIndices let resultIndices = removeDuplicates queue sortedIndices @@ -322,7 +299,9 @@ module SpMSpV = gatherIndices.Free queue sortedIndices.Free queue - { Context = clContext - Indices = resultIndices - Values = create queue DeviceOnly resultIndices.Length true - Size = matrix.ColumnCount } + Some( + { Context = clContext + Indices = resultIndices + Values = create queue DeviceOnly resultIndices.Length true + Size = matrix.ColumnCount } + ) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index 0a04d081..2ab3b1fe 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -63,7 +63,7 @@ let correctnessGenericTest some sumOp mulOp - (spMV: MailboxProcessor<_> -> ClMatrix.CSR<'a> -> ClVector.Sparse<'a> -> ClVector.Sparse<'a>) + (spMV: MailboxProcessor<_> -> ClMatrix.CSR<'a> -> ClVector.Sparse<'a> -> ClVector.Sparse<'a> option) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -89,15 +89,16 @@ let correctnessGenericTest | Vector.Sparse vtr, ClMatrix.CSR m -> let v = vtr.ToDevice testContext.ClContext - let res = spMV testContext.Queue m v + match spMV testContext.Queue m v with + | Some res -> + (ClMatrix.CSR m).Dispose q + v.Dispose q + let hostResIndices = res.Indices.ToHost q + let hostResValues = res.Values.ToHost q + res.Dispose q - (ClMatrix.CSR m).Dispose q - v.Dispose q - let hostResIndices = res.Indices.ToHost q - let hostResValues = res.Values.ToHost q - res.Dispose q - - checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues + checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues + | None -> failwith "Result should not be empty while standard operations are tested" | _ -> failwith "Impossible" with | ex when ex.Message = "InvalidBufferSize" -> () From d6b9fb54b44702a56fb8fc8b6413c1b5c97791ee Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 21 May 2023 20:50:01 +0300 Subject: [PATCH 011/102] BFS Push-pull and push --- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 167 ++++++++++++++++++ src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 41 +++++ .../Vector/Dense/Vector.fs | 39 ++++ .../Vector/Sparse/Map2.fs | 96 ++++++++++ .../Vector/Sparse/Vector.fs | 2 + .../Backend/Algorithms/BFS.fs | 47 ++++- 6 files changed, 387 insertions(+), 5 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 9896a557..ec60ed5f 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -71,3 +71,170 @@ module BFS = levels | _ -> failwith "Not implemented" + + let singleSourceSparse + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let spMSpV = + SpMSpV.run add mul clContext workGroupSize + + let zeroCreate = + ClArray.zeroCreate clContext workGroupSize + + let ofList = Vector.ofList clContext workGroupSize + + let maskComplemented = + Vector.Sparse.Vector.map2SparseDense Mask.complementedOp clContext workGroupSize + + let fillSubVectorTo = + Vector.assignBySparseMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) (source: int) -> + let vertexCount = matrix.RowCount + + let levels = zeroCreate queue HostInterop vertexCount + + let mutable frontier = + ofList queue DeviceOnly Sparse vertexCount [ source, true ] + + let mutable level = 0 + let mutable stop = false + + while not stop do + match frontier with + | ClVector.Sparse front -> + level <- level + 1 + + //Assigning new level values + fillSubVectorTo queue levels front (clContext.CreateClCell level) levels + + //Getting new frontier + match spMSpV queue matrix front with + | None -> + frontier.Dispose queue + stop <- true + | Some newFrontier -> + frontier.Dispose queue + //Filtering visited vertices + match maskComplemented queue DeviceOnly newFrontier levels with + | None -> + stop <- true + newFrontier.Dispose queue + | Some f -> + frontier <- ClVector.Sparse f + newFrontier.Dispose queue + + | _ -> failwith "Not implemented" + + levels + + + let singleSourcePushPull + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let SPARSITY = 0.001f + + let push nnz size = + (float32 nnz) / (float32 size) <= SPARSITY + + let spMVTo = + SpMV.runTo add mul clContext workGroupSize + + let spMSpV = + SpMSpV.runBoolStandard add mul clContext workGroupSize + + let zeroCreate = + ClArray.zeroCreate clContext workGroupSize + + let ofList = Vector.ofList clContext workGroupSize + + let maskComplementedTo = + Vector.map2InPlace Mask.complementedOp clContext workGroupSize + + let maskComplemented = + Vector.Sparse.Vector.map2SparseDense Mask.complementedOp clContext workGroupSize + + let fillSubVectorDenseTo = + Vector.assignByMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + + let fillSubVectorSparseTo = + Vector.assignBySparseMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + + let toSparse = Vector.toSparse clContext workGroupSize + + let toDense = Vector.toDense clContext workGroupSize + + let countNNZ = + ClArray.count Predicates.isSome clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) (source: int) -> + let vertexCount = matrix.RowCount + + let levels = zeroCreate queue HostInterop vertexCount + + let mutable frontier = + ofList queue DeviceOnly Sparse vertexCount [ source, true ] + + let mutable level = 0 + let mutable stop = false + + while not stop do + level <- level + 1 + + match frontier with + | ClVector.Sparse front -> + //Assigning new level values + fillSubVectorSparseTo queue levels front (clContext.CreateClCell level) levels + + //Getting new frontier + match spMSpV queue matrix front with + | None -> + frontier.Dispose queue + stop <- true + | Some newFrontier -> + frontier.Dispose queue + //Filtering visited vertices + match maskComplemented queue DeviceOnly newFrontier levels with + | None -> + stop <- true + newFrontier.Dispose queue + | Some f -> + newFrontier.Dispose queue + + //Push/pull + if (push f.NNZ f.Size) then + frontier <- ClVector.Sparse f + else + frontier <- toDense queue DeviceOnly (ClVector.Sparse f) + f.Dispose queue + | ClVector.Dense front -> + //Assigning new level values + fillSubVectorDenseTo queue levels front (clContext.CreateClCell level) levels + + //Getting new frontier + spMVTo queue matrix front front + + maskComplementedTo queue front levels front + + //Emptiness check + let NNZ = countNNZ queue front + + stop <- NNZ = 0 + + //Push/pull + if not stop then + if (push NNZ front.Length) then + frontier <- ClVector.Sparse(toSparse queue DeviceOnly front) + front.Free queue + else + frontier.Dispose queue + + levels diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index ded4aaf8..87507ab9 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -904,3 +904,44 @@ module ClArray = processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange index array value)) processor.Post(Msg.CreateRunMsg<_, _> kernel) + + let count (predicate: Expr<'a -> bool>) (clContext: ClContext) workGroupSize = + + let sum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + let getBitmap = + <@ fun (ndRange: Range1D) length (vector: ClArray<'a>) (bitmap: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < length then + let isTrue = (%predicate) vector.[gid] + + if isTrue then + bitmap.[gid] <- 1 + else + bitmap.[gid] <- 0 @> + + let kernel = clContext.Compile getBitmap + + fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) -> + + let bitmap = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, array.Length) + + let ndRange = + Range1D.CreateValid(array.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange array.Length array bitmap)) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + let result = + (sum processor bitmap).ToHostAndFree processor + + processor.Post(Msg.CreateFreeMsg bitmap) + + result diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 53f8de3e..8ab6eeb8 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -87,6 +87,45 @@ module Vector = resultVector + let assignBySparseMaskInPlace<'a, 'b when 'a: struct and 'b: struct> + (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) + (clContext: ClContext) + workGroupSize + = + + let fillSubVectorKernel = + <@ fun (ndRange: Range1D) resultLength (leftVector: ClArray<'a option>) (maskVectorIndices: ClArray) (maskVectorValues: ClArray<'b>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> + + let gid = ndRange.GlobalID0 + + if gid < resultLength then + let i = maskVectorIndices.[gid] + resultVector.[i] <- (%maskOp) leftVector.[i] (Some maskVectorValues.[gid]) value.Value @> + + let kernel = clContext.Compile(fillSubVectorKernel) + + fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> + + let ndRange = + Range1D.CreateValid(maskVector.NNZ, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + maskVector.NNZ + leftVector + maskVector.Indices + maskVector.Values + value + resultVector) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = let scatterValues = diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index 1b8ef660..d59959c7 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -103,6 +103,102 @@ module internal Map2 = Indices = resultIndices Size = max leftVector.Size rightVector.Size } + let private preparePositionsSparseDense<'a, 'b, 'c> (clContext: ClContext) workGroupSize opAdd = + + let preparePositions (op: Expr<'a option -> 'b option -> 'c option>) = + <@ fun (ndRange: Range1D) length (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) (resultBitmap: ClArray) (resultValues: ClArray<'c>) (resultIndices: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < length then + + let i = leftIndices.[gid] + + let (leftValue: 'a option) = Some leftValues.[gid] + + let (rightValue: 'b option) = rightValues.[i] + + match (%op) leftValue rightValue with + | Some value -> + resultValues.[gid] <- value + resultIndices.[gid] <- i + + resultBitmap.[gid] <- 1 + | None -> resultBitmap.[gid] <- 0 @> + + let kernel = + clContext.Compile <| preparePositions opAdd + + fun (processor: MailboxProcessor<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> + + let resultBitmap = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) + + let resultIndices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode<'c>(DeviceOnly, vectorLenght) + + let ndRange = + Range1D.CreateValid(vectorLenght, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + vectorLenght + leftValues + leftIndices + rightValues + resultBitmap + resultValues + resultIndices) + ) + + processor.Post(Msg.CreateRunMsg<_, _> kernel) + + resultBitmap, resultValues, resultIndices + + let runSparseDense<'a, 'b, 'c when 'a: struct and 'b: struct and 'c: struct> + op + (clContext: ClContext) + workGroupSize + = + + let prepare = + preparePositionsSparseDense<'a, 'b, 'c> clContext workGroupSize op + + let setPositions = + Common.setPositionsOption clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> + + let bitmap, allValues, allIndices = + prepare processor leftVector.NNZ leftVector.Values leftVector.Indices rightVector + + match setPositions processor allocationMode allValues allIndices bitmap with + | Some (resultValues, resultIndices) -> + + processor.Post(Msg.CreateFreeMsg<_>(allIndices)) + processor.Post(Msg.CreateFreeMsg<_>(allValues)) + processor.Post(Msg.CreateFreeMsg<_>(bitmap)) + + Some( + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = leftVector.Size } + ) + | None -> + processor.Post(Msg.CreateFreeMsg<_>(allIndices)) + processor.Post(Msg.CreateFreeMsg<_>(allValues)) + processor.Post(Msg.CreateFreeMsg<_>(bitmap)) + None + let private preparePositionsAssignByMask<'a, 'b when 'a: struct and 'b: struct> op (clContext: ClContext) diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index 5b3594ae..adbeb3fd 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -25,6 +25,8 @@ module Vector = let map2 = Map2.run + let map2SparseDense = Map2.runSparseDense + let map2AtLeastOne opAdd (clContext: ClContext) workGroupSize allocationMode = Map2.AtLeastOne.run (Convert.atLeastOneToOption opAdd) clContext workGroupSize allocationMode diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index a85d8424..b458ace4 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -28,6 +28,20 @@ let testFixtures (testContext: TestContext) = context workGroupSize + let bfsSparse = + Algorithms.BFS.singleSourceSparse + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption + context + workGroupSize + + let bfsPushPull = + Algorithms.BFS.singleSourcePushPull + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption + context + workGroupSize + testPropertyWithConfig config testName <| fun (matrix: int [,]) -> @@ -46,22 +60,45 @@ let testFixtures (testContext: TestContext) = let matrixHost = Utils.createMatrixFromArray2D CSR matrix ((=) 0) + let matrixHostBool = + Utils.createMatrixFromArray2D CSR (Array2D.map (fun x -> x <> 0) matrix) ((=) false) + let matrix = matrixHost.ToDevice context + let matrixBool = matrixHostBool.ToDevice context - match matrix with - | ClMatrix.CSR mtx -> + match matrix, matrixBool with + | ClMatrix.CSR mtx, ClMatrix.CSR mtxBool -> let res = bfs queue mtx source |> ClVector.Dense + let resSparse = + bfsSparse queue mtxBool source |> ClVector.Dense + + let resPushPull = + bfsPushPull queue mtxBool source |> ClVector.Dense + let resHost = res.ToHost queue + let resHostSparse = resSparse.ToHost queue + let resHostPushPull = resPushPull.ToHost queue (mtx :> IDeviceMemObject).Dispose queue + (mtxBool :> IDeviceMemObject).Dispose queue res.Dispose queue + resSparse.Dispose queue + resPushPull.Dispose queue - match resHost with - | Vector.Dense resHost -> + match resHost, resHostSparse, resHostPushPull with + | Vector.Dense resHost, Vector.Dense resHostSparse, Vector.Dense resHostPushPull -> let actual = resHost |> Utils.unwrapOptionArray 0 - Expect.sequenceEqual actual expected "Sequences must be equal" + let actualSparse = + resHostSparse |> Utils.unwrapOptionArray 0 + + let actualPushPull = + resHostPushPull |> Utils.unwrapOptionArray 0 + + Expect.sequenceEqual actual expected "Dense bfs is not as expected" + Expect.sequenceEqual actualSparse expected "Sparse bfs is not as expected" + Expect.sequenceEqual actualPushPull expected "Push-pull bfs is not as expected" | _ -> failwith "Not implemented" | _ -> failwith "Not implemented" ] From 808ea0115d626c6d2a0028ba67ce444b3b115cb0 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 21 May 2023 21:27:20 +0300 Subject: [PATCH 012/102] Paket lock update --- paket.lock | 265 ++++++++++++++++++++++++++--------------------------- 1 file changed, 132 insertions(+), 133 deletions(-) diff --git a/paket.lock b/paket.lock index 173127c1..b659c996 100644 --- a/paket.lock +++ b/paket.lock @@ -52,7 +52,7 @@ NUGET ExtraConstraints.Fody (1.14) Fody (>= 6.0) - restriction: || (>= net452) (>= netstandard1.4) NETStandard.Library (>= 1.6.1) - restriction: && (< net452) (>= netstandard1.4) - Fody (6.6.4) - restriction: || (>= net452) (>= netstandard1.4) + Fody (6.7) - restriction: || (>= net452) (>= netstandard1.4) FsCheck (2.16.5) - restriction: || (>= net461) (>= netstandard2.0) FSharp.Core (>= 4.2.3) - restriction: || (>= net452) (>= netstandard1.6) FSharp.Core (7.0) @@ -77,33 +77,33 @@ NUGET System.Runtime.Serialization.Xml (>= 4.3) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) MathNet.Numerics.MKL.Win-x64 (2.5) - Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.Build.Framework (16.10) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.5) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Analyzers (>= 3.3.3) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: && (< netcoreapp3.1) (>= netstandard2.0) - System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) + System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 6.0) - restriction: >= netstandard2.0 - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< netcoreapp3.1) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.5) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.5) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.5) - restriction: || (>= net45) (>= netcoreapp2.1) + System.Text.Encoding.CodePages (>= 7.0) - restriction: >= netstandard2.0 + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) + Microsoft.CodeAnalysis.CSharp (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.6) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.410101) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 1.1) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.421201) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 1.1) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 2.1.1) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Runtime (2.3.405304) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (2.4.416101) - restriction: >= netstandard2.0 Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.0.7) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (>= net462) (>= netstandard1.6) + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.3) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) Microsoft.Extensions.DependencyInjection (7.0) - restriction: >= netstandard2.0 @@ -138,17 +138,17 @@ NUGET System.ComponentModel.Primitives (>= 4.1) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (>= 4.1) - restriction: >= uap10.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: >= uap10.0 - Microsoft.NETCore.Platforms (7.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) + Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) Microsoft.SourceLink.Common (1.1.1) - copy_local: true Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.5) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.ObjectModel (17.6) - restriction: >= netcoreapp3.1 NuGet.Frameworks (>= 5.11) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.5) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.5) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.6) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.6) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -160,7 +160,7 @@ NUGET System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 - Mono.Cecil (0.11.4) - restriction: || (>= net461) (>= netstandard2.0) + Mono.Cecil (0.11.5) - restriction: || (>= net461) (>= netstandard2.0) NETStandard.Library (2.0.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard2.0)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< net452) (>= netstandard1.4)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) Microsoft.Win32.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (< netstandard1.4)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) @@ -206,16 +206,16 @@ NUGET System.Threading.Timer (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) System.Xml.ReaderWriter (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (< netstandard1.4)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) System.Xml.XDocument (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81) (< wp8)) (&& (< netstandard1.5) (>= uap10.0) (< uap10.1)) - Newtonsoft.Json (13.0.2) - restriction: || (>= netcoreapp3.1) (>= uap10.0) + Newtonsoft.Json (13.0.3) - restriction: || (>= netcoreapp3.1) (>= uap10.0) Microsoft.CSharp (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) NETStandard.Library (>= 1.6.1) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.ComponentModel.TypeConverter (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.5) - restriction: >= netcoreapp3.1 - Perfolizer (0.2.1) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6) - restriction: >= netcoreapp3.1 + Perfolizer (0.3.4) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.4) - restriction: && (>= netstandard2.0) (< netstandard2.1) QuikGraph (2.5) NETStandard.Library (>= 1.6.1) - restriction: && (< net35) (>= netstandard1.3) (< netstandard2.0) runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) @@ -297,7 +297,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Diagnostics.DiagnosticSource (7.0.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Diagnostics.Tools (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -391,9 +391,9 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Management (7.0) - restriction: >= netstandard2.0 + System.Management (7.0.1) - restriction: >= netstandard2.0 System.CodeDom (>= 7.0) - restriction: >= netstandard2.0 - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (>= netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -486,7 +486,7 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.Metadata (7.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (7.0.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) @@ -503,7 +503,7 @@ NUGET System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - 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)) + 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)) 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)) 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)) 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) @@ -677,7 +677,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) System.Threading.Timer (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -761,59 +761,44 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.11) - restriction: >= net5.0 - FSharp.Compiler.Service (>= 41.0.1) - restriction: >= net5.0 - FSharp.Core (>= 6.0.1) - restriction: >= net5.0 - McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net5.0 - FSharp.Compiler.Service (43.7.200) - restriction: >= net5.0 - FSharp.Core (7.0.200) - restriction: >= netstandard2.0 + FSharp.Analyzers.SDK (0.12) - restriction: >= net5.0 + FSharp.Compiler.Service (>= 43.7.200) - restriction: >= net6.0 + FSharp.Core (>= 7.0.200) - restriction: >= net6.0 + McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 + FSharp.Compiler.Service (43.7.300) - restriction: >= net6.0 + FSharp.Core (7.0.300) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 System.Diagnostics.DiagnosticSource (>= 6.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 6.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.200) - restriction: >= net5.0 - McMaster.NETCore.Plugins (1.4) - restriction: >= net5.0 + FSharp.Core (7.0.300) - restriction: >= net5.0 + McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 - Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) - Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net5.0 - Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net5.0 - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net6.0 + Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net6.0 System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Text.Json (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Buffers (4.5.1) - restriction: >= net5.0 - System.Collections.Immutable (7.0) - restriction: >= net5.0 - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Buffers (4.5.1) - restriction: >= net6.0 + System.Collections.Immutable (7.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.DiagnosticSource (7.0.1) - restriction: >= net5.0 - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (4.5.5) - restriction: >= net5.0 + System.Memory (4.5.5) - restriction: >= net6.0 System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) - System.Reflection.Emit (4.7) - restriction: >= net5.0 - System.Reflection.Metadata (7.0) - restriction: >= net5.0 + System.Reflection.Emit (4.7) - restriction: >= net6.0 + System.Reflection.Metadata (7.0.1) - restriction: >= net6.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (>= net5.0) (&& (>= net6.0) (< net7.0)) - System.Text.Encodings.Web (7.0) - restriction: >= net5.0 - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: >= net6.0 + System.Text.Encodings.Web (7.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (7.0.2) - restriction: >= net5.0 - Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Numerics.Vectors (>= 4.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Json (7.0.2) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) GROUP Build STORAGE: NONE @@ -946,28 +931,35 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.200) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.4) - restriction: >= netstandard2.0 + FSharp.Core (7.0.300) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 - System.Security.Permissions (>= 6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) - Microsoft.Build.Utilities.Core (17.4) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.4) - restriction: >= netstandard2.0 + System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.4) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Permissions (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.4) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (7.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) + Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) @@ -975,25 +967,25 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.768) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.10) - restriction: >= netstandard2.0 - Newtonsoft.Json (13.0.2) - restriction: >= netstandard2.0 - NuGet.Common (6.5) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Configuration (6.5) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.5) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.820) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 + Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 + NuGet.Common (6.6) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Configuration (6.6) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (6.5) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (6.6) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.5) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (6.5) - restriction: >= netstandard2.0 + NuGet.Protocol (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (6.6) - restriction: >= netstandard2.0 Octokit (0.48) System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 @@ -1010,7 +1002,7 @@ NUGET System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netstandard2.1)) (>= netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -1022,7 +1014,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) @@ -1048,7 +1040,7 @@ NUGET System.Security.Permissions (7.0) - restriction: >= netstandard2.0 System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding.CodePages (7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) @@ -1090,8 +1082,8 @@ NUGET Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (3.7.1) - restriction: >= netstandard2.0 - Fable.React (9.2) + Fable.Core (4.0) - restriction: >= netstandard2.0 + Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 @@ -1183,33 +1175,40 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.200) + FSharp.Core (7.0.300) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.4) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 - System.Security.Permissions (>= 6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) - Microsoft.Build.Utilities.Core (17.4) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.4) - restriction: >= netstandard2.0 + System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.4) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Permissions (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 6.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.4) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (7.0) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) + Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1221,25 +1220,25 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.768) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.10) - restriction: >= netstandard2.0 - Newtonsoft.Json (13.0.2) - restriction: >= netstandard2.0 - NuGet.Common (6.5) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Configuration (6.5) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.5) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.820) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 + Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 + NuGet.Common (6.6) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Configuration (6.6) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (6.5) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (6.6) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.5) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.6) - restriction: >= netstandard2.0 System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.5) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.5) - restriction: >= netstandard2.0 - NuGet.Versioning (6.5) - restriction: >= netstandard2.0 + NuGet.Protocol (6.6) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Versioning (6.6) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1388,7 +1387,7 @@ NUGET System.Reflection.Emit (4.7) - restriction: && (< net461) (>= netstandard2.0) System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Reflection.Metadata (7.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Reflection.Metadata (7.0.1) - restriction: || (>= net461) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1405,7 +1404,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (>= net461) (&& (>= net6.0) (< net7.0)) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1482,7 +1481,7 @@ NUGET System.Security.Permissions (7.0) - restriction: >= netstandard2.0 System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.6) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) From 91513e1fbf1f8c130c024ef85e116c6ee6ca9b24 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 21:09:22 +0300 Subject: [PATCH 013/102] Option.map --- src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs | 72 ++++++++++--------- .../Vector/Sparse/Map2.fs | 33 ++++----- .../Backend/Algorithms/SSSP.fs | 6 +- 3 files changed, 53 insertions(+), 58 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs index 82116e43..71bc583e 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs @@ -236,36 +236,40 @@ module SpMSpV = Reduce.ByKey.Option.segmentSequential add clContext workGroupSize fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + let result = + gather queue matrix vector + |> Option.map + (fun (gatherRows, gatherIndices, gatherValues) -> + sort queue gatherIndices gatherRows gatherValues - match gather queue matrix vector with - | None -> None - | Some (gatherRows, gatherIndices, gatherValues) -> - sort queue gatherIndices gatherRows gatherValues + let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues - let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues + let multipliedValues = + multiplyScalar queue sortedRows sortedValues vector - let multipliedValues = - multiplyScalar queue sortedRows sortedValues vector + sortedValues.Free queue + sortedRows.Free queue - sortedValues.Free queue - sortedRows.Free queue + let result = + segReduce queue DeviceOnly sortedIndices multipliedValues + |> Option.map + (fun (reducedValues, reducedKeys) -> - match segReduce queue DeviceOnly sortedIndices multipliedValues with - | Some (reducedValues, reducedKeys) -> - multipliedValues.Free queue - sortedIndices.Free queue + { Context = clContext + Indices = reducedKeys + Values = reducedValues + Size = matrix.ColumnCount }) - Some( - { Context = clContext - Indices = reducedKeys - Values = reducedValues - Size = matrix.ColumnCount } - ) - | None -> - multipliedValues.Free queue - sortedIndices.Free queue + multipliedValues.Free queue + sortedIndices.Free queue + + result) + + //Unwrap 't option option to 't option + match result with + | Some result -> result + | None -> None - None let runBoolStandard (add: Expr<'c option -> 'c option -> 'c option>) @@ -286,22 +290,20 @@ module SpMSpV = fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - match gather queue matrix vector with - | None -> None - | Some (gatherRows, gatherIndices, gatherValues) -> - gatherRows.Free queue - gatherValues.Free queue + gather queue matrix vector + |> Option.map + (fun (gatherRows, gatherIndices, gatherValues) -> + gatherRows.Free queue + gatherValues.Free queue - let sortedIndices = sort queue gatherIndices + let sortedIndices = sort queue gatherIndices - let resultIndices = removeDuplicates queue sortedIndices + let resultIndices = removeDuplicates queue sortedIndices - gatherIndices.Free queue - sortedIndices.Free queue + gatherIndices.Free queue + sortedIndices.Free queue - Some( { Context = clContext Indices = resultIndices Values = create queue DeviceOnly resultIndices.Length true - Size = matrix.ColumnCount } - ) + Size = matrix.ColumnCount }) diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index d59959c7..10022f15 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -6,6 +6,7 @@ open Microsoft.FSharp.Control open GraphBLAS.FSharp.Backend.Objects open GraphBLAS.FSharp.Backend.Objects.ClVector open GraphBLAS.FSharp.Backend.Objects.ClContext +open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend.Quotes module internal Map2 = @@ -180,24 +181,20 @@ module internal Map2 = let bitmap, allValues, allIndices = prepare processor leftVector.NNZ leftVector.Values leftVector.Indices rightVector - match setPositions processor allocationMode allValues allIndices bitmap with - | Some (resultValues, resultIndices) -> - - processor.Post(Msg.CreateFreeMsg<_>(allIndices)) - processor.Post(Msg.CreateFreeMsg<_>(allValues)) - processor.Post(Msg.CreateFreeMsg<_>(bitmap)) - - Some( - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = leftVector.Size } - ) - | None -> - processor.Post(Msg.CreateFreeMsg<_>(allIndices)) - processor.Post(Msg.CreateFreeMsg<_>(allValues)) - processor.Post(Msg.CreateFreeMsg<_>(bitmap)) - None + let result = + setPositions processor allocationMode allValues allIndices bitmap + |> Option.map + (fun (resultValues, resultIndices) -> + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = leftVector.Size }) + + allIndices.Free processor + allValues.Free processor + bitmap.Free processor + + result let private preparePositionsAssignByMask<'a, 'b when 'a: struct and 'b: struct> op diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index 5e75742c..51e7e475 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -39,11 +39,7 @@ let testFixtures (testContext: TestContext) = let expected = SSSP.runUndirected matrix (directedFromArray2D matrix 0) source - |> Array.map - (fun x -> - match x with - | Some x -> Some(int x) - | None -> None) + |> Array.map (Option.map int) let matrixHost = Utils.createMatrixFromArray2D CSR matrix ((=) 0) From 9b6fd09d7d33edd541f5957e0f0ea41c5605dab2 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 21:12:40 +0300 Subject: [PATCH 014/102] Radix version returning values only --- .../Common/Sort/Radix.fs | 12 +++++++++++ .../Matrix/SpGeMM/Expand.fs | 20 ++++++------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 18654beb..7720de4d 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -326,5 +326,17 @@ module Radix = (fst keysPair, fst valuesPair) + let runByKeysStandardValuesOnly clContext workGroupSize = + let runByKeys = + runByKeys clContext workGroupSize defaultBitCount + + fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> + let keys, values = + runByKeys processor allocationMode keys values + + keys.Free processor + + values + let runByKeysStandard clContext workGroupSize = runByKeys clContext workGroupSize defaultBitCount diff --git a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs index 84d4ef6f..15f67dbc 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs @@ -171,40 +171,32 @@ module Expand = let sortByColumnsAndRows (clContext: ClContext) workGroupSize = let sortByKeyIndices = - Radix.runByKeysStandard clContext workGroupSize + Radix.runByKeysStandardValuesOnly clContext workGroupSize let sortByKeyValues = - Radix.runByKeysStandard clContext workGroupSize + Radix.runByKeysStandardValuesOnly clContext workGroupSize let sortKeys = Radix.standardRunKeysOnly clContext workGroupSize fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> // sort by columns - let keys, valuesSortedByColumns = + let valuesSortedByColumns = sortByKeyValues processor DeviceOnly columns values - keys.Free processor - - let keys, rowsSortedByColumns = + let rowsSortedByColumns = sortByKeyIndices processor DeviceOnly columns rows - keys.Free processor - //TODO: already sorted above? let sortedColumns = sortKeys processor columns // sort by rows - let keys, valuesSortedByRows = + let valuesSortedByRows = sortByKeyValues processor DeviceOnly rowsSortedByColumns valuesSortedByColumns - keys.Free processor - - let keys, columnsSortedByRows = + let columnsSortedByRows = sortByKeyIndices processor DeviceOnly rowsSortedByColumns sortedColumns - keys.Free processor - //TODO: already sorted above? let sortedRows = sortKeys processor rowsSortedByColumns From 5a62156d7c4b9c807bfd609a23c4d8fb55e8e9db Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 21:13:38 +0300 Subject: [PATCH 015/102] Remove unused methods --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 85 ------------------- 1 file changed, 85 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 87507ab9..539e16c1 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -437,91 +437,6 @@ module ClArray = Some result - let assignWithKeysOption (op: Expr<'a -> 'b option>) (clContext: ClContext) workGroupSize = - - let assign = - <@ fun (ndRange: Range1D) length (keys: ClArray) (values: ClArray<'a>) (positions: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'b>) resultLength -> - - let gid = ndRange.GlobalID0 - - if gid < length then - let position = positions.[gid] - let value = values.[gid] - let key = keys.[gid] - - // seems like scatter (option scatter) ??? - if 0 <= position && position < resultLength then - match (%op) value with - | Some value -> - resultValues.[position] <- value - resultKeys.[position] <- key - - | None -> () @> - - let kernel = clContext.Compile assign - - fun (processor: MailboxProcessor<_>) (keys: ClArray) (values: ClArray<'a>) (positions: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'b>) -> - - if values.Length <> positions.Length then - failwith "lengths must be the same" - - let ndRange = - Range1D.CreateValid(values.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - values.Length - keys - values - positions - resultKeys - resultValues - resultValues.Length) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - let chooseWithKeys<'a, 'b> (predicate: Expr<'a -> 'b option>) (clContext: ClContext) workGroupSize = - let getBitmap = - map<'a, int> (Map.chooseBitmap predicate) clContext workGroupSize - - let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize - - let assignValues = - assignWithKeysOption predicate clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (sourceKeys: ClArray) (sourceValues: ClArray<'a>) -> - - let positions = - getBitmap processor DeviceOnly sourceValues - - let resultLength = - (prefixSum processor positions) - .ToHostAndFree(processor) - - if resultLength = 0 then - positions.Free processor - - None - else - let resultKeys = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) - - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) - - assignValues processor sourceKeys sourceValues positions resultKeys resultValues - - positions.Free processor - - Some(resultKeys, resultValues) - let assignOption2 (op: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = let assign = From 90fe441b6ad90ea8add92bb51e3540599f72cd79 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 21:15:14 +0300 Subject: [PATCH 016/102] ClArray.count uses map --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 30 +++---------------- src/GraphBLAS-sharp.Backend/Quotes/Map.fs | 5 ++++ 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 539e16c1..e9c6dc09 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -820,43 +820,21 @@ module ClArray = processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange index array value)) processor.Post(Msg.CreateRunMsg<_, _> kernel) - let count (predicate: Expr<'a -> bool>) (clContext: ClContext) workGroupSize = + let count<'a> (predicate: Expr<'a -> bool>) (clContext: ClContext) workGroupSize = let sum = PrefixSum.standardExcludeInPlace clContext workGroupSize let getBitmap = - <@ fun (ndRange: Range1D) length (vector: ClArray<'a>) (bitmap: ClArray) -> - - let gid = ndRange.GlobalID0 - - if gid < length then - let isTrue = (%predicate) vector.[gid] - - if isTrue then - bitmap.[gid] <- 1 - else - bitmap.[gid] <- 0 @> - - let kernel = clContext.Compile getBitmap + map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) -> - let bitmap = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, array.Length) - - let ndRange = - Range1D.CreateValid(array.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange array.Length array bitmap)) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + let bitmap = getBitmap processor DeviceOnly array let result = (sum processor bitmap).ToHostAndFree processor - processor.Post(Msg.CreateFreeMsg bitmap) + bitmap.Free processor result diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Map.fs b/src/GraphBLAS-sharp.Backend/Quotes/Map.fs index 2f74a7c5..9a518e40 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Map.fs @@ -28,6 +28,11 @@ module Map = | Some _ -> 1 | None -> 0 @> + let predicateBitmap<'a> (predicate: Expr<'a -> bool>) = + <@ fun (x: 'a) -> + let res = (%predicate) x + if res then 1 else 0 @> + let inc = <@ fun item -> item + 1 @> let subtraction = <@ fun first second -> first - second @> From 1f54823e1fe25a001a5346dac28661d99d361c0f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 21:16:48 +0300 Subject: [PATCH 017/102] Free --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 4 ++-- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index e9c6dc09..27c5ed22 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -61,7 +61,7 @@ module ClArray = processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange outputArray length value)) processor.Post(Msg.CreateRunMsg<_, _> kernel) - processor.Post(Msg.CreateFreeMsg(value)) + value.Free processor outputArray @@ -335,7 +335,7 @@ module ClArray = scatter processor bitmap inputArray outputArray - processor.Post <| Msg.CreateFreeMsg<_>(bitmap) + bitmap.Free processor outputArray diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 1adc2541..a6ff8ec4 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -571,11 +571,16 @@ module Reduce = processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + offsets.Free processor + let resultLength = (prefixSum processor resultPositions) .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + reducedKeys.Free processor + resultPositions.Free processor None else // write values @@ -696,6 +701,9 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + reducedKeys.Free processor + resultPositions.Free processor None else // write values @@ -976,6 +984,10 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + firstReducedKeys.Free processor + secondReducedKeys.Free processor + resultPositions.Free processor None else // write value From c2db0de25362ea157b61d2714a4e71080116016e Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 21:26:21 +0300 Subject: [PATCH 018/102] Upper case in error messages --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 27c5ed22..6c610c85 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -390,7 +390,7 @@ module ClArray = fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (positions: ClArray) (result: ClArray<'b>) -> if values.Length <> positions.Length then - failwith "lengths must be the same" + failwith "Lengths must be the same" let ndRange = Range1D.CreateValid(values.Length, workGroupSize) @@ -462,7 +462,7 @@ module ClArray = if firstValues.Length <> secondValues.Length || secondValues.Length <> positions.Length then - failwith "lengths must be the same" + failwith "Lengths must be the same" let ndRange = Range1D.CreateValid(firstValues.Length, workGroupSize) From 8358a15a050f825ab58eb5ca96b514301fac42fe Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 22 May 2023 23:23:00 +0300 Subject: [PATCH 019/102] Fix comments in Arithmetic --- src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 1f2a9856..3c091c21 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -1,4 +1,4 @@ -namespace GraphBLAS.FSharp.Backend.Quotes +namespace GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Backend.Objects @@ -229,7 +229,7 @@ module ArithmeticOperations = let float32Mul = createPair 0.0f (*) <@ (*) @> - // other + // other operations let less<'a when 'a: comparison> = <@ fun (x: 'a option) (y: 'a option) -> match x, y with @@ -237,7 +237,6 @@ module ArithmeticOperations = | Some x, None -> Some 1 | _ -> None @> - //TODO: noneValue let min<'a when 'a: comparison> = <@ fun (x: 'a option) (y: 'a option) -> match x, y with From 53fba878d86ab84b50ede23f7f55eae41dcebbcf Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 23 May 2023 15:27:41 +0300 Subject: [PATCH 020/102] Dataset folder set to default --- benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs | 2 +- benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs | 2 +- benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 7115a90c..dbf93384 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -46,7 +46,7 @@ type Benchmarks<'elem when 'elem : struct>( static member AvailableContexts = Utils.availableContexts static member InputMatrixProviderBuilder pathToConfig = - let datasetFolder = "BFS" + let datasetFolder = "" pathToConfig |> Utils.getMatricesFilenames |> Seq.map diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index 2e2582f1..12860aa0 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -47,7 +47,7 @@ type Benchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem : st static member AvailableContexts = Utils.availableContexts static member InputMatricesProviderBuilder pathToConfig = - let datasetFolder = "EWiseAdd" + let datasetFolder = "" pathToConfig |> Utils.getMatricesFilenames |> Seq.map diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index 2a164021..304bb0ca 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -53,7 +53,7 @@ type Masked<'elem when 'elem : struct>( static member AvaliableContexts = Utils.availableContexts static member InputMatrixProviderBuilder pathToConfig = - let datasetFolder = "Mxm" + let datasetFolder = "" pathToConfig |> Utils.getMatricesFilenames |> Seq.map From 90a1efe26ddd721d2757477efc54b1a9b7d5bf0f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 23 May 2023 15:42:27 +0300 Subject: [PATCH 021/102] Paket lock fix --- paket.lock | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/paket.lock b/paket.lock index 8be9bbd4..dadffb7c 100644 --- a/paket.lock +++ b/paket.lock @@ -778,31 +778,42 @@ NUGET McMaster.NETCore.Plugins (1.4) - restriction: >= net5.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 - Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net6.0 - Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net6.0 + Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) + Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net5.0 + Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net5.0 + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Text.Json (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Buffers (4.5.1) - restriction: >= net6.0 - System.Collections.Immutable (7.0) - restriction: >= net6.0 + System.Buffers (4.5.1) - restriction: >= net5.0 + System.Collections.Immutable (7.0) - restriction: >= net5.0 + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net5.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (4.5.5) - restriction: >= net6.0 + System.Memory (4.5.5) - restriction: >= net5.0 System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Reflection.Emit (4.7) - restriction: >= net6.0 - System.Reflection.Metadata (7.0.1) - restriction: >= net6. System.Numerics.Vectors (4.5) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) System.Reflection.Emit (4.7) - restriction: >= net5.0 System.Reflection.Metadata (7.0.1) - restriction: >= net5.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: >= net6.0 - System.Text.Encodings.Web (7.0) - restriction: >= net6.0 + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (>= net5.0) (&& (>= net6.0) (< net7.0)) + System.Text.Encodings.Web (7.0) - restriction: >= net5.0 + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (7.0.2) - restriction: >= net6.0 + System.Text.Json (7.0.2) - restriction: >= net5.0 + Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Numerics.Vectors (>= 4.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) GROUP Build STORAGE: NONE From 3ceb39796a76b32938465b373c6701a8efb86341 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Sep 2023 21:33:19 +0300 Subject: [PATCH 022/102] Move Map and Bitmap methods to separate modules to ease dependencies --- src/GraphBLAS-sharp.Backend/Common/Bitmap.fs | 80 ++++++++ src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 184 +----------------- src/GraphBLAS-sharp.Backend/Common/Map.fs | 108 ++++++++++ src/GraphBLAS-sharp.Backend/Common/Sum.fs | 2 +- .../GraphBLAS-sharp.Backend.fsproj | 6 +- .../Matrix/CSR/Matrix.fs | 2 +- .../Matrix/SpGeMM/Expand.fs | 4 +- .../Vector/Dense/Vector.fs | 9 +- .../Vector/Sparse/Common.fs | 2 +- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 2 +- .../Backend/Common/ClArray/Map.fs | 2 +- .../Backend/Common/ClArray/Map2.fs | 2 +- 12 files changed, 208 insertions(+), 195 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Common/Bitmap.fs create mode 100644 src/GraphBLAS-sharp.Backend/Common/Map.fs diff --git a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs new file mode 100644 index 00000000..b48152f2 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs @@ -0,0 +1,80 @@ +namespace GraphBLAS.FSharp.Backend.Common + +open Brahma.FSharp +open GraphBLAS.FSharp.Backend.Objects.ClContext +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions + +module Bitmap = + let private getUniqueBitmapGeneral predicate (clContext: ClContext) workGroupSize = + + let getUniqueBitmap = + <@ fun (ndRange: Range1D) (inputArray: ClArray<'a>) inputLength (isUniqueBitmap: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < inputLength then + let isUnique = (%predicate) gid inputLength inputArray // brahma error + + if isUnique then + isUniqueBitmap.[gid] <- 1 + else + isUniqueBitmap.[gid] <- 0 @> + + let kernel = clContext.Compile(getUniqueBitmap) + + fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> + + let inputLength = inputArray.Length + + let ndRange = + Range1D.CreateValid(inputLength, workGroupSize) + + let bitmap = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputLength) + + let kernel = kernel.GetKernel() + + processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray inputLength bitmap)) + + processor.Post(Msg.CreateRunMsg<_, _> kernel) + + bitmap + + let firstOccurrence clContext = + getUniqueBitmapGeneral + <| Predicates.firstOccurrence () + <| clContext + + let lastOccurrence clContext = + getUniqueBitmapGeneral + <| Predicates.lastOccurrence () + <| clContext + + let private getUniqueBitmap2General<'a when 'a: equality> getUniqueBitmap (clContext: ClContext) workGroupSize = + + let map = + Map.map2 <@ fun x y -> x ||| y @> clContext workGroupSize + + let firstGetBitmap = getUniqueBitmap clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> + let firstBitmap = + firstGetBitmap processor DeviceOnly firstArray + + let secondBitmap = + firstGetBitmap processor DeviceOnly secondArray + + let result = + map processor allocationMode firstBitmap secondBitmap + + firstBitmap.Free processor + secondBitmap.Free processor + + result + + let firstOccurrence2 clContext = + getUniqueBitmap2General firstOccurrence clContext + + let lastOccurrence2 clContext = + getUniqueBitmap2General lastOccurrence clContext diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 6c610c85..38b4dcee 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -1,13 +1,11 @@ namespace GraphBLAS.FSharp.Backend.Common -open System.Collections.Generic open Brahma.FSharp open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Backend.Objects.ClContext open GraphBLAS.FSharp.Backend.Objects.ClCell open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions -open GraphBLAS.FSharp.Backend.Quotes module ClArray = let init (initializer: Expr 'a>) (clContext: ClContext) workGroupSize = @@ -132,180 +130,6 @@ module ClArray = outputArray - let map<'a, 'b> (op: Expr<'a -> 'b>) (clContext: ClContext) workGroupSize = - - let map = - <@ fun (ndRange: Range1D) lenght (inputArray: ClArray<'a>) (result: ClArray<'b>) -> - - let gid = ndRange.GlobalID0 - - if gid < lenght then - result.[gid] <- (%op) inputArray.[gid] @> - - let kernel = clContext.Compile map - - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> - - let result = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) - - let ndRange = - Range1D.CreateValid(inputArray.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length inputArray result)) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - result - - let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = - - let map = - <@ fun (ndRange: Range1D) lenght (value: ClCell<'a>) (inputArray: ClArray<'b>) (result: ClArray<'c>) -> - - let gid = ndRange.GlobalID0 - - if gid < lenght then - result.[gid] <- (%op) value.Value inputArray.[gid] @> - - let kernel = clContext.Compile map - - fun (processor: MailboxProcessor<_>) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> - - let result = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) - - let valueClCell = value |> clContext.CreateClCell - - let ndRange = - Range1D.CreateValid(inputArray.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length valueClCell inputArray result) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - result - - let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = - - let kernel = - <@ fun (ndRange: Range1D) length (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> - - let gid = ndRange.GlobalID0 - - if gid < length then - - resultArray.[gid] <- (%map) leftArray.[gid] rightArray.[gid] @> - - let kernel = clContext.Compile kernel - - fun (processor: MailboxProcessor<_>) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> - - let ndRange = - Range1D.CreateValid(resultArray.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange resultArray.Length leftArray rightArray resultArray) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - let map2<'a, 'b, 'c> map (clContext: ClContext) workGroupSize = - let map2 = - map2InPlace<'a, 'b, 'c> map clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> - - let resultArray = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftArray.Length) - - map2 processor leftArray rightArray resultArray - - resultArray - - module Bitmap = - let private getUniqueBitmapGeneral predicate (clContext: ClContext) workGroupSize = - - let getUniqueBitmap = - <@ fun (ndRange: Range1D) (inputArray: ClArray<'a>) inputLength (isUniqueBitmap: ClArray) -> - - let gid = ndRange.GlobalID0 - - if gid < inputLength then - let isUnique = (%predicate) gid inputLength inputArray // brahma error - - if isUnique then - isUniqueBitmap.[gid] <- 1 - else - isUniqueBitmap.[gid] <- 0 @> - - let kernel = clContext.Compile(getUniqueBitmap) - - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> - - let inputLength = inputArray.Length - - let ndRange = - Range1D.CreateValid(inputLength, workGroupSize) - - let bitmap = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputLength) - - let kernel = kernel.GetKernel() - - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray inputLength bitmap)) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - bitmap - - let firstOccurrence clContext = - getUniqueBitmapGeneral - <| Predicates.firstOccurrence () - <| clContext - - let lastOccurrence clContext = - getUniqueBitmapGeneral - <| Predicates.lastOccurrence () - <| clContext - - let private getUniqueBitmap2General<'a when 'a: equality> getUniqueBitmap (clContext: ClContext) workGroupSize = - - let map = - map2 <@ fun x y -> x ||| y @> clContext workGroupSize - - let firstGetBitmap = getUniqueBitmap clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> - let firstBitmap = - firstGetBitmap processor DeviceOnly firstArray - - let secondBitmap = - firstGetBitmap processor DeviceOnly secondArray - - let result = - map processor allocationMode firstBitmap secondBitmap - - firstBitmap.Free processor - secondBitmap.Free processor - - result - - let firstOccurrence2 clContext = - getUniqueBitmap2General firstOccurrence clContext - - let lastOccurrence2 clContext = - getUniqueBitmap2General lastOccurrence clContext - ///Remove duplicates form the given array. ///Computational context ///Should be a power of 2 and greater than 1. @@ -406,7 +230,7 @@ module ClArray = let choose<'a, 'b> (predicate: Expr<'a -> 'b option>) (clContext: ClContext) workGroupSize = let getBitmap = - map<'a, int> (Map.chooseBitmap predicate) clContext workGroupSize + Map.map<'a, int> (Map.chooseBitmap predicate) clContext workGroupSize let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -486,7 +310,7 @@ module ClArray = let choose2 (predicate: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = let getBitmap = - map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize + Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -702,7 +526,7 @@ module ClArray = Gather.runInit Map.inc clContext workGroupSize let map = - map2 <@ fun first second -> (first, second) @> clContext workGroupSize + Map.map2 <@ fun first second -> (first, second) @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (values: ClArray<'a>) -> if values.Length > 1 then @@ -826,7 +650,7 @@ module ClArray = PrefixSum.standardExcludeInPlace clContext workGroupSize let getBitmap = - map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize + Map.map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) -> diff --git a/src/GraphBLAS-sharp.Backend/Common/Map.fs b/src/GraphBLAS-sharp.Backend/Common/Map.fs new file mode 100644 index 00000000..0de13f8c --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Common/Map.fs @@ -0,0 +1,108 @@ +namespace GraphBLAS.FSharp.Backend.Common + +open Brahma.FSharp +open Microsoft.FSharp.Quotations +open GraphBLAS.FSharp.Backend.Objects.ClContext +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions + +module Map = + let map<'a, 'b> (op: Expr<'a -> 'b>) (clContext: ClContext) workGroupSize = + + let map = + <@ fun (ndRange: Range1D) lenght (inputArray: ClArray<'a>) (result: ClArray<'b>) -> + + let gid = ndRange.GlobalID0 + + if gid < lenght then + result.[gid] <- (%op) inputArray.[gid] @> + + let kernel = clContext.Compile map + + fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> + + let result = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) + + let ndRange = + Range1D.CreateValid(inputArray.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length inputArray result)) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + result + + let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = + + let map = + <@ fun (ndRange: Range1D) lenght (value: ClCell<'a>) (inputArray: ClArray<'b>) (result: ClArray<'c>) -> + + let gid = ndRange.GlobalID0 + + if gid < lenght then + result.[gid] <- (%op) value.Value inputArray.[gid] @> + + let kernel = clContext.Compile map + + fun (processor: MailboxProcessor<_>) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> + + let result = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) + + let valueClCell = value |> clContext.CreateClCell + + let ndRange = + Range1D.CreateValid(inputArray.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length valueClCell inputArray result) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + result + + let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = + + let kernel = + <@ fun (ndRange: Range1D) length (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> + + let gid = ndRange.GlobalID0 + + if gid < length then + + resultArray.[gid] <- (%map) leftArray.[gid] rightArray.[gid] @> + + let kernel = clContext.Compile kernel + + fun (processor: MailboxProcessor<_>) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> + + let ndRange = + Range1D.CreateValid(resultArray.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> kernel.KernelFunc ndRange resultArray.Length leftArray rightArray resultArray) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + let map2<'a, 'b, 'c> map (clContext: ClContext) workGroupSize = + let map2 = + map2InPlace<'a, 'b, 'c> map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> + + let resultArray = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftArray.Length) + + map2 processor leftArray rightArray resultArray + + resultArray diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index fbaafafd..e16c0776 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -520,7 +520,7 @@ module Reduce = let kernel = clContext.Compile kernel let getUniqueBitmap = - ClArray.Bitmap.lastOccurrence clContext workGroupSize + Bitmap.lastOccurrence clContext workGroupSize let scatterData = Scatter.lastOccurrence clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index b88bc4e2..18f98d66 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -33,11 +33,13 @@ + + + + - - diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 22171912..2784b84e 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -319,7 +319,7 @@ module Matrix = let pairwise = ClArray.pairwise clContext workGroupSize let subtract = - ClArray.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize + Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> let pointerPairs = diff --git a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs index 77caebb0..8c34c3d4 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/SpGeMM/Expand.fs @@ -37,7 +37,7 @@ module Expand = let multiply (predicate: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = let getBitmap = - ClArray.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize + Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -212,7 +212,7 @@ module Expand = Reduce.ByKey2D.Option.segmentSequential opAdd clContext workGroupSize let getUniqueBitmap = - ClArray.Bitmap.lastOccurrence2 clContext workGroupSize + Bitmap.lastOccurrence2 clContext workGroupSize let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 8ab6eeb8..596796f8 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -16,7 +16,7 @@ module Vector = = let map2InPlace = - ClArray.map2InPlace opAdd clContext workGroupSize + Map.map2InPlace opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> @@ -29,8 +29,7 @@ module Vector = workGroupSize = - let map2 = - ClArray.map2 opAdd clContext workGroupSize + let map2 = Map.map2 opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> @@ -135,7 +134,7 @@ module Vector = Scatter.lastOccurrence clContext workGroupSize let getBitmap = - ClArray.map (Map.option 1 0) clContext workGroupSize + Map.map (Map.option 1 0) clContext workGroupSize let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -144,7 +143,7 @@ module Vector = ClArray.init Map.id clContext workGroupSize let allValues = - ClArray.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize + Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (vector: ClArray<'a option>) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs index cb6a8971..79f34b68 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs @@ -74,7 +74,7 @@ module internal Common = let concatIndices = ClArray.concat clContext workGroupSize let mapIndices = - ClArray.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> + Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> fun (processor: MailboxProcessor<_>) allocationMode (vectors: Sparse<'a> seq) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index 9c94992b..71220592 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -39,7 +39,7 @@ module Vector = ClArray.zeroCreate clContext workGroupSize let map = - ClArray.map <@ Some @> clContext workGroupSize + Map.map <@ Some @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode format size (elements: (int * 'a) list) -> match format with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs index a49ea492..6657668d 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs @@ -44,7 +44,7 @@ let createTest<'a when 'a: equality> (testContext: TestContext) (zero: 'a) isEqu let context = testContext.ClContext let map = - ClArray.map (Map.optionToValueOrZero zero) context wgSize + Map.map (Map.optionToValueOrZero zero) context wgSize makeTest testContext map zero isEqual |> testPropertyWithConfig config $"Correctness on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs index ae4342b8..01de649c 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs @@ -42,7 +42,7 @@ let createTest<'a when 'a: equality> (testContext: TestContext) isEqual hostMapF let context = testContext.ClContext - let map = ClArray.map2 mapFunQ context wgSize + let map = Map.map2 mapFunQ context wgSize makeTest<'a> testContext map hostMapFun isEqual |> testPropertyWithConfig config $"Correctness on {typeof<'a>}" From 3616f947f84715a479b609fee16d92ce7a2173f2 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Sep 2023 21:37:22 +0300 Subject: [PATCH 023/102] SSSP optimization, using front as mask --- .../Algorithms/SSSP.fs | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 9438da30..70754187 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -24,18 +24,16 @@ module SSSP = let create = ClArray.create clContext workGroupSize - let createMask = ClArray.create clContext workGroupSize - let ofList = Vector.ofList clContext workGroupSize let eWiseMulLess = - ClArray.map2InPlace less clContext workGroupSize + Map.map2InPlace less clContext workGroupSize let eWiseAddMin = - ClArray.map2InPlace min clContext workGroupSize + Map.map2InPlace min clContext workGroupSize - let fillSubVectorTo = - Vector.assignByMaskInPlace (Convert.assignToOption Mask.assignComplemented) clContext workGroupSize + let filter = + Map.map2InPlace Mask.op clContext workGroupSize let containsNonZero = ClArray.exists Predicates.isSome clContext workGroupSize @@ -54,25 +52,22 @@ module SSSP = create queue DeviceOnly vertexCount None |> ClVector.Dense - let m = - createMask queue DeviceOnly vertexCount None - |> ClVector.Dense - let mutable stop = false while not stop do - match f1, f2, distance, m with - | ClVector.Dense front1, ClVector.Dense front2, ClVector.Dense dist, ClVector.Dense mask -> + match f1, f2, distance with + | ClVector.Dense front1, ClVector.Dense front2, ClVector.Dense dist -> //Getting new frontier spMVTo queue matrix front1 front2 //Checking which distances were updated - eWiseMulLess queue front2 dist mask + eWiseMulLess queue front2 dist front1 //Updating eWiseAddMin queue dist front2 dist //Filtering unproductive vertices - fillSubVectorTo queue front2 mask (clContext.CreateClCell 0) front2 + //Front1 is a mask + filter queue front2 front1 front2 //Swap fronts let temp = f1 @@ -82,13 +77,13 @@ module SSSP = //Checking if no distances were updated stop <- not - <| (containsNonZero queue mask).ToHostAndFree(queue) + <| (containsNonZero queue front1) + .ToHostAndFree(queue) | _ -> failwith "not implemented" f1.Dispose queue f2.Dispose queue - m.Dispose queue match distance with | ClVector.Dense dist -> dist From 77d6fe55935909a90f26cf241bd5a6c9b9d0ea49 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Sep 2023 21:39:53 +0300 Subject: [PATCH 024/102] Reduce instead of prefixSum --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 38b4dcee..fea46bb9 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -647,7 +647,7 @@ module ClArray = let count<'a> (predicate: Expr<'a -> bool>) (clContext: ClContext) workGroupSize = let sum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + Reduce.reduce <@ (+) @> clContext workGroupSize let getBitmap = Map.map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize From a6a068dfc623f1ffa9c2d6ddaba87ab98b55cdf7 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Sep 2023 21:43:00 +0300 Subject: [PATCH 025/102] Release collectedRows, Option.bind --- src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs | 48 +++++++++----------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs index 71bc583e..4c579ad3 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs @@ -127,6 +127,7 @@ module SpMSpV = computeOffsetsInplace queue (vector.NNZ * 2 + 1) collectedRows if gatherArraySize = 0 then + collectedRows.Free queue None else let ndRange = @@ -236,39 +237,34 @@ module SpMSpV = Reduce.ByKey.Option.segmentSequential add clContext workGroupSize fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - let result = - gather queue matrix vector - |> Option.map - (fun (gatherRows, gatherIndices, gatherValues) -> - sort queue gatherIndices gatherRows gatherValues - - let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues + gather queue matrix vector + |> Option.map + (fun (gatherRows, gatherIndices, gatherValues) -> + sort queue gatherIndices gatherRows gatherValues - let multipliedValues = - multiplyScalar queue sortedRows sortedValues vector + let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues - sortedValues.Free queue - sortedRows.Free queue + let multipliedValues = + multiplyScalar queue sortedRows sortedValues vector - let result = - segReduce queue DeviceOnly sortedIndices multipliedValues - |> Option.map - (fun (reducedValues, reducedKeys) -> + sortedValues.Free queue + sortedRows.Free queue - { Context = clContext - Indices = reducedKeys - Values = reducedValues - Size = matrix.ColumnCount }) + let result = + segReduce queue DeviceOnly sortedIndices multipliedValues + |> Option.map + (fun (reducedValues, reducedKeys) -> - multipliedValues.Free queue - sortedIndices.Free queue + { Context = clContext + Indices = reducedKeys + Values = reducedValues + Size = matrix.ColumnCount }) - result) + multipliedValues.Free queue + sortedIndices.Free queue - //Unwrap 't option option to 't option - match result with - | Some result -> result - | None -> None + result) + |> Option.bind id let runBoolStandard From 2f38f74fe62a254bc508db5e1d57b8ea3a8ec884 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Sep 2023 21:44:20 +0300 Subject: [PATCH 026/102] Non-blocking dispose --- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 1 - src/GraphBLAS-sharp.Backend/Objects/Vector.fs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 650c40b3..530ad00f 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -22,7 +22,6 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Columns)) q.Post(Msg.CreateFreeMsg<_>(this.RowPointers)) - q.PostAndReply(Msg.MsgNotifyMe) member this.Dispose q = (this :> IDeviceMemObject).Dispose q diff --git a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs index f7430242..1f92b2d8 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs @@ -18,7 +18,6 @@ module ClVector = member this.Dispose(q) = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Indices)) - q.PostAndReply(Msg.MsgNotifyMe) member this.Dispose(q) = (this :> IDeviceMemObject).Dispose(q) From 1302d8ec9c14c35e8d1190c748d38cc25ccc4bca Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Sep 2023 21:44:34 +0300 Subject: [PATCH 027/102] Paket lock update --- paket.lock | 252 ++++++++++++++++++++++++----------------------------- 1 file changed, 114 insertions(+), 138 deletions(-) diff --git a/paket.lock b/paket.lock index dadffb7c..bc37fc09 100644 --- a/paket.lock +++ b/paket.lock @@ -2,23 +2,23 @@ STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 altcover (7.6.812) - BenchmarkDotNet (0.13.5) - BenchmarkDotNet.Annotations (>= 0.13.5) - restriction: >= netstandard2.0 - CommandLineParser (>= 2.4.3) - restriction: >= netstandard2.0 + BenchmarkDotNet (0.13.8) + BenchmarkDotNet.Annotations (>= 0.13.8) - restriction: >= netstandard2.0 + CommandLineParser (>= 2.9.1) - restriction: >= netstandard2.0 Gee.External.Capstone (>= 2.3) - restriction: >= netstandard2.0 Iced (>= 1.17) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.CSharp (>= 3.0) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.CSharp (>= 4.1) - restriction: >= netstandard2.0 Microsoft.Diagnostics.Runtime (>= 2.2.332302) - restriction: >= netstandard2.0 Microsoft.Diagnostics.Tracing.TraceEvent (>= 3.0.2) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netstandard2.0 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net6.0) (>= netstandard2.0) - Perfolizer (>= 0.2.1) - restriction: >= netstandard2.0 - System.Management (>= 6.0) - restriction: >= netstandard2.0 + Perfolizer (0.2.1) - restriction: >= netstandard2.0 + System.Management (>= 5.0) - restriction: >= netstandard2.0 System.Numerics.Vectors (>= 4.5) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - BenchmarkDotNet.Annotations (0.13.5) - restriction: >= netstandard2.0 + BenchmarkDotNet.Annotations (0.13.8) - restriction: >= netstandard2.0 Brahma.FSharp (2.0.5) Brahma.FSharp.OpenCL.Printer (>= 2.0.5) - restriction: >= net7.0 Brahma.FSharp.OpenCL.Shared (>= 2.0.5) - restriction: >= net7.0 @@ -52,8 +52,8 @@ NUGET ExtraConstraints.Fody (1.14) Fody (>= 6.0) - restriction: || (>= net452) (>= netstandard1.4) NETStandard.Library (>= 1.6.1) - restriction: && (< net452) (>= netstandard1.4) - Fody (6.7) - restriction: || (>= net452) (>= netstandard1.4) - FsCheck (2.16.5) - restriction: || (>= net461) (>= netstandard2.0) + Fody (6.8) - restriction: || (>= net452) (>= netstandard1.4) + FsCheck (2.16.6) - restriction: || (>= net461) (>= netstandard2.0) FSharp.Core (>= 4.2.3) - restriction: || (>= net452) (>= netstandard1.6) FSharp.Core (7.0) FSharp.Quotations.Evaluator (2.1) @@ -63,7 +63,7 @@ NUGET FSharpx.Text.StructuredFormat (3.1) FSharp.Core (>= 4.6.2) - restriction: || (>= net452) (>= netstandard2.0) Gee.External.Capstone (2.3) - restriction: >= netstandard2.0 - Iced (1.18) - restriction: >= netstandard2.0 + Iced (1.20) - restriction: >= netstandard2.0 MathNet.Numerics (5.0) - restriction: || (>= net45) (>= netstandard1.6) System.ValueTuple (>= 4.4) - restriction: && (>= net461) (< net48) MathNet.Numerics.FSharp (4.0) @@ -83,26 +83,27 @@ NUGET System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 7.0) - restriction: >= netstandard2.0 + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.6) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.6) - restriction: || (>= net45) (>= netcoreapp2.1) + Microsoft.CodeAnalysis.CSharp (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.7.2) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.421201) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 1.1) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Extensions.Logging (>= 2.1.1) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Runtime (2.4.416101) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.1.3) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.442301) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) + Microsoft.Extensions.Logging (>= 6.0) - restriction: >= netstandard2.0 + System.Buffers (>= 4.5.1) - restriction: && (< net6.0) (>= netstandard2.0) + Microsoft.Diagnostics.Runtime (3.0.442202) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.5) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) @@ -121,7 +122,7 @@ NUGET Microsoft.Extensions.Options (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Diagnostics.DiagnosticSource (>= 7.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Logging.Abstractions (7.0) - restriction: >= netstandard2.0 + Microsoft.Extensions.Logging.Abstractions (7.0.1) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) Microsoft.Extensions.Options (7.0.1) - restriction: >= netstandard2.0 @@ -138,17 +139,17 @@ NUGET System.ComponentModel.Primitives (>= 4.1) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (>= 4.1) - restriction: >= uap10.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: >= uap10.0 - Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) + Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) Microsoft.SourceLink.Common (1.1.1) - copy_local: true Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.6) - restriction: >= netcoreapp3.1 - NuGet.Frameworks (>= 5.11) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.TestPlatform.ObjectModel (17.7.2) - restriction: >= netcoreapp3.1 + NuGet.Frameworks (>= 6.5) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.6) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.6) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.7.2) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.7.2) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -213,9 +214,9 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.6) - restriction: >= netcoreapp3.1 - Perfolizer (0.3.4) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.4) - restriction: && (>= netstandard2.0) (< netstandard2.1) + NuGet.Frameworks (6.7) - restriction: >= netcoreapp3.1 + Perfolizer (0.2.1) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 QuikGraph (2.5) NETStandard.Library (>= 1.6.1) - restriction: && (< net35) (>= netstandard1.3) (< netstandard2.0) runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) @@ -391,9 +392,9 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Management (7.0.1) - restriction: >= netstandard2.0 + System.Management (7.0.2) - restriction: >= netstandard2.0 System.CodeDom (>= 7.0) - restriction: >= netstandard2.0 - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -486,7 +487,7 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.Metadata (7.0.1) - restriction: >= netstandard2.0 + System.Reflection.Metadata (7.0.2) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) @@ -655,7 +656,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (7.0) - restriction: >= netstandard2.0 + System.Text.Encoding.CodePages (7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) @@ -761,59 +762,44 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.11) - restriction: >= net5.0 - FSharp.Compiler.Service (>= 41.0.1) - restriction: >= net5.0 - FSharp.Core (>= 6.0.1) - restriction: >= net5.0 - McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net5.0 - FSharp.Compiler.Service (43.7.300) - restriction: >= net5.0 - FSharp.Core (7.0.300) - restriction: >= netstandard2.0 + FSharp.Analyzers.SDK (0.13) - restriction: >= net5.0 + FSharp.Compiler.Service (>= 43.7.400) - restriction: >= net6.0 + FSharp.Core (>= 7.0.400) - restriction: >= net6.0 + McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 + FSharp.Compiler.Service (43.7.400) - restriction: >= net6.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Diagnostics.DiagnosticSource (>= 6.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.300) - restriction: >= net5.0 - McMaster.NETCore.Plugins (1.4) - restriction: >= net5.0 + FSharp.Core (7.0.400) - restriction: >= net5.0 + McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 - Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) - Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net5.0 - Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net5.0 - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net6.0 + Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net6.0 System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Text.Json (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Buffers (4.5.1) - restriction: >= net5.0 - System.Collections.Immutable (7.0) - restriction: >= net5.0 - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Buffers (4.5.1) - restriction: >= net6.0 + System.Collections.Immutable (7.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net5.0 - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (4.5.5) - restriction: >= net5.0 + System.Memory (4.5.5) - restriction: >= net6.0 System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) - System.Reflection.Emit (4.7) - restriction: >= net5.0 - System.Reflection.Metadata (7.0.1) - restriction: >= net5.0 + System.Reflection.Emit (4.7) - restriction: >= net6.0 + System.Reflection.Metadata (7.0.2) - restriction: >= net6.0 System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (>= net5.0) (&& (>= net6.0) (< net7.0)) - System.Text.Encodings.Web (7.0) - restriction: >= net5.0 - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: >= net6.0 + System.Text.Encodings.Web (7.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (7.0.2) - restriction: >= net5.0 - Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Numerics.Vectors (>= 4.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Json (7.0.3) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= net5.0)) (&& (>= net5.0) (< net6.0)) GROUP Build STORAGE: NONE @@ -946,17 +932,18 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.300) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -969,12 +956,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) + Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) @@ -982,25 +969,24 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.820) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.6) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.6) - restriction: >= netstandard2.0 - NuGet.Configuration (6.6) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.6) - restriction: >= netstandard2.0 - NuGet.Packaging (6.6) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.6) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.6) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.6) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.6) - restriction: >= netstandard2.0 - NuGet.Versioning (6.6) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 Octokit (0.48) System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 @@ -1013,10 +999,9 @@ NUGET System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 System.Drawing.Common (7.0) - restriction: >= net6.0 Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1026,7 +1011,7 @@ NUGET System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) - System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.Runtime (4.3.1) - restriction: && (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) 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)) 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)) System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) @@ -1034,22 +1019,14 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) - System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.Security.Cryptography.Pkcs (7.0.1) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) System.Security.Permissions (7.0) - restriction: >= netstandard2.0 @@ -1190,22 +1167,23 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.300) + FSharp.Core (7.0.400) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -1218,12 +1196,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - Microsoft.NETCore.Platforms (7.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) + Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1235,25 +1213,24 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.820) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.6) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.6) - restriction: >= netstandard2.0 - NuGet.Configuration (6.6) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.6) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.6) - restriction: >= netstandard2.0 - NuGet.Packaging (6.6) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.6) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.6) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.6) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.6) - restriction: >= netstandard2.0 - NuGet.Versioning (6.6) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1357,7 +1334,7 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Drawing.Common (7.0) - restriction: >= net6.0 Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1402,7 +1379,7 @@ NUGET System.Reflection.Emit (4.7) - restriction: && (< net461) (>= netstandard2.0) System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Reflection.Metadata (7.0.1) - restriction: || (>= net461) (>= netstandard2.0) + System.Reflection.Metadata (7.0.2) - restriction: || (>= net461) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1446,7 +1423,7 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (< net461) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: && (< net461) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1461,10 +1438,9 @@ NUGET System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) System.Text.Encoding (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1478,7 +1454,7 @@ NUGET System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (7.0.1) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) From 60500e914aac22d616093bffc26d20fd04fb2524 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Thu, 5 Oct 2023 20:58:07 +0300 Subject: [PATCH 028/102] Merge finish --- .../Algorithms/BFS.fs | 14 +- .../GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 14 +- .../Algorithms/Algorithms.fs | 7 + src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 186 ++++--- .../Algorithms/SSSP.fs | 85 ++- src/GraphBLAS-sharp.Backend/Common/Bitmap.fs | 25 +- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 227 -------- src/GraphBLAS-sharp.Backend/Common/Common.fs | 35 +- src/GraphBLAS-sharp.Backend/Common/Map.fs | 39 +- .../GraphBLAS-sharp.Backend.fsproj | 6 +- .../Matrix/CSR/Matrix.fs | 2 +- .../Operations/Operations.fs | 83 ++- .../Operations/SpGeMM/Expand.fs | 501 ++++++++++++++++++ .../{Vector => Operations}/SpMSpV.fs | 18 +- .../Quotes/Arithmetic.fs | 5 +- src/GraphBLAS-sharp.Backend/Quotes/Search.fs | 6 +- .../Vector/Dense/Vector.fs | 3 +- .../Vector/Sparse/Common.fs | 3 +- .../Vector/Sparse/Map.fs | 2 +- .../Vector/Sparse/Map2.fs | 39 +- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 142 ++++- .../Backend/Algorithms/BFS.fs | 47 +- .../Backend/Algorithms/SSSP.fs | 24 +- .../Backend/Common/ClArray/Map.fs | 2 +- .../Backend/Common/ClArray/Map2.fs | 2 +- .../Backend/Common/Reduce/ReduceByKey.fs | 2 +- .../Backend/Vector/Map2.fs | 19 +- .../Backend/Vector/SpMSpV.fs | 45 +- .../Backend/Vector/SpMV.fs | 15 +- 29 files changed, 1081 insertions(+), 517 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs rename src/GraphBLAS-sharp.Backend/{Vector => Operations}/SpMSpV.fs (96%) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 7a3c1cf6..5e7050d2 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( let mutable matrix = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> - member val ResultLevels = Unchecked.defaultof> with get,set + member val ResultLevels = Unchecked.defaultof> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -71,7 +71,10 @@ type Benchmarks<'elem when 'elem : struct>( member this.ClearInputMatrix() = matrix.Dispose this.Processor - member this.ClearResult() = this.ResultLevels.FreeAndWait this.Processor + member this.ClearResult() = + match this.ResultLevels with + | ClVector.Dense result -> result.FreeAndWait this.Processor + | _ -> failwith "Impossible" member this.ReadMatrix() = let converter = @@ -167,8 +170,11 @@ type WithTransferBenchmark<'elem when 'elem : struct>( override this.Benchmark() = this.LoadMatrixToGPU() this.BFS() - this.ResultLevels.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe + match this.ResultLevels with + | ClVector.Dense result -> + result.ToHost this.Processor |> ignore + this.Processor.PostAndReply Msg.MsgNotifyMe + | _ -> failwith "Impossible" type BFSWithTransferBenchmarkInt32() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index d4e0078c..5c4871e2 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( member val HostVectorPair = Unchecked.defaultof * Vector<'elem>> with get, set - member val ResultVector = Unchecked.defaultof> with get,set + member val ResultVector = Unchecked.defaultof option> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -67,7 +67,9 @@ type Benchmarks<'elem when 'elem : struct>( secondVector.Dispose this.Processor member this.ClearResult() = - this.ResultVector.Dispose this.Processor + match this.ResultVector with + | Some v -> v.Dispose this.Processor + | None -> () member this.CreateVectors() = this.HostVectorPair <- List.last (Gen.sample this.Size 1 generator) @@ -162,8 +164,12 @@ module WithTransfer = override this.Benchmark () = this.LoadVectorsToGPU() this.Map2() - this.ResultVector.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe + match this.ResultVector with + | Some v -> + v.ToHost this.Processor |> ignore + this.Processor.PostAndReply Msg.MsgNotifyMe + | None -> () + [] override this.IterationCleanup () = diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index e412d186..f46a35cd 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -7,3 +7,10 @@ open GraphBLAS.FSharp.Backend.Algorithms module Algorithms = module BFS = let singleSource = BFS.singleSource + + let singleSourceSparse = BFS.singleSourceSparse + + let singleSourcePushPull = BFS.singleSourcePushPull + + module SSSP = + let singleSource = SSSP.run diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 9f83c185..94af285c 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -5,9 +5,8 @@ open FSharp.Quotations open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Vector.Dense -open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions module internal BFS = @@ -18,57 +17,54 @@ module internal BFS = workGroupSize = - let spMVTo = - Operations.SpMVInplace add mul clContext workGroupSize + let spMVInPlace = + Operations.SpMVInPlace add mul clContext workGroupSize let zeroCreate = - ClArray.zeroCreate clContext workGroupSize + Vector.zeroCreate clContext workGroupSize let ofList = Vector.ofList clContext workGroupSize - let maskComplementedTo = + let maskComplementedInPlace = Vector.map2InPlace Mask.complementedOp clContext workGroupSize let fillSubVectorTo = - Vector.assignByMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + Vector.assignByMaskInPlace Mask.assign clContext workGroupSize let containsNonZero = - ClArray.exists Predicates.isSome clContext workGroupSize + Vector.exists Predicates.isSome clContext workGroupSize fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> let vertexCount = matrix.RowCount - let levels = zeroCreate queue HostInterop vertexCount + let levels = + zeroCreate queue DeviceOnly vertexCount Dense - let frontier = + let front = ofList queue DeviceOnly Dense vertexCount [ source, 1 ] - match frontier with - | ClVector.Dense front -> - - let mutable level = 0 - let mutable stop = false + let mutable level = 0 + let mutable stop = false - while not stop do - level <- level + 1 + while not stop do + level <- level + 1 - //Assigning new level values - fillSubVectorTo queue levels front (clContext.CreateClCell level) levels + //Assigning new level values + fillSubVectorTo queue levels front (clContext.CreateClCell level) - //Getting new frontier - spMVTo queue matrix frontier frontier + //Getting new frontier + spMVInPlace queue matrix front front - maskComplementedTo queue front levels front + maskComplementedInPlace queue front levels - //Checking if front is empty - stop <- - not - <| (containsNonZero queue front).ToHostAndFree queue + //Checking if front is empty + stop <- + not + <| (containsNonZero queue front).ToHostAndFree queue - front.Free queue + front.Dispose queue - levels - | _ -> failwith "Not implemented" + levels let singleSourceSparse (add: Expr bool option -> bool option>) @@ -78,55 +74,52 @@ module internal BFS = = let spMSpV = - SpMSpV.run add mul clContext workGroupSize + Operations.SpMSpVBool add mul clContext workGroupSize let zeroCreate = - ClArray.zeroCreate clContext workGroupSize + Vector.zeroCreate clContext workGroupSize let ofList = Vector.ofList clContext workGroupSize let maskComplemented = - Vector.Sparse.Vector.map2SparseDense Mask.complementedOp clContext workGroupSize + Vector.map2Sparse Mask.complementedOp clContext workGroupSize let fillSubVectorTo = - Vector.assignBySparseMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + Vector.assignByMaskInPlace Mask.assign clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) (source: int) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount - let levels = zeroCreate queue HostInterop vertexCount + let levels = + zeroCreate queue DeviceOnly vertexCount Dense - let mutable frontier = + let mutable front = ofList queue DeviceOnly Sparse vertexCount [ source, true ] let mutable level = 0 let mutable stop = false while not stop do - match frontier with - | ClVector.Sparse front -> - level <- level + 1 - - //Assigning new level values - fillSubVectorTo queue levels front (clContext.CreateClCell level) levels + level <- level + 1 - //Getting new frontier - match spMSpV queue matrix front with + //Assigning new level values + fillSubVectorTo queue levels front (clContext.CreateClCell level) + + //Getting new frontier + match spMSpV queue matrix front with + | None -> + front.Dispose queue + stop <- true + | Some newFrontier -> + front.Dispose queue + //Filtering visited vertices + match maskComplemented queue DeviceOnly newFrontier levels with | None -> - frontier.Dispose queue stop <- true - | Some newFrontier -> - frontier.Dispose queue - //Filtering visited vertices - match maskComplemented queue DeviceOnly newFrontier levels with - | None -> - stop <- true - newFrontier.Dispose queue - | Some f -> - frontier <- ClVector.Sparse f - newFrontier.Dispose queue - - | _ -> failwith "Not implemented" + newFrontier.Dispose queue + | Some f -> + front <- f + newFrontier.Dispose queue levels @@ -138,33 +131,25 @@ module internal BFS = workGroupSize = - let SPARSITY = 0.001f - - let push nnz size = - (float32 nnz) / (float32 size) <= SPARSITY - - let spMVTo = - SpMV.runTo add mul clContext workGroupSize + let spMVInPlace = + Operations.SpMVInPlace add mul clContext workGroupSize let spMSpV = - SpMSpV.runBoolStandard add mul clContext workGroupSize + Operations.SpMSpVBool add mul clContext workGroupSize let zeroCreate = - ClArray.zeroCreate clContext workGroupSize + Vector.zeroCreate clContext workGroupSize let ofList = Vector.ofList clContext workGroupSize - let maskComplementedTo = + let maskComplementedInPlace = Vector.map2InPlace Mask.complementedOp clContext workGroupSize let maskComplemented = - Vector.Sparse.Vector.map2SparseDense Mask.complementedOp clContext workGroupSize - - let fillSubVectorDenseTo = - Vector.assignByMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + Vector.map2Sparse Mask.complementedOp clContext workGroupSize - let fillSubVectorSparseTo = - Vector.assignBySparseMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + let fillSubVectorInPlace = + Vector.assignByMaskInPlace (Mask.assign) clContext workGroupSize let toSparse = Vector.toSparse clContext workGroupSize @@ -173,10 +158,22 @@ module internal BFS = let countNNZ = ClArray.count Predicates.isSome clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) (source: int) -> + //Push or pull functions + let getNNZ (queue: MailboxProcessor) (v: ClVector) = + match v with + | ClVector.Sparse v -> v.NNZ + | ClVector.Dense v -> countNNZ queue v + + let SPARSITY = 0.001f + + let push nnz size = + (float32 nnz) / (float32 size) <= SPARSITY + + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount - let levels = zeroCreate queue HostInterop vertexCount + let levels = + zeroCreate queue DeviceOnly vertexCount Dense let mutable frontier = ofList queue DeviceOnly Sparse vertexCount [ source, true ] @@ -187,13 +184,13 @@ module internal BFS = while not stop do level <- level + 1 - match frontier with - | ClVector.Sparse front -> - //Assigning new level values - fillSubVectorSparseTo queue levels front (clContext.CreateClCell level) levels + //Assigning new level values + fillSubVectorInPlace queue levels frontier (clContext.CreateClCell level) + match frontier with + | ClVector.Sparse _ -> //Getting new frontier - match spMSpV queue matrix front with + match spMSpV queue matrix frontier with | None -> frontier.Dispose queue stop <- true @@ -204,34 +201,33 @@ module internal BFS = | None -> stop <- true newFrontier.Dispose queue - | Some f -> + | Some newMaskedFrontier -> newFrontier.Dispose queue //Push/pull - if (push f.NNZ f.Size) then - frontier <- ClVector.Sparse f - else - frontier <- toDense queue DeviceOnly (ClVector.Sparse f) - f.Dispose queue - | ClVector.Dense front -> - //Assigning new level values - fillSubVectorDenseTo queue levels front (clContext.CreateClCell level) levels + let NNZ = getNNZ queue newMaskedFrontier + if (push NNZ newMaskedFrontier.Size) then + frontier <- newMaskedFrontier + else + frontier <- toDense queue DeviceOnly newMaskedFrontier + newMaskedFrontier.Dispose queue + | ClVector.Dense oldFrontier -> //Getting new frontier - spMVTo queue matrix front front + spMVInPlace queue matrix frontier frontier - maskComplementedTo queue front levels front + maskComplementedInPlace queue frontier levels //Emptiness check - let NNZ = countNNZ queue front + let NNZ = getNNZ queue frontier stop <- NNZ = 0 //Push/pull if not stop then - if (push NNZ front.Length) then - frontier <- ClVector.Sparse(toSparse queue DeviceOnly front) - front.Free queue + if (push NNZ frontier.Size) then + frontier <- toSparse queue DeviceOnly frontier + oldFrontier.Free queue else frontier.Dispose queue diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 70754187..251f7866 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -1,16 +1,11 @@ namespace GraphBLAS.FSharp.Backend.Algorithms -open GraphBLAS.FSharp.Backend open Brahma.FSharp -open FSharp.Quotations -open GraphBLAS.FSharp.Backend.Objects -open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Vector -open GraphBLAS.FSharp.Backend.Vector.Dense -open GraphBLAS.FSharp.Backend.Objects.ClContext -open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions -open GraphBLAS.FSharp.Backend.Objects.ClCell +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions module SSSP = let run (clContext: ClContext) workGroupSize = @@ -19,71 +14,67 @@ module SSSP = let min = ArithmeticOperations.min let plus = ArithmeticOperations.intSumAsMul - let spMVTo = - SpMV.runTo min plus clContext workGroupSize + let spMVInPlace = + Operations.SpMVInPlace min plus clContext workGroupSize let create = ClArray.create clContext workGroupSize let ofList = Vector.ofList clContext workGroupSize let eWiseMulLess = - Map.map2InPlace less clContext workGroupSize + Vector.map2To less clContext workGroupSize let eWiseAddMin = - Map.map2InPlace min clContext workGroupSize + Vector.map2To min clContext workGroupSize let filter = - Map.map2InPlace Mask.op clContext workGroupSize + Vector.map2To Mask.op clContext workGroupSize let containsNonZero = - ClArray.exists Predicates.isSome clContext workGroupSize + Vector.exists Predicates.isSome clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) (source: int) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount //None is System.Int32.MaxValue let distance = ofList queue DeviceOnly Dense vertexCount [ source, 0 ] - let mutable f1 = + let mutable front1 = ofList queue DeviceOnly Dense vertexCount [ source, 0 ] - let mutable f2 = + let mutable front2 = create queue DeviceOnly vertexCount None |> ClVector.Dense let mutable stop = false while not stop do - match f1, f2, distance with - | ClVector.Dense front1, ClVector.Dense front2, ClVector.Dense dist -> - //Getting new frontier - spMVTo queue matrix front1 front2 - - //Checking which distances were updated - eWiseMulLess queue front2 dist front1 - //Updating - eWiseAddMin queue dist front2 dist - - //Filtering unproductive vertices - //Front1 is a mask - filter queue front2 front1 front2 - - //Swap fronts - let temp = f1 - f1 <- f2 - f2 <- temp - - //Checking if no distances were updated - stop <- - not - <| (containsNonZero queue front1) - .ToHostAndFree(queue) - - | _ -> failwith "not implemented" - - f1.Dispose queue - f2.Dispose queue + //Getting new frontier + spMVInPlace queue matrix front1 front2 + + //Checking which distances were updated + eWiseMulLess queue front2 distance front1 + //Updating + eWiseAddMin queue distance front2 distance + + //Filtering unproductive vertices + //Front1 is a mask + filter queue front2 front1 front2 + + //Swap fronts + let temp = front1 + front1 <- front2 + front2 <- temp + + //Checking if no distances were updated + stop <- + not + <| (containsNonZero queue front1) + .ToHostAndFree(queue) + + front1.Dispose queue + front2.Dispose queue match distance with | ClVector.Dense dist -> dist diff --git a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs index b48152f2..889cd43f 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs @@ -1,9 +1,10 @@ namespace GraphBLAS.FSharp.Backend.Common open Brahma.FSharp -open GraphBLAS.FSharp.Backend.Objects.ClContext +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions +open GraphBLAS.FSharp.Backend.Common.Map module Bitmap = let private getUniqueBitmapGeneral predicate (clContext: ClContext) workGroupSize = @@ -41,11 +42,19 @@ module Bitmap = bitmap + /// + /// Gets the bitmap that indicates the first elements of the sequences of consecutive identical elements + /// + /// OpenCL context. let firstOccurrence clContext = getUniqueBitmapGeneral <| Predicates.firstOccurrence () <| clContext + /// + /// Gets the bitmap that indicates the last elements of the sequences of consecutive identical elements + /// + /// OpenCL context. let lastOccurrence clContext = getUniqueBitmapGeneral <| Predicates.lastOccurrence () @@ -54,7 +63,7 @@ module Bitmap = let private getUniqueBitmap2General<'a when 'a: equality> getUniqueBitmap (clContext: ClContext) workGroupSize = let map = - Map.map2 <@ fun x y -> x ||| y @> clContext workGroupSize + map2 <@ fun x y -> x ||| y @> clContext workGroupSize let firstGetBitmap = getUniqueBitmap clContext workGroupSize @@ -73,8 +82,18 @@ module Bitmap = result + /// + /// Gets the bitmap that indicates the first elements of the sequences + /// of consecutive identical elements from either first array or second array. + /// + /// OpenCL context. let firstOccurrence2 clContext = getUniqueBitmap2General firstOccurrence clContext + /// + /// Gets the bitmap that indicates the last elements of the sequences + /// of consecutive identical elements from either first array or second array. + /// + /// OpenCL context. let lastOccurrence2 clContext = getUniqueBitmap2General lastOccurrence clContext diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index a90cc058..dacb249e 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -158,233 +158,6 @@ module ClArray = outputArray - /// - /// Builds a new array whose elements are the results of applying the given function - /// to each of the elements of the array. - /// - /// The function to transform elements of the array. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let map<'a, 'b> (op: Expr<'a -> 'b>) (clContext: ClContext) workGroupSize = - - let map = - <@ fun (ndRange: Range1D) lenght (inputArray: ClArray<'a>) (result: ClArray<'b>) -> - - let gid = ndRange.GlobalID0 - - if gid < lenght then - result.[gid] <- (%op) inputArray.[gid] @> - - let kernel = clContext.Compile map - - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> - - let result = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) - - let ndRange = - Range1D.CreateValid(inputArray.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length inputArray result)) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - result - - /// - /// Builds a new array whose elements are the results of applying the given function - /// to the corresponding pairs of values, where the first element of pair is from the given array - /// and the second element is the given value. - /// - /// The function to transform elements of the array. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = - - let map = - <@ fun (ndRange: Range1D) lenght (value: ClCell<'a>) (inputArray: ClArray<'b>) (result: ClArray<'c>) -> - - let gid = ndRange.GlobalID0 - - if gid < lenght then - result.[gid] <- (%op) value.Value inputArray.[gid] @> - - let kernel = clContext.Compile map - - fun (processor: MailboxProcessor<_>) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> - - let result = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) - - let valueClCell = value |> clContext.CreateClCell - - let ndRange = - Range1D.CreateValid(inputArray.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length valueClCell inputArray result) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - result - - /// - /// Fills the third given array with the results of applying the given function - /// to the corresponding elements of the first two given arrays pairwise. - /// - /// - /// The first two input arrays must have the same lengths. - /// - /// The function to transform the pairs of the input elements. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = - - let kernel = - <@ fun (ndRange: Range1D) length (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> - - let gid = ndRange.GlobalID0 - - if gid < length then - - resultArray.[gid] <- (%map) leftArray.[gid] rightArray.[gid] @> - - let kernel = clContext.Compile kernel - - fun (processor: MailboxProcessor<_>) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> - - let ndRange = - Range1D.CreateValid(resultArray.Length, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange resultArray.Length leftArray rightArray resultArray) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - /// - /// Builds a new array whose elements are the results of applying the given function - /// to the corresponding elements of the two given arrays pairwise. - /// - /// - /// The two input arrays must have the same lengths. - /// - /// The function to transform the pairs of the input elements. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let map2<'a, 'b, 'c> map (clContext: ClContext) workGroupSize = - let map2 = - map2InPlace<'a, 'b, 'c> map clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> - - let resultArray = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftArray.Length) - - map2 processor leftArray rightArray resultArray - - resultArray - - module Bitmap = - let private getUniqueBitmapGeneral predicate (clContext: ClContext) workGroupSize = - - let getUniqueBitmap = - <@ fun (ndRange: Range1D) (inputArray: ClArray<'a>) inputLength (isUniqueBitmap: ClArray) -> - - let gid = ndRange.GlobalID0 - - if gid < inputLength then - let isUnique = (%predicate) gid inputLength inputArray // brahma error - - if isUnique then - isUniqueBitmap.[gid] <- 1 - else - isUniqueBitmap.[gid] <- 0 @> - - let kernel = clContext.Compile(getUniqueBitmap) - - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> - - let inputLength = inputArray.Length - - let ndRange = - Range1D.CreateValid(inputLength, workGroupSize) - - let bitmap = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputLength) - - let kernel = kernel.GetKernel() - - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray inputLength bitmap)) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - bitmap - - /// - /// Gets the bitmap that indicates the first elements of the sequences of consecutive identical elements - /// - /// OpenCL context. - let firstOccurrence clContext = - getUniqueBitmapGeneral - <| Predicates.firstOccurrence () - <| clContext - - /// - /// Gets the bitmap that indicates the last elements of the sequences of consecutive identical elements - /// - /// OpenCL context. - let lastOccurrence clContext = - getUniqueBitmapGeneral - <| Predicates.lastOccurrence () - <| clContext - - let private getUniqueBitmap2General<'a when 'a: equality> getUniqueBitmap (clContext: ClContext) workGroupSize = - - let map = - map2 <@ fun x y -> x ||| y @> clContext workGroupSize - - let firstGetBitmap = getUniqueBitmap clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> - let firstBitmap = - firstGetBitmap processor DeviceOnly firstArray - - let secondBitmap = - firstGetBitmap processor DeviceOnly secondArray - - let result = - map processor allocationMode firstBitmap secondBitmap - - firstBitmap.Free processor - secondBitmap.Free processor - - result - - /// - /// Gets the bitmap that indicates the first elements of the sequences - /// of consecutive identical elements from either first array or second array. - /// - /// OpenCL context. - let firstOccurrence2 clContext = - getUniqueBitmap2General firstOccurrence clContext - - /// - /// Gets the bitmap that indicates the last elements of the sequences - /// of consecutive identical elements from either first array or second array. - /// - /// OpenCL context. - let lastOccurrence2 clContext = - getUniqueBitmap2General lastOccurrence clContext - /// /// Removes duplicates form the given array. /// diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index 53777d33..ae9839f2 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -43,6 +43,20 @@ module Common = /// let runByKeysStandard = Sort.Radix.runByKeysStandard + /// + /// Sorts stable input array of values by given integer keys and return only values. + /// + /// + /// + /// let keys = [| 0; 4; 3; 1; 2; 6; 5 |] + /// let values = [| 1.9; 2.8; 3.7; 4.6; 5.5; 6.4; 7.3; |] + /// runByKeysStandard clContext 32 processor keys values + /// ... + /// > val values = [| 1.9; 4.6; 5.5; 3.7; 2.8; 7.3; 6.4 |] + /// + /// + let runByKeysStandardValuesOnly = Sort.Radix.runByKeysStandardValuesOnly + /// /// Sorts stable input array of integer keys. /// @@ -371,8 +385,27 @@ module Common = /// /// The length of the result must be calculated in advance. /// - let segmentSequential<'a> (reduceOp: Expr<'a -> 'a -> 'a option>) (clContext: ClContext) workGroupSize = + let segmentSequential<'a> + (reduceOp: Expr<'a option -> 'a option -> 'a option>) + (clContext: ClContext) + workGroupSize + = Reduce.ByKey.Option.segmentSequential reduceOp clContext workGroupSize + /// + /// Reduces values by key. Each segment is reduced by one work item. + /// + /// ClContext. + /// Work group size. + /// Operation for reducing values. + /// + /// The length of the result and offsets for each segment must be calculated in advance. + /// + let segmentSequentialByOffsets<'a> + (reduceOp: Expr<'a -> 'a -> 'a option>) + (clContext: ClContext) + workGroupSize + = + Reduce.ByKey.Option.segmentSequentialByOffsets reduceOp clContext workGroupSize module ByKey2D = /// diff --git a/src/GraphBLAS-sharp.Backend/Common/Map.fs b/src/GraphBLAS-sharp.Backend/Common/Map.fs index 0de13f8c..f22f0f6b 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Map.fs @@ -2,11 +2,16 @@ open Brahma.FSharp open Microsoft.FSharp.Quotations -open GraphBLAS.FSharp.Backend.Objects.ClContext -open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions module Map = + /// + /// Builds a new array whose elements are the results of applying the given function + /// to each of the elements of the array. + /// + /// The function to transform elements of the array. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let map<'a, 'b> (op: Expr<'a -> 'b>) (clContext: ClContext) workGroupSize = let map = @@ -35,6 +40,14 @@ module Map = result + /// + /// Builds a new array whose elements are the results of applying the given function + /// to the corresponding pairs of values, where the first element of pair is from the given array + /// and the second element is the given value. + /// + /// The function to transform elements of the array. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = let map = @@ -67,6 +80,16 @@ module Map = result + /// + /// Fills the third given array with the results of applying the given function + /// to the corresponding elements of the first two given arrays pairwise. + /// + /// + /// The first two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = let kernel = @@ -94,6 +117,16 @@ module Map = processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + /// + /// Builds a new array whose elements are the results of applying the given function + /// to the corresponding elements of the two given arrays pairwise. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let map2<'a, 'b, 'c> map (clContext: ClContext) workGroupSize = let map2 = map2InPlace<'a, 'b, 'c> map clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index 4c16c733..c90f4cb7 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -37,7 +37,6 @@ - @@ -50,7 +49,6 @@ - @@ -62,10 +60,10 @@ - - + + diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 181e0bc8..5cc805f9 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -406,7 +406,7 @@ module Matrix = let pairwise = ClArray.pairwise clContext workGroupSize let subtract = - Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize + Backend.Common.Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> let pointerPairs = diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index cb67d09c..06b2a39a 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -1,6 +1,7 @@ namespace GraphBLAS.FSharp open Brahma.FSharp +open Microsoft.FSharp.Core open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -60,11 +61,11 @@ module Operations = fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> - ClVector.Dense - <| map2Dense processor allocationMode left right + map2Dense processor allocationMode left right + |> ClVector.Dense + |> Some | ClVector.Sparse left, ClVector.Sparse right -> - ClVector.Sparse - <| map2Sparse processor allocationMode left right + Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) | _ -> failwith "Vector formats are not matching." /// @@ -90,11 +91,11 @@ module Operations = fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> - ClVector.Sparse - <| map2Sparse processor allocationMode left right + Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) | ClVector.Dense left, ClVector.Dense right -> - ClVector.Dense - <| map2Dense processor allocationMode left right + map2Dense processor allocationMode left right + |> ClVector.Dense + |> Some | _ -> failwith "Vector formats are not matching." module Matrix = @@ -210,7 +211,7 @@ module Operations = /// Type of binary function to combine entries. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let SpMVInplace + let SpMVInPlace (add: Expr<'c option -> 'c option -> 'c option>) (mul: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) @@ -226,9 +227,69 @@ module Operations = | _ -> failwith "Not implemented yet" /// - /// Matrix-vector multiplication. + /// CSR Matrix - dense vector multiplication. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMV + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let run = SpMV.run add mul clContext workGroupSize + + fun (queue: MailboxProcessor<_>) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + match matrix, vector with + | ClMatrix.CSR m, ClVector.Dense v -> run queue allocationFlag m v |> ClVector.Dense + | _ -> failwith "Not implemented yet" + + /// + /// CSR Matrix - sparse vector multiplication. Optimized for bool OR and AND operations. /// - let SpMV = SpMV.run + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMSpVBool + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpMSpV.runBoolStandard add mul clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix) (vector: ClVector) -> + match matrix, vector with + | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) + | _ -> failwith "Not implemented yet" + + /// + /// CSR Matrix - sparse vector multiplication. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMSpV + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpMSpV.run add mul clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + match matrix, vector with + | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) + | _ -> failwith "Not implemented yet" /// /// Kronecker product for matrices. diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs new file mode 100644 index 00000000..e404cf87 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -0,0 +1,501 @@ +namespace GraphBLAS.FSharp.Backend.Operations.SpGeMM + +open Brahma.FSharp +open FSharp.Quotations +open GraphBLAS.FSharp +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClMatrix +open GraphBLAS.FSharp.Objects.ClCellExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Backend.Matrix +open GraphBLAS.FSharp.Backend.Quotes + +module internal Expand = + let getSegmentPointers (clContext: ClContext) workGroupSize = + + let gather = + Common.Gather.run clContext workGroupSize + + let prefixSum = + Common.PrefixSum.standardExcludeInPlace clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (leftMatrixColumns: ClArray) (rightMatrixRowsLengths: ClArray) -> + + let segmentsLengths = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftMatrixColumns.Length) + + // extract needed lengths by left matrix nnz + gather processor leftMatrixColumns rightMatrixRowsLengths segmentsLengths + + // compute pointers + let length = + (prefixSum processor segmentsLengths) + .ToHostAndFree processor + + length, segmentsLengths + + let multiply (predicate: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = + let getBitmap = + Backend.Common.Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize + + let prefixSum = + Common.PrefixSum.standardExcludeInPlace clContext workGroupSize + + let assignValues = + ClArray.assignOption2 predicate clContext workGroupSize + + let scatter = + Common.Scatter.lastOccurrence clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (columns: ClArray) (rows: ClArray) -> + + let positions = + getBitmap processor DeviceOnly firstValues secondValues + + let resultLength = + (prefixSum processor positions) + .ToHostAndFree(processor) + + if resultLength = 0 then + positions.Free processor + + None + else + let resultColumns = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + + scatter processor positions columns resultColumns + + let resultRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + + scatter processor positions rows resultRows + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + + assignValues processor firstValues secondValues positions resultValues + + positions.Free processor + + Some(resultValues, resultColumns, resultRows) + + let expand (clContext: ClContext) workGroupSize = + + let idScatter = + Common.Scatter.initLastOccurrence Map.id clContext workGroupSize + + let scatter = + Common.Scatter.lastOccurrence clContext workGroupSize + + let zeroCreate = + ClArray.zeroCreate clContext workGroupSize + + let maxPrefixSum = + Common.PrefixSum.runIncludeInPlace <@ max @> clContext workGroupSize + + let create = ClArray.create clContext workGroupSize + + let gather = + Common.Gather.run clContext workGroupSize + + let segmentPrefixSum = + Common.PrefixSum.ByKey.sequentialInclude <@ (+) @> 0 clContext workGroupSize + + let removeDuplicates = + ClArray.removeDuplications clContext workGroupSize + + let leftMatrixGather = + Common.Gather.run clContext workGroupSize + + let rightMatrixGather = + Common.Gather.run clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (lengths: int) (segmentsPointers: ClArray) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + // Compute left matrix positions + let leftMatrixPositions = zeroCreate processor DeviceOnly lengths + + idScatter processor segmentsPointers leftMatrixPositions + + (maxPrefixSum processor leftMatrixPositions 0) + .Free processor + + // Compute right matrix positions + let rightMatrixPositions = create processor DeviceOnly lengths 1 + + let requiredRightMatrixPointers = + zeroCreate processor DeviceOnly leftMatrix.Columns.Length + + gather processor leftMatrix.Columns rightMatrix.RowPointers requiredRightMatrixPointers + + scatter processor segmentsPointers requiredRightMatrixPointers rightMatrixPositions + + requiredRightMatrixPointers.Free processor + + // another way to get offsets ??? + let offsets = + removeDuplicates processor segmentsPointers + + segmentPrefixSum processor offsets.Length rightMatrixPositions leftMatrixPositions offsets + + offsets.Free processor + + // compute columns + let columns = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, lengths) + + gather processor rightMatrixPositions rightMatrix.Columns columns + + let rows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, lengths) + + gather processor leftMatrixPositions leftMatrix.Rows rows + + // compute left matrix values + let leftMatrixValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, lengths) + + leftMatrixGather processor leftMatrixPositions leftMatrix.Values leftMatrixValues + + leftMatrixPositions.Free processor + + // compute right matrix values + let rightMatrixValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, lengths) + + rightMatrixGather processor rightMatrixPositions rightMatrix.Values rightMatrixValues + + rightMatrixPositions.Free processor + + // left, right matrix values, columns and rows indices + leftMatrixValues, rightMatrixValues, columns, rows + + let sortByColumnsAndRows (clContext: ClContext) workGroupSize = + + let sortByKeyIndices = + Common.Sort.Radix.runByKeysStandardValuesOnly clContext workGroupSize + + let sortByKeyValues = + Common.Sort.Radix.runByKeysStandardValuesOnly clContext workGroupSize + + let sortKeys = + Common.Sort.Radix.standardRunKeysOnly clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> + // sort by columns + let valuesSortedByColumns = + sortByKeyValues processor DeviceOnly columns values + + let rowsSortedByColumns = + sortByKeyIndices processor DeviceOnly columns rows + + let sortedColumns = sortKeys processor columns + + // sort by rows + let valuesSortedByRows = + sortByKeyValues processor DeviceOnly rowsSortedByColumns valuesSortedByColumns + + let columnsSortedByRows = + sortByKeyIndices processor DeviceOnly rowsSortedByColumns sortedColumns + + let sortedRows = sortKeys processor rowsSortedByColumns + + valuesSortedByColumns.Free processor + rowsSortedByColumns.Free processor + sortedColumns.Free processor + + valuesSortedByRows, columnsSortedByRows, sortedRows + + let reduce opAdd (clContext: ClContext) workGroupSize = + + let reduce = + Common.Reduce.ByKey2D.Option.segmentSequential opAdd clContext workGroupSize + + let getUniqueBitmap = + Backend.Common.Bitmap.lastOccurrence2 clContext workGroupSize + + let prefixSum = + Common.PrefixSum.standardExcludeInPlace clContext workGroupSize + + let idScatter = + Common.Scatter.initFirstOccurrence Map.id clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> + + let bitmap = + getUniqueBitmap processor DeviceOnly columns rows + + let uniqueKeysCount = + (prefixSum processor bitmap) + .ToHostAndFree processor + + let offsets = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + idScatter processor bitmap offsets + + bitmap.Free processor + + let reduceResult = + reduce processor allocationMode uniqueKeysCount offsets columns rows values + + offsets.Free processor + + // reducedValues, reducedColumns, reducedRows option + reduceResult + + let runCOO opAdd opMul (clContext: ClContext) workGroupSize = + + let getSegmentPointers = + getSegmentPointers clContext workGroupSize + + let expand = expand clContext workGroupSize + + let multiply = multiply opMul clContext workGroupSize + + let sort = + sortByColumnsAndRows clContext workGroupSize + + let reduce = reduce opAdd clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (rightMatrixRowsNNZ: ClArray) (rightMatrix: ClMatrix.CSR<'b>) (leftMatrix: ClMatrix.COO<'a>) -> + + let length, segmentPointers = + getSegmentPointers processor leftMatrix.Columns rightMatrixRowsNNZ + + if length = 0 then + segmentPointers.Free processor + + length, None + else + // expand + let leftMatrixValues, rightMatrixValues, columns, rows = + expand processor length segmentPointers leftMatrix rightMatrix + + segmentPointers.Free processor + + // multiply + let mulResult = + multiply processor leftMatrixValues rightMatrixValues columns rows + + leftMatrixValues.Free processor + rightMatrixValues.Free processor + columns.Free processor + rows.Free processor + + let result = + mulResult + |> Option.bind + (fun (resultValues, resultColumns, resultRows) -> + // sort + let sortedValues, sortedColumns, sortedRows = + sort processor resultValues resultColumns resultRows + + resultValues.Free processor + resultColumns.Free processor + resultRows.Free processor + + // addition + let reduceResult = + reduce processor allocationMode sortedValues sortedColumns sortedRows + + sortedValues.Free processor + sortedColumns.Free processor + sortedRows.Free processor + + reduceResult) + + length, result + + let runOneStep opAdd opMul (clContext: ClContext) workGroupSize = + + let runCOO = + runCOO opAdd opMul clContext workGroupSize + + let expandRowPointers = + CSR.Matrix.expandRowPointers clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.CSR<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + + let rows = + expandRowPointers processor DeviceOnly leftMatrix + + let leftMatrixCOO = + { Context = clContext + RowCount = leftMatrix.RowCount + ColumnCount = leftMatrix.ColumnCount + Rows = rows + Columns = leftMatrix.Columns + Values = leftMatrix.Values } + + let _, result = + runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix leftMatrixCOO + + rows.Free processor + + result + |> Option.map + (fun (values, columns, rows) -> + { Context = clContext + RowCount = leftMatrix.RowCount + ColumnCount = rightMatrix.ColumnCount + Rows = rows + Columns = columns + Values = values }) + + let runManySteps opAdd opMul (clContext: ClContext) workGroupSize = + + let gather = + Common.Gather.run clContext workGroupSize + + let upperBound = + ClArray.upperBound clContext workGroupSize + + let set = ClArray.set clContext workGroupSize + + let subMatrix = + CSR.Matrix.subRows clContext workGroupSize + + let runCOO = + runCOO opAdd opMul clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.CSR<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + // extract segment lengths by left matrix rows pointers + let segmentPointersByLeftMatrixRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftMatrix.RowPointers.Length) + + gather processor leftMatrix.RowPointers segmentLengths segmentPointersByLeftMatrixRows + + // set last element to one step length + set processor segmentPointersByLeftMatrixRows (leftMatrix.RowPointers.Length - 1) generalLength + + // curring + let upperBound = + upperBound processor segmentPointersByLeftMatrixRows + + let subMatrix = subMatrix processor DeviceOnly + + let runCOO = + runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix + + let rec helper beginRow workOffset previousResult = + if beginRow < leftMatrix.RowCount then + let currentBound = + clContext.CreateClCell(workOffset + maxAllocSize: int) + + // find largest row that fit into maxAllocSize + let upperBound = + (upperBound currentBound).ToHostAndFree processor + + let endRow = upperBound - 2 + + currentBound.Free processor + + // TODO(handle largest rows) + // (we can split row, multiply and merge them but merge path needed) + if endRow = beginRow then + failwith "It is impossible to multiply such a long row" + + // extract matrix TODO(Transfer overhead) + let subMatrix = + subMatrix beginRow (endRow - beginRow) leftMatrix + + // compute sub result + let length, result = runCOO subMatrix + // increase workOffset according to previous expand + let workOffset = workOffset + length + + match result with + | Some result -> + helper endRow workOffset + <| result :: previousResult + | None -> helper endRow workOffset previousResult + else + previousResult + + let result = helper 0 0 [] |> List.rev + + segmentPointersByLeftMatrixRows.Free processor + + result + + let run opAdd opMul (clContext: ClContext) workGroupSize = + + let getNNZInRows = + CSR.Matrix.NNZInRows clContext workGroupSize + + let getSegmentPointers = + getSegmentPointers clContext workGroupSize + + let runOneStep = + runOneStep opAdd opMul clContext workGroupSize + + let concat = ClArray.concat clContext workGroupSize + + let concatData = ClArray.concat clContext workGroupSize + + let runManySteps = + runManySteps opAdd opMul clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + + let rightMatrixRowsNNZ = + getNNZInRows processor DeviceOnly rightMatrix + + let generalLength, segmentLengths = + getSegmentPointers processor leftMatrix.Columns rightMatrixRowsNNZ + + if generalLength = 0 then + None + elif generalLength < maxAllocSize then + segmentLengths.Free processor + + runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix + else + let result = + runManySteps + processor + allocationMode + maxAllocSize + generalLength + leftMatrix + segmentLengths + rightMatrixRowsNNZ + rightMatrix + + rightMatrixRowsNNZ.Free processor + segmentLengths.Free processor + + match result with + | _ :: _ -> + let valuesList, columnsList, rowsList = result |> List.unzip3 + + let values = + concatData processor allocationMode valuesList + + let columns = + concat processor allocationMode columnsList + + let rows = concat processor allocationMode rowsList + + // TODO(overhead: compute result length 3 time) + // release resources + valuesList + |> List.iter (fun array -> array.Free processor) + + columnsList + |> List.iter (fun array -> array.Free processor) + + rowsList + |> List.iter (fun array -> array.Free processor) + + { Context = clContext + RowCount = leftMatrix.RowCount + ColumnCount = rightMatrix.ColumnCount + Rows = rows + Columns = columns + Values = values } + |> Some + | _ -> None diff --git a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs similarity index 96% rename from src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs rename to src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs index 4c579ad3..bca119a1 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -1,15 +1,14 @@ -namespace GraphBLAS.FSharp.Backend.Vector +namespace GraphBLAS.FSharp.Backend.Operations open Brahma.FSharp open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Vector.Sparse open Microsoft.FSharp.Quotations -open GraphBLAS.FSharp.Backend.Objects -open GraphBLAS.FSharp.Backend.Objects.ClVector -open GraphBLAS.FSharp.Backend.Objects.ClContext -open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions -open GraphBLAS.FSharp.Backend.Objects.ClCell +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClVector +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions module SpMSpV = @@ -280,9 +279,10 @@ module SpMSpV = Sort.Radix.standardRunKeysOnly clContext workGroupSize let removeDuplicates = - ClArray.removeDuplications clContext workGroupSize + GraphBLAS.FSharp.ClArray.removeDuplications clContext workGroupSize - let create = ClArray.create clContext workGroupSize + let create = + GraphBLAS.FSharp.ClArray.create clContext workGroupSize fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 6dfab53e..82a4d265 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -36,9 +36,9 @@ module ArithmeticOperations = if res = zero then None else Some res @> - let inline mkNumericSumAsMul zero = - let mutable res = zero + let inline private mkNumericSumAsMul zero = <@ fun (x: 't option) (y: 't option) -> + let mutable res = zero match x, y with | Some f, Some s -> res <- f + s @@ -46,6 +46,7 @@ module ArithmeticOperations = if res = zero then None else Some res @> + let inline private mkNumericMul zero = <@ fun (x: 't option) (y: 't option) -> let mutable res = zero diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs index 4236273f..183d3e4c 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs @@ -100,10 +100,10 @@ module Search = /// Find lower position of item in array. /// let lowerPosition<'a when 'a: equality and 'a: comparison> = - <@ fun lenght sourceItem (keys: ClArray<'a>) -> + <@ fun length sourceItem (keys: ClArray<'a>) -> let mutable leftEdge = 0 - let mutable rightEdge = lenght - 1 + let mutable rightEdge = length - 1 let mutable resultPosition = None while leftEdge <= rightEdge do @@ -126,7 +126,7 @@ module Search = /// Find lower position of item in array. /// let lowerPositionLocal<'a when 'a: equality and 'a: comparison> = - <@ fun lenght sourceItem (keys: 'a []) -> + <@ fun length sourceItem (keys: 'a []) -> let mutable leftEdge = 0 let mutable rightEdge = length - 1 diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 67a5459a..0f557635 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend.Vector.Dense open Brahma.FSharp open Microsoft.FSharp.Quotations open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -15,7 +16,7 @@ module Vector = workGroupSize = - let map = ClArray.map op clContext workGroupSize + let map = Map.map op clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs index 077a8f10..8ad13044 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs @@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend.Vector.Sparse open Brahma.FSharp open Microsoft.FSharp.Control open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions @@ -74,7 +75,7 @@ module internal Common = let concatIndices = ClArray.concat clContext workGroupSize let mapIndices = - Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> + Common.Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> fun (processor: MailboxProcessor<_>) allocationMode (vectors: Sparse<'a> seq) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs index 329e5484..f0a69a41 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs @@ -95,7 +95,7 @@ module internal Map = queue.Post(Msg.CreateFreeMsg<_>(indices)) { Context = clContext - Indices = indices + Indices = resultIndices Values = resultValues Size = vector.Size } diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index aa771f52..02cc8413 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -4,9 +4,11 @@ open Brahma.FSharp open FSharp.Quotations open Microsoft.FSharp.Control open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Backend.Quotes +open Microsoft.FSharp.Core module internal Map2 = let private preparePositions<'a, 'b, 'c> opAdd (clContext: ClContext) workGroupSize = @@ -78,7 +80,7 @@ module internal Map2 = preparePositions<'a, 'b, 'c> op clContext workGroupSize let setPositions = - Common.setPositions clContext workGroupSize + Common.setPositionsOption clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> @@ -91,17 +93,20 @@ module internal Map2 = rightVector.Values rightVector.Indices - let resultValues, resultIndices = + let result = setPositions processor allocationMode allValues allIndices bitmap + |> Option.map + (fun (resultValues, resultIndices) -> + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = leftVector.Size }) - processor.Post(Msg.CreateFreeMsg<_>(allIndices)) - processor.Post(Msg.CreateFreeMsg<_>(allValues)) - processor.Post(Msg.CreateFreeMsg<_>(bitmap)) + allIndices.Free processor + allValues.Free processor + bitmap.Free processor - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = max leftVector.Size rightVector.Size } + result let private preparePositionsSparseDense<'a, 'b, 'c> (clContext: ClContext) workGroupSize opAdd = @@ -163,6 +168,7 @@ module internal Map2 = resultBitmap, resultValues, resultIndices + //TODO: unify with sparseXsparse let runSparseDense<'a, 'b, 'c when 'a: struct and 'b: struct and 'c: struct> op (clContext: ClContext) @@ -372,7 +378,7 @@ module internal Map2 = preparePositions<'a, 'b, 'c> op clContext workGroupSize let setPositions = - Common.setPositions clContext workGroupSize + Common.setPositionsOption clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> @@ -385,14 +391,17 @@ module internal Map2 = processor.Post(Msg.CreateFreeMsg<_>(rightValues)) processor.Post(Msg.CreateFreeMsg<_>(isLeft)) - let resultValues, resultIndices = + let result = setPositions processor allocationMode allValues allIndices positions + |> Option.map + (fun (resultValues, resultIndices) -> + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = max leftVector.Size rightVector.Size }) processor.Post(Msg.CreateFreeMsg<_>(allIndices)) processor.Post(Msg.CreateFreeMsg<_>(allValues)) processor.Post(Msg.CreateFreeMsg<_>(positions)) - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = max leftVector.Size rightVector.Size } + result diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index edde0d9a..1532cec7 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -2,8 +2,10 @@ namespace GraphBLAS.FSharp open Brahma.FSharp open Microsoft.FSharp.Control +open Microsoft.FSharp.Core open Microsoft.FSharp.Quotations open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClVector @@ -50,7 +52,7 @@ module Vector = ClArray.zeroCreate clContext workGroupSize let map = - Map.map <@ Some @> clContext workGroupSize + Common.Map.map <@ Some @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode format size (elements: (int * 'a) list) -> match format with @@ -166,12 +168,150 @@ module Vector = <| denseFillVector processor allocationMode vector mask value | _ -> failwith "Vector formats are not matching." + /// + /// Assign given value to all entries covered by mask. + /// + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let assignByMask<'a, 'b when 'a: struct and 'b: struct> op clContext workGroupSize = assignByMaskGeneral<'a, 'b> (Convert.assignToOption op) clContext workGroupSize + /// + /// Assign given value to all entries NOT covered by mask. + /// + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let assignByMaskComplemented<'a, 'b when 'a: struct and 'b: struct> op clContext workGroupSize = assignByMaskGeneral<'a, 'b> (Convert.assignComplementedToOption op) clContext workGroupSize + let private assignByMaskInPlaceGeneral<'a, 'b when 'a: struct and 'b: struct> + op + (clContext: ClContext) + workGroupSize + = + + let assignByDense = + Dense.Vector.assignByMaskInPlace op clContext workGroupSize + + let assignBySparse = + Dense.Vector.assignBySparseMaskInPlace op clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: ClCell<'a>) -> + match vector, mask with + | ClVector.Dense vector, ClVector.Dense mask -> assignByDense processor vector mask value vector + | ClVector.Dense vector, ClVector.Sparse mask -> assignBySparse processor vector mask value vector + | _ -> failwith "Unsupported format" + + /// + /// Assign given value to all entries covered by mask. + /// Does it in-place. + /// + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let assignByMaskInPlace<'a, 'b when 'a: struct and 'b: struct> op clContext workGroupSize = + assignByMaskInPlaceGeneral<'a, 'b> (Convert.assignToOption op) clContext workGroupSize + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Stores the result in the left vector. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2InPlace (map: Expr<'a option -> 'b option -> 'a option>) (clContext: ClContext) workGroupSize = + let map2Dense = + Dense.Vector.map2InPlace map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + match leftVector, rightVector with + | ClVector.Dense left, ClVector.Dense right -> map2Dense processor left right left + | _ -> failwith "Unsupported vector format" + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Stores the result in the given vector. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2To (map: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) workGroupSize = + let map2Dense = + Dense.Vector.map2InPlace map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> + match leftVector, rightVector, resultVector with + | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result + | _ -> failwith "Unsupported vector format" + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Returns new vector. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2Dense (map: Expr<'a option -> 'b option -> 'a option>) (clContext: ClContext) workGroupSize = + let map2Dense = + Dense.Vector.map2 map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + match leftVector, rightVector with + | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationFlag left right + | _ -> failwith "Unsupported vector format" + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Returns new vector as option. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2Sparse (map: Expr<'a option -> 'b option -> 'a option>) (clContext: ClContext) workGroupSize = + let map2Sparse = + Sparse.Map2.run map clContext workGroupSize + + let map2SparseDense = + Sparse.Map2.runSparseDense map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + match leftVector, rightVector with + | ClVector.Sparse left, ClVector.Sparse right -> + Option.map ClVector.Sparse (map2Sparse processor allocationFlag left right) + | ClVector.Sparse left, ClVector.Dense right -> + Option.map ClVector.Sparse (map2SparseDense processor allocationFlag left right) + | _ -> failwith "Unsupported vector format" + + /// + /// Check if vector contains such element that satisfies the predicate. + /// + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let exists (predicate: Expr<'a option -> bool>) (clContext: ClContext) workGroupSize = + + let existsDense = + ClArray.exists predicate clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) -> + match vector with + | ClVector.Dense vector -> existsDense processor vector + | _ -> failwith "Unsupported format" + /// /// Applies a function to each value of the vector, threading an accumulator argument through the computation. /// Begin by applying the function to the first two values. diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index af30491d..110dddec 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -64,40 +64,35 @@ let testFixtures (testContext: TestContext) = let matrix = matrixHost.ToDevice context let matrixBool = matrixHostBool.ToDevice context - match matrix, matrixBool with - | ClMatrix.CSR mtx, ClMatrix.CSR mtxBool -> - let res = bfs queue mtx source |> ClVector.Dense + let res = bfs queue matrix source - let resSparse = - bfsSparse queue mtxBool source |> ClVector.Dense + let resSparse = bfsSparse queue matrixBool source - let resPushPull = - bfsPushPull queue mtxBool source |> ClVector.Dense + let resPushPull = bfsPushPull queue matrixBool source - let resHost = res.ToHost queue - let resHostSparse = resSparse.ToHost queue - let resHostPushPull = resPushPull.ToHost queue + let resHost = res.ToHost queue + let resHostSparse = resSparse.ToHost queue + let resHostPushPull = resPushPull.ToHost queue - (mtx :> IDeviceMemObject).Dispose queue - (mtxBool :> IDeviceMemObject).Dispose queue - res.Dispose queue - resSparse.Dispose queue - resPushPull.Dispose queue + matrix.Dispose queue + matrixBool.Dispose queue + res.Dispose queue + resSparse.Dispose queue + resPushPull.Dispose queue - match resHost, resHostSparse, resHostPushPull with - | Vector.Dense resHost, Vector.Dense resHostSparse, Vector.Dense resHostPushPull -> - let actual = resHost |> Utils.unwrapOptionArray 0 + match resHost, resHostSparse, resHostPushPull with + | Vector.Dense resHost, Vector.Dense resHostSparse, Vector.Dense resHostPushPull -> + let actual = resHost |> Utils.unwrapOptionArray 0 - let actualSparse = - resHostSparse |> Utils.unwrapOptionArray 0 + let actualSparse = + resHostSparse |> Utils.unwrapOptionArray 0 - let actualPushPull = - resHostPushPull |> Utils.unwrapOptionArray 0 + let actualPushPull = + resHostPushPull |> Utils.unwrapOptionArray 0 - Expect.sequenceEqual actual expected "Dense bfs is not as expected" - Expect.sequenceEqual actualSparse expected "Sparse bfs is not as expected" - Expect.sequenceEqual actualPushPull expected "Push-pull bfs is not as expected" - | _ -> failwith "Not implemented" + Expect.sequenceEqual actual expected "Dense bfs is not as expected" + Expect.sequenceEqual actualSparse expected "Sparse bfs is not as expected" + Expect.sequenceEqual actualPushPull expected "Push-pull bfs is not as expected" | _ -> failwith "Not implemented" ] let tests = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index 51e7e475..fa9cdff7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -8,9 +8,8 @@ open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms open GraphBLAS.FSharp.Tests.Backend.QuickGraph.CreateGraph -open GraphBLAS.FSharp.Backend.Objects -open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClVectorExtensions let testFixtures (testContext: TestContext) = [ let config = Utils.undirectedAlgoConfig @@ -46,22 +45,19 @@ let testFixtures (testContext: TestContext) = let matrix = matrixHost.ToDevice context - match matrix with - | ClMatrix.CSR mtx -> - let resDense = - ssspDense queue mtx source |> ClVector.Dense + let resDense = + ssspDense queue matrix source |> ClVector.Dense - let resHost = resDense.ToHost queue + let resHost = resDense.ToHost queue - (mtx :> IDeviceMemObject).Dispose queue - resDense.Dispose queue + matrix.Dispose queue + resDense.Dispose queue - match resHost with - | Vector.Dense resHost -> - let actual = resHost + match resHost with + | Vector.Dense resHost -> + let actual = resHost - Expect.sequenceEqual actual expected "Sequences must be equal" - | _ -> failwith "Not implemented" + Expect.sequenceEqual actual expected "Sequences must be equal" | _ -> failwith "Not implemented" ] let tests = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs index 33ab68b9..b87816ba 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs @@ -4,7 +4,7 @@ open Expecto open Brahma.FSharp open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs index 93f03ee8..69b28dad 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs @@ -4,7 +4,7 @@ open Expecto open Brahma.FSharp open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Objects.ClContextExtensions diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs index 0e58f323..1ff419ef 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs @@ -430,7 +430,7 @@ let testOption<'a> isEqual reduceOp testFun (array: (int * 'a) []) = |> checkResultOption isEqual keys values reduceOp let createTestOption (isEqual: 'a -> 'a -> bool) (reduceOpQ, reduceOp) = - Common.Reduce.ByKey.Option.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.Option.segmentSequentialByOffsets reduceOpQ context Utils.defaultWorkGroupSize |> testOption<'a> isEqual reduceOp |> testPropertyWithConfig { config with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs index aac15b20..771798c7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs @@ -44,7 +44,7 @@ let correctnessGenericTest isEqual zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a>) + (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) case (leftArray: 'a [], rightArray: 'a []) @@ -71,17 +71,20 @@ let correctnessGenericTest let res = addFun q HostInterop firstVector secondVector - firstVector.Dispose q - secondVector.Dispose q + match res with + | Some res -> + let denseActual = toDense q HostInterop res - let denseActual = toDense q HostInterop res + let actual = denseActual.ToHost q - let actual = denseActual.ToHost q + res.Dispose q + denseActual.Dispose q - res.Dispose q - denseActual.Dispose q + checkResult isEqual zero op actual leftArray rightArray + | _ -> () - checkResult isEqual zero op actual leftArray rightArray + firstVector.Dispose q + secondVector.Dispose q with | ex when ex.Message = "InvalidBufferSize" -> () | ex -> raise ex diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index 2ab3b1fe..c554b25e 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -1,19 +1,15 @@ module GraphBLAS.FSharp.Tests.Backend.Vector.SpMSpV -open System -open GraphBLAS.FSharp.Backend.Objects.ArraysExtensions +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects.ArraysExtensions open Expecto -open Brahma.FSharp open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Tests.TestCases open Microsoft.FSharp.Collections open Microsoft.FSharp.Core -open GraphBLAS.FSharp.Backend.Objects -open GraphBLAS.FSharp.Backend.Vector open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Backend.Objects.ClContext let config = Utils.defaultConfig @@ -63,7 +59,7 @@ let correctnessGenericTest some sumOp mulOp - (spMV: MailboxProcessor<_> -> ClMatrix.CSR<'a> -> ClVector.Sparse<'a> -> ClVector.Sparse<'a> option) + (spMV: MailboxProcessor<_> -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -85,21 +81,18 @@ let correctnessGenericTest try let m = mtx.ToDevice testContext.ClContext - match vtr, m with - | Vector.Sparse vtr, ClMatrix.CSR m -> - let v = vtr.ToDevice testContext.ClContext - - match spMV testContext.Queue m v with - | Some res -> - (ClMatrix.CSR m).Dispose q - v.Dispose q - let hostResIndices = res.Indices.ToHost q - let hostResValues = res.Values.ToHost q - res.Dispose q - - checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues - | None -> failwith "Result should not be empty while standard operations are tested" - | _ -> failwith "Impossible" + let v = vtr.ToDevice testContext.ClContext + + match spMV testContext.Queue m v with + | Some (ClVector.Sparse res) -> + m.Dispose q + v.Dispose q + let hostResIndices = res.Indices.ToHost q + let hostResValues = res.Values.ToHost q + res.Dispose q + + checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues + | _ -> failwith "Result should not be empty while standard operations are tested" with | ex when ex.Message = "InvalidBufferSize" -> () | ex -> raise ex @@ -124,7 +117,7 @@ let testFixturesSpMSpV (testContext: TestContext) = q.Error.Add(fun e -> failwithf "%A" e) createTest - SpMSpV.runBoolStandard + Operations.SpMSpVBool testContext false true @@ -135,7 +128,7 @@ let testFixturesSpMSpV (testContext: TestContext) = ArithmeticOperations.boolMulOption createTest - SpMSpV.run + Operations.SpMSpV testContext 0 1 @@ -146,7 +139,7 @@ let testFixturesSpMSpV (testContext: TestContext) = ArithmeticOperations.intMulOption createTest - SpMSpV.run + Operations.SpMSpV testContext 0.0f 1f @@ -158,7 +151,7 @@ let testFixturesSpMSpV (testContext: TestContext) = if Utils.isFloat64Available context.ClDevice then createTest - SpMSpV.run + Operations.SpMSpV testContext 0.0 1 diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index aed7ea50..45ab8054 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -51,7 +51,7 @@ let correctnessGenericTest zero sumOp mulOp - (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix.CSR<'a> -> ClArray<'a option> -> ClArray<'a option>) + (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -68,14 +68,15 @@ let correctnessGenericTest try let m = mtx.ToDevice testContext.ClContext - match vtr, m with - | Vector.Dense vtr, ClMatrix.CSR m -> - let v = vtr.ToDevice testContext.ClContext + let v = vtr.ToDevice testContext.ClContext - let res = spMV testContext.Queue HostInterop m v + let res = spMV testContext.Queue HostInterop m v - (ClMatrix.CSR m).Dispose q - v.Free q + m.Dispose q + v.Dispose q + + match res with + | ClVector.Dense res -> let hostRes = res.ToHostAndFree q checkResult isEqual sumOp mulOp zero matrix vector hostRes From f4484a9b1889b8bb2581c0b8f8311b499bdf4f50 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Thu, 5 Oct 2023 20:59:23 +0300 Subject: [PATCH 029/102] Enable all tests --- tests/GraphBLAS-sharp.Tests/Program.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index cabbacae..b6dade9e 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -96,7 +96,7 @@ let algorithmsTests = |> testSequenced let deviceTests = - testList "Device" [ matrixTests; commonTests ] + testList "Device" [ matrixTests; commonTests; vectorTests; algorithmsTests ] |> testSequenced let hostTests = From c6232d35da4d0c6523d6fd538c08b681a6d2eb46 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Thu, 5 Oct 2023 21:01:42 +0300 Subject: [PATCH 030/102] Format Program.fs --- tests/GraphBLAS-sharp.Tests/Program.fs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index b6dade9e..5b7b7908 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -96,7 +96,12 @@ let algorithmsTests = |> testSequenced let deviceTests = - testList "Device" [ matrixTests; commonTests; vectorTests; algorithmsTests ] + testList + "Device" + [ matrixTests + commonTests + vectorTests + algorithmsTests ] |> testSequenced let hostTests = From ca7b2756ff329eb60d0bab9a251ab5732aad7323 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Thu, 5 Oct 2023 21:48:07 +0300 Subject: [PATCH 031/102] paket.lock update --- paket.lock | 143 ++++++++++++++++++++++++++--------------------------- 1 file changed, 70 insertions(+), 73 deletions(-) diff --git a/paket.lock b/paket.lock index cf6d32df..7cae92f5 100644 --- a/paket.lock +++ b/paket.lock @@ -2,8 +2,8 @@ STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 altcover (7.6.812) - BenchmarkDotNet (0.13.6) - BenchmarkDotNet.Annotations (>= 0.13.6) - restriction: >= netstandard2.0 + BenchmarkDotNet (0.13.9) + BenchmarkDotNet.Annotations (>= 0.13.9) - restriction: >= netstandard2.0 CommandLineParser (>= 2.9.1) - restriction: >= netstandard2.0 Gee.External.Capstone (>= 2.3) - restriction: >= netstandard2.0 Iced (>= 1.17) - restriction: >= netstandard2.0 @@ -18,7 +18,7 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - BenchmarkDotNet.Annotations (0.13.6) - restriction: >= netstandard2.0 + BenchmarkDotNet.Annotations (0.13.9) - restriction: >= netstandard2.0 Brahma.FSharp (2.0.5) Brahma.FSharp.OpenCL.Printer (>= 2.0.5) - restriction: >= net7.0 Brahma.FSharp.OpenCL.Shared (>= 2.0.5) - restriction: >= net7.0 @@ -83,27 +83,27 @@ NUGET System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 7.0) - restriction: >= netstandard2.0 + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.6) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.6.3) - restriction: || (>= net45) (>= netcoreapp2.1) + Microsoft.CodeAnalysis.CSharp (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.7.2) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.430602) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.447801) - restriction: >= netstandard2.0 Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 6.0) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Diagnostics.Runtime (2.4.416101) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.1.3) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (3.0.442202) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.5) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) @@ -145,11 +145,11 @@ NUGET Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.6.3) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.ObjectModel (17.7.2) - restriction: >= netcoreapp3.1 NuGet.Frameworks (>= 6.5) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.6.3) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.6.3) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.7.2) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.7.2) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -214,7 +214,7 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.6.1) - restriction: >= netcoreapp3.1 + NuGet.Frameworks (6.7) - restriction: >= netcoreapp3.1 Perfolizer (0.2.1) - restriction: >= netstandard2.0 System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 QuikGraph (2.5) @@ -762,20 +762,20 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.12) - restriction: >= net5.0 - FSharp.Compiler.Service (>= 43.7.200) - restriction: >= net6.0 - FSharp.Core (>= 7.0.200) - restriction: >= net6.0 + FSharp.Analyzers.SDK (0.14.1) - restriction: >= net5.0 + FSharp.Compiler.Service (>= 43.7.400) - restriction: >= net6.0 + FSharp.Core (>= 7.0.400) - restriction: >= net6.0 McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 - FSharp.Compiler.Service (43.7.300) - restriction: >= net6.0 - FSharp.Core (7.0.300) - restriction: >= netstandard2.0 + FSharp.Compiler.Service (43.7.400) - restriction: >= net6.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.300) - restriction: >= net5.0 + FSharp.Core (7.0.400) - restriction: >= net5.0 McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 @@ -932,17 +932,18 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.300) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -955,12 +956,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) @@ -968,25 +969,24 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.844) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.6.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Configuration (6.6.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (6.6.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.6.1) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (6.6.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 Octokit (0.48) System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 @@ -1002,7 +1002,6 @@ NUGET System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1023,8 +1022,6 @@ NUGET System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) - System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) @@ -1077,7 +1074,7 @@ NUGET Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (4.0) - restriction: >= netstandard2.0 + Fable.Core (4.1) - restriction: >= netstandard2.0 Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 @@ -1170,22 +1167,23 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.300) + FSharp.Core (7.0.400) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -1198,12 +1196,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1215,25 +1213,24 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.844) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.6.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Configuration (6.6.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (6.6.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.6.1) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (6.6.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) From 53c671570ee2b1920138a073a71a4d6e32e92385 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 10 Oct 2023 17:00:40 +0300 Subject: [PATCH 032/102] Encapsulate ClCell management inside operation --- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 6 +++--- .../Vector/Dense/Vector.fs | 18 +++++++++++++----- .../Vector/Sparse/Map2.fs | 7 +++++-- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 4 ++-- .../Backend/Vector/AssignByMask.fs | 5 ++--- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 94af285c..29384a87 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -50,7 +50,7 @@ module internal BFS = level <- level + 1 //Assigning new level values - fillSubVectorTo queue levels front (clContext.CreateClCell level) + fillSubVectorTo queue levels front level //Getting new frontier spMVInPlace queue matrix front front @@ -103,7 +103,7 @@ module internal BFS = level <- level + 1 //Assigning new level values - fillSubVectorTo queue levels front (clContext.CreateClCell level) + fillSubVectorTo queue levels front level //Getting new frontier match spMSpV queue matrix front with @@ -185,7 +185,7 @@ module internal BFS = level <- level + 1 //Assigning new level values - fillSubVectorInPlace queue levels frontier (clContext.CreateClCell level) + fillSubVectorInPlace queue levels frontier level match frontier with | ClVector.Sparse _ -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 0f557635..6401a580 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -66,20 +66,24 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> + fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(leftVector.Length, workGroupSize) let kernel = kernel.GetKernel() + let valueCell = clContext.CreateClCell(value) + processor.Post( Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector value resultVector) + (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector valueCell resultVector) ) processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + valueCell.Free processor + let assignByMask<'a, 'b when 'a: struct and 'b: struct> (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) (clContext: ClContext) @@ -89,7 +93,7 @@ module Vector = let assignByMask = assignByMaskInPlace maskOp clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: ClCell<'a>) -> + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> let resultVector = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftVector.Length) @@ -114,13 +118,15 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> + fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(maskVector.NNZ, workGroupSize) let kernel = kernel.GetKernel() + let valueCell = clContext.CreateClCell(value) + processor.Post( Msg.MsgSetArguments (fun () -> @@ -130,12 +136,14 @@ module Vector = leftVector maskVector.Indices maskVector.Values - value + valueCell resultVector) ) processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + valueCell.Free processor + let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = let scatterValues = diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index 02cc8413..fb91840f 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -281,7 +281,9 @@ module internal Map2 = let setPositions = Common.setPositions clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: ClCell<'a>) -> + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> + + let valueCell = clContext.CreateClCell(value) let bitmap, values, indices = prepare @@ -291,11 +293,12 @@ module internal Map2 = leftVector.Indices rightVector.Values rightVector.Indices - value + valueCell let resultValues, resultIndices = setPositions processor allocationMode values indices bitmap + processor.Post(Msg.CreateFreeMsg<_>(valueCell)) processor.Post(Msg.CreateFreeMsg<_>(indices)) processor.Post(Msg.CreateFreeMsg<_>(values)) processor.Post(Msg.CreateFreeMsg<_>(bitmap)) diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index 1532cec7..f02798d6 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -158,7 +158,7 @@ module Vector = let denseFillVector = Dense.Vector.assignByMask op clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector<'a>) (mask: ClVector<'b>) (value: ClCell<'a>) -> + fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> match vector, mask with | ClVector.Sparse vector, ClVector.Sparse mask -> ClVector.Sparse @@ -198,7 +198,7 @@ module Vector = let assignBySparse = Dense.Vector.assignBySparseMaskInPlace op clContext workGroupSize - fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: ClCell<'a>) -> + fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> match vector, mask with | ClVector.Dense vector, ClVector.Dense mask -> assignByDense processor vector mask value vector | ClVector.Dense vector, ClVector.Sparse mask -> assignBySparse processor vector mask value vector diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs index 737c5831..3c0fb675 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs @@ -51,7 +51,7 @@ let checkResult isZero isComplemented (actual: Vector<'a>) (vector: 'a []) (mask let makeTest<'a when 'a: struct and 'a: equality> (isZero: 'a -> bool) (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClCell<'a> -> ClVector<'a>) + (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) isComplemented case (vector: 'a [], mask: 'a [], value: 'a) @@ -72,10 +72,9 @@ let makeTest<'a when 'a: struct and 'a: equality> let clMaskVector = maskVector.ToDevice context try - let clValue = context.CreateClCell<'a> value let clActual = - fillVector q HostInterop clLeftVector clMaskVector clValue + fillVector q HostInterop clLeftVector clMaskVector value let cooClActual = toDense q HostInterop clActual From d2951d4024f53faae2fca16fc0839e11fe06928a Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 14 Oct 2023 19:00:27 +0300 Subject: [PATCH 033/102] mkNumericSumAsMul allow max length paths --- src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 82a4d265..5d80a0da 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -38,14 +38,13 @@ module ArithmeticOperations = let inline private mkNumericSumAsMul zero = <@ fun (x: 't option) (y: 't option) -> - let mutable res = zero + let mutable res = None match x, y with - | Some f, Some s -> res <- f + s + | Some f, Some s -> res <- Some(f + s) | _ -> () - - if res = zero then None else Some res @> + res @> let inline private mkNumericMul zero = <@ fun (x: 't option) (y: 't option) -> From 01c35d362641f10cf03e7857d7216aa4c37c879f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 16:50:40 +0300 Subject: [PATCH 034/102] SSSP return vector --- src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs | 6 ++---- tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 251f7866..815fde6f 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -7,7 +7,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions -module SSSP = +module internal SSSP = let run (clContext: ClContext) workGroupSize = let less = ArithmeticOperations.less @@ -76,6 +76,4 @@ module SSSP = front1.Dispose queue front2.Dispose queue - match distance with - | ClVector.Dense dist -> dist - | _ -> failwith "not implemented" + distance diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index fa9cdff7..78feff8f 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -45,8 +45,7 @@ let testFixtures (testContext: TestContext) = let matrix = matrixHost.ToDevice context - let resDense = - ssspDense queue matrix source |> ClVector.Dense + let resDense = ssspDense queue matrix source let resHost = resDense.ToHost queue From 83c860e26846bb7eeb188bc101aaf7b468de2071 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 16:51:25 +0300 Subject: [PATCH 035/102] BFS sparse and push-pull on int32 --- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 24 +++++++++---------- .../Backend/Algorithms/BFS.fs | 17 +++++-------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 29384a87..830c0bad 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -67,14 +67,14 @@ module internal BFS = levels let singleSourceSparse - (add: Expr bool option -> bool option>) - (mul: Expr bool option -> bool option>) + (add: Expr int option -> int option>) + (mul: Expr<'a option -> int option -> int option>) (clContext: ClContext) workGroupSize = let spMSpV = - Operations.SpMSpVBool add mul clContext workGroupSize + Operations.SpMSpV add mul clContext workGroupSize let zeroCreate = Vector.zeroCreate clContext workGroupSize @@ -87,14 +87,14 @@ module internal BFS = let fillSubVectorTo = Vector.assignByMaskInPlace Mask.assign clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> let vertexCount = matrix.RowCount let levels = zeroCreate queue DeviceOnly vertexCount Dense let mutable front = - ofList queue DeviceOnly Sparse vertexCount [ source, true ] + ofList queue DeviceOnly Sparse vertexCount [ source, 1 ] let mutable level = 0 let mutable stop = false @@ -125,8 +125,8 @@ module internal BFS = let singleSourcePushPull - (add: Expr bool option -> bool option>) - (mul: Expr bool option -> bool option>) + (add: Expr int option -> int option>) + (mul: Expr<'a option -> int option -> int option>) (clContext: ClContext) workGroupSize = @@ -135,7 +135,7 @@ module internal BFS = Operations.SpMVInPlace add mul clContext workGroupSize let spMSpV = - Operations.SpMSpVBool add mul clContext workGroupSize + Operations.SpMSpV add mul clContext workGroupSize let zeroCreate = Vector.zeroCreate clContext workGroupSize @@ -149,7 +149,7 @@ module internal BFS = Vector.map2Sparse Mask.complementedOp clContext workGroupSize let fillSubVectorInPlace = - Vector.assignByMaskInPlace (Mask.assign) clContext workGroupSize + Vector.assignByMaskInPlace Mask.assign clContext workGroupSize let toSparse = Vector.toSparse clContext workGroupSize @@ -159,7 +159,7 @@ module internal BFS = ClArray.count Predicates.isSome clContext workGroupSize //Push or pull functions - let getNNZ (queue: MailboxProcessor) (v: ClVector) = + let getNNZ (queue: MailboxProcessor) (v: ClVector) = match v with | ClVector.Sparse v -> v.NNZ | ClVector.Dense v -> countNNZ queue v @@ -169,14 +169,14 @@ module internal BFS = let push nnz size = (float32 nnz) / (float32 size) <= SPARSITY - fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> let vertexCount = matrix.RowCount let levels = zeroCreate queue DeviceOnly vertexCount Dense let mutable frontier = - ofList queue DeviceOnly Sparse vertexCount [ source, true ] + ofList queue DeviceOnly Sparse vertexCount [ source, 1 ] let mutable level = 0 let mutable stop = false diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index 110dddec..92ba3d1b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -28,15 +28,15 @@ let testFixtures (testContext: TestContext) = let bfsSparse = Algorithms.BFS.singleSourceSparse - ArithmeticOperations.boolSumOption - ArithmeticOperations.boolMulOption + ArithmeticOperations.intSumOption + ArithmeticOperations.intMulOption context workGroupSize let bfsPushPull = Algorithms.BFS.singleSourcePushPull - ArithmeticOperations.boolSumOption - ArithmeticOperations.boolMulOption + ArithmeticOperations.intSumOption + ArithmeticOperations.intMulOption context workGroupSize @@ -58,24 +58,19 @@ let testFixtures (testContext: TestContext) = let matrixHost = Utils.createMatrixFromArray2D CSR matrix ((=) 0) - let matrixHostBool = - Utils.createMatrixFromArray2D CSR (Array2D.map (fun x -> x <> 0) matrix) ((=) false) - let matrix = matrixHost.ToDevice context - let matrixBool = matrixHostBool.ToDevice context let res = bfs queue matrix source - let resSparse = bfsSparse queue matrixBool source + let resSparse = bfsSparse queue matrix source - let resPushPull = bfsPushPull queue matrixBool source + let resPushPull = bfsPushPull queue matrix source let resHost = res.ToHost queue let resHostSparse = resSparse.ToHost queue let resHostPushPull = resPushPull.ToHost queue matrix.Dispose queue - matrixBool.Dispose queue res.Dispose queue resSparse.Dispose queue resPushPull.Dispose queue From 735f064d7e89dcad215a60df5d924444178fc8c4 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 16:53:09 +0300 Subject: [PATCH 036/102] PageRank --- .../Algorithms/Algorithms.fs | 5 + .../Algorithms/PageRank.fs | 196 ++++++++++++++++++ .../GraphBLAS-sharp.Backend.fsproj | 1 + .../Quotes/Arithmetic.fs | 13 ++ 4 files changed, 215 insertions(+) create mode 100644 src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index f46a35cd..930bab40 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -14,3 +14,8 @@ module Algorithms = module SSSP = let singleSource = SSSP.run + + module PageRank = + let run = PageRank.run + + let prepareMatrix = PageRank.prepareMatrix diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs new file mode 100644 index 00000000..a751b0e3 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -0,0 +1,196 @@ +namespace GraphBLAS.FSharp.Backend.Algorithms + +open GraphBLAS.FSharp.Backend +open Brahma.FSharp +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Backend.Vector.Dense +open GraphBLAS.FSharp.Objects.ClMatrix +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions + +module internal PageRank = + let alpha = 0.85f + let accuracy = 0.00000001f + + let countOutDegree (clContext: ClContext) workGroupSize = + + let one = + <@ fun (x: float32 option) (_: int option) -> + let mutable res = 0 + + match x with + | Some _ -> res <- 1 + | None -> () + + if res = 0 then None else Some res @> + + let spMV = + Operations.SpMV.runTo ArithmeticOperations.intSumOption one clContext workGroupSize + + let zeroCreate = + GraphBLAS.FSharp.ClArray.zeroCreate clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> + let outDegree: ClArray = + zeroCreate queue DeviceOnly matrix.ColumnCount + + spMV queue matrix outDegree outDegree + + outDegree + + let prepareMatrix (clContext: ClContext) workGroupSize = + + let alpha = 0.85f + + let op = + <@ fun (x: float32 option) y -> + let mutable res = 0.0f + + match x, y with + | Some _, Some y -> res <- alpha / (float32 y) + | Some _, None -> () + | None, Some _ -> () + | None, None -> () + + if res = 0.0f then None else Some res @> + + //TODO: generalize to map2 Matrix x Vector + let multiply = + <@ fun (range: Range1D) (numberOfRows: int) (matrixRowPointers: ClArray) (matrixValues: ClArray) (vectorValues: ClArray) (resultMatrixValues: ClArray) -> + + let i = range.GlobalID0 + let li = range.LocalID0 + let group = i / workGroupSize + + if group < numberOfRows then + let rowStart = matrixRowPointers.[group] + let rowEnd = matrixRowPointers.[group + 1] + + let vectorValue = vectorValues.[group] + let mutable index = rowStart + li + + while index < rowEnd do + let matrixValue = matrixValues.[index] + let resultValue = (%op) (Some matrixValue) vectorValue + + match resultValue with + | Some v -> resultMatrixValues.[index] <- v + | None -> () //This should not be reachable + + index <- index + workGroupSize @> + + let countOutDegree = countOutDegree clContext workGroupSize + + let copy = + GraphBLAS.FSharp.ClArray.copy clContext workGroupSize + + let transpose = + Matrix.CSR.Matrix.transposeInPlace clContext workGroupSize + + let multiply = clContext.Compile multiply + + fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> + + let outDegree = countOutDegree queue matrix + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, matrix.Values.Length) + + let kernel = multiply.GetKernel() + + let ndRange = + Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize) + + queue.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + matrix.RowCount + matrix.RowPointers + matrix.Values + outDegree + resultValues) + ) + + queue.Post(Msg.CreateRunMsg<_, _> kernel) + + outDegree.Free queue + + let newMatrix = + { Context = clContext + RowCount = matrix.RowCount + ColumnCount = matrix.ColumnCount + RowPointers = copy queue DeviceOnly matrix.RowPointers + Columns = copy queue DeviceOnly matrix.Columns + Values = resultValues } + + let transposed = transpose queue DeviceOnly newMatrix + transposed + + let run (clContext: ClContext) workGroupSize = + + let alpha = 0.85f + let accuracy = 0.00000001f + + let minusAndSquare = ArithmeticOperations.minusAndSquare + let plus = ArithmeticOperations.float32SumOption + let mul = ArithmeticOperations.float32MulOption + + let spMVTo = + Operations.SpMV.runTo plus mul clContext workGroupSize + + let addToResult = + Vector.map2InPlace plus clContext workGroupSize + + let subtractAndSquare = + Vector.map2InPlace minusAndSquare clContext workGroupSize + + let reduce = + Vector.reduce <@ (+) @> clContext workGroupSize + + let create = + GraphBLAS.FSharp.ClArray.create clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> + + let vertexCount = matrix.RowCount + + //None is 0 + let mutable rank = create queue DeviceOnly vertexCount None + + let mutable prevRank = + create queue DeviceOnly vertexCount (Some(1.0f / (float32 vertexCount))) + + let mutable errors = create queue DeviceOnly vertexCount None + + let addition = + create queue DeviceOnly vertexCount (Some((1.0f - alpha) / (float32 vertexCount))) + + let mutable error = accuracy + 0.1f + + let mutable i = 0 + + while error > accuracy do + i <- i + 1 + + // rank = matrix*rank + (1 - alpha)/N + spMVTo queue matrix prevRank rank + addToResult queue rank addition rank + + // error + subtractAndSquare queue rank prevRank errors + error <- sqrt <| (reduce queue errors).ToHostAndFree queue + + //Swap vectors + let temp = rank + rank <- prevRank + prevRank <- temp + + prevRank.Free queue + errors.Free queue + addition.Free queue + + rank diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index c90f4cb7..a4268b52 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -69,6 +69,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 5d80a0da..9f5c6985 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -244,3 +244,16 @@ module ArithmeticOperations = | Some x, None -> Some x | None, Some y -> Some y | _ -> None @> + + //PageRank specific + let minusAndSquare = + <@ fun (x: float32 option) (y: float32 option) -> + let mutable res = 0.0f + + match x, y with + | Some f, Some s -> res <- (f - s) * (f - s) + | Some f, None -> res <- f * f + | None, Some s -> res <- s * s + | None, None -> () + + if res = 0.0f then None else Some res @> From 988672ecf23495c43e55c78e64b641a491edb5ab Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 16:57:51 +0300 Subject: [PATCH 037/102] BFS, SSSP, PR benchmarks --- .../Algorithms/BFS.fs | 28 +++- .../Algorithms/PageRank.fs | 129 ++++++++++++++++++ .../GraphBLAS-sharp.Benchmarks.fsproj | 3 +- .../GraphBLAS-sharp.Benchmarks/Program.fs | 4 +- 4 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 5e7050d2..7fea9add 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -12,8 +12,8 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend.Quotes [] -[] -[] +[] +[] [)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, @@ -139,6 +139,30 @@ type BFSWithoutTransferBenchmarkInt32() = static member InputMatrixProvider = Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt" +type BFSPushPullWithoutTransferBenchmarkInt32() = + + inherit WithoutTransferBenchmark( + (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( + Algorithms.SSSP.singleSource, + 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, diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs new file mode 100644 index 00000000..bae5ac66 --- /dev/null +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -0,0 +1,129 @@ +namespace GraphBLAS.FSharp.Benchmarks.Algorithms.PageRank + +open System.IO +open BenchmarkDotNet.Attributes +open GraphBLAS.FSharp +open GraphBLAS.FSharp.IO +open Brahma.FSharp +open Microsoft.FSharp.Core +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Benchmarks +open GraphBLAS.FSharp.Objects + +[] +[] +[] +[)>] +type Benchmarks( + buildFunToBenchmark, + converter: string -> float32, + binaryConverter) + = + + let mutable funToBenchmark = None + let mutable matrix = Unchecked.defaultof> + let mutable matrixPrepared = Unchecked.defaultof> + let mutable matrixHost = Unchecked.defaultof<_> + + member val Result = Unchecked.defaultof> with get,set + + [] + member val OclContextInfo = Unchecked.defaultof with get, set + + [] + member val InputMatrixReader = Unchecked.defaultof with get, set + + member this.OclContext = (fst this.OclContextInfo).ClContext + member this.WorkGroupSize = snd this.OclContextInfo + + member this.Processor = + let p = (fst this.OclContextInfo).Queue + p.Error.Add(fun e -> failwithf "%A" e) + p + + static member AvailableContexts = Utils.availableContexts + + static member InputMatrixProviderBuilder pathToConfig = + let datasetFolder = "" + pathToConfig + |> Utils.getMatricesFilenames + |> Seq.map + (fun matrixFilename -> + printfn "%A" matrixFilename + + match Path.GetExtension matrixFilename with + | ".mtx" -> MtxReader(Utils.getFullPathToMatrix datasetFolder matrixFilename) + | _ -> failwith "Unsupported matrix format") + + member this.FunToBenchmark = + match funToBenchmark with + | None -> + let x = buildFunToBenchmark this.OclContext this.WorkGroupSize + funToBenchmark <- Some x + x + | Some x -> x + + member this.PageRank() = + this.Result <- this.FunToBenchmark this.Processor matrixPrepared + + member this.ClearInputMatrix() = + (matrix :> IDeviceMemObject).Dispose this.Processor + + member this.ClearPreparedMatrix() = + (matrixPrepared :> IDeviceMemObject).Dispose this.Processor + + member this.ClearResult() = this.Result.FreeAndWait this.Processor + + member this.ReadMatrix() = + let converter = + match this.InputMatrixReader.Field with + | Pattern -> binaryConverter + | _ -> converter + + matrixHost <- this.InputMatrixReader.ReadMatrix converter + + member this.LoadMatrixToGPU() = + matrix <- matrixHost.ToCSR.ToDevice this.OclContext + + member this.PrepareMatrix() = + matrixPrepared <- Algorithms.PageRank.prepareMatrix this.OclContext this.WorkGroupSize this.Processor matrix + + abstract member GlobalSetup : unit -> unit + + abstract member IterationCleanup : unit -> unit + + abstract member GlobalCleanup : unit -> unit + + abstract member Benchmark : unit -> unit + +type PageRankWithoutTransferBenchmarkFloat32() = + + inherit Benchmarks( + Algorithms.PageRank.run, + float32, + (fun _ -> float32 <| Utils.nextInt (System.Random())) + ) + + static member InputMatrixProvider = + Benchmarks.InputMatrixProviderBuilder "BFSBenchmarks.txt" + + [] + override this.GlobalSetup() = + this.ReadMatrix() + this.LoadMatrixToGPU() + this.Processor.PostAndReply(Msg.MsgNotifyMe) + this.PrepareMatrix() + this.ClearInputMatrix() + + [] + override this.IterationCleanup() = + this.ClearResult() + + [] + override this.GlobalCleanup() = + this.ClearPreparedMatrix() + + [] + override this.Benchmark() = + this.PageRank() + this.Processor.PostAndReply(Msg.MsgNotifyMe) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index 6e8486b0..75ddfc15 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -25,6 +25,7 @@ + diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 5a3ccf37..0655cd45 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,7 +4,9 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof |] + BenchmarkSwitcher [| typeof + typeof + typeof |] benchmarks.Run argv |> ignore 0 From 78c796436be4908306d641f66d8698bcac46f284 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 19:10:47 +0300 Subject: [PATCH 038/102] Vector.create --- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 33 ++++++++++---------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index f02798d6..bbba4404 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -15,29 +15,30 @@ open GraphBLAS.FSharp.Backend.Vector [] module Vector = /// - /// Builds vector of given format with fixed size and fills it with the default values of desired type. + /// Builds vector of given format with fixed size and fills it with the given value. /// /// OpenCL context. /// Should be a power of 2 and greater than 1. - let zeroCreate (clContext: ClContext) workGroupSize = - let zeroCreate = - ClArray.zeroCreate clContext workGroupSize + let create (clContext: ClContext) workGroupSize = + let create = ClArray.create clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode size format -> + fun (processor: MailboxProcessor<_>) allocationMode size format value -> match format with - | Sparse -> - ClVector.Sparse - { Context = clContext - Indices = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, [| 0 |]) - Values = - clContext.CreateClArrayWithSpecificAllocationMode( - allocationMode, - [| Unchecked.defaultof<'a> |] - ) // TODO empty vector - Size = size } + | Sparse -> failwith "Attempting to create full sparse vector" | Dense -> ClVector.Dense - <| zeroCreate processor allocationMode size + <| create processor allocationMode size value + + /// + /// Builds vector of given format with fixed size and fills it with the default values of desired type. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let zeroCreate (clContext: ClContext) workGroupSize = + let create = create clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode size format -> + create processor allocationMode size format None /// /// Builds vector of given format with fixed size and fills it with the values from the given list. From 7e914f1e5a05abf7371219c849ce3cca2158392d Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 19:43:42 +0300 Subject: [PATCH 039/102] PageRank on ClMatrix and ClVector --- .../Algorithms/PageRank.fs | 21 +++-- .../Algorithms/PageRank.fs | 92 ++++++++++--------- 2 files changed, 59 insertions(+), 54 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index bae5ac66..f01b8041 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -17,15 +17,16 @@ open GraphBLAS.FSharp.Objects type Benchmarks( buildFunToBenchmark, converter: string -> float32, - binaryConverter) + binaryConverter, + buildMatrix) = let mutable funToBenchmark = None - let mutable matrix = Unchecked.defaultof> - let mutable matrixPrepared = Unchecked.defaultof> + let mutable matrix = Unchecked.defaultof> + let mutable matrixPrepared = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> - member val Result = Unchecked.defaultof> with get,set + member val Result = Unchecked.defaultof> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -67,12 +68,12 @@ type Benchmarks( this.Result <- this.FunToBenchmark this.Processor matrixPrepared member this.ClearInputMatrix() = - (matrix :> IDeviceMemObject).Dispose this.Processor + matrix.Dispose this.Processor member this.ClearPreparedMatrix() = - (matrixPrepared :> IDeviceMemObject).Dispose this.Processor + matrixPrepared.Dispose this.Processor - member this.ClearResult() = this.Result.FreeAndWait this.Processor + member this.ClearResult() = this.Result.Dispose this.Processor member this.ReadMatrix() = let converter = @@ -83,7 +84,7 @@ type Benchmarks( matrixHost <- this.InputMatrixReader.ReadMatrix converter member this.LoadMatrixToGPU() = - matrix <- matrixHost.ToCSR.ToDevice this.OclContext + matrix <- buildMatrix this.OclContext matrixHost member this.PrepareMatrix() = matrixPrepared <- Algorithms.PageRank.prepareMatrix this.OclContext this.WorkGroupSize this.Processor matrix @@ -101,8 +102,8 @@ type PageRankWithoutTransferBenchmarkFloat32() = inherit Benchmarks( Algorithms.PageRank.run, float32, - (fun _ -> float32 <| Utils.nextInt (System.Random())) - ) + (fun _ -> float32 <| Utils.nextInt (System.Random())), + (fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context)) static member InputMatrixProvider = Benchmarks.InputMatrixProviderBuilder "BFSBenchmarks.txt" diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index a751b0e3..ed121244 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -1,5 +1,6 @@ namespace GraphBLAS.FSharp.Backend.Algorithms +open GraphBLAS.FSharp open GraphBLAS.FSharp.Backend open Brahma.FSharp open GraphBLAS.FSharp.Objects @@ -86,49 +87,52 @@ module internal PageRank = let copy = GraphBLAS.FSharp.ClArray.copy clContext workGroupSize - let transpose = + let transposeInPlace = Matrix.CSR.Matrix.transposeInPlace clContext workGroupSize let multiply = clContext.Compile multiply - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) -> + + match matrix with + | ClMatrix.CSR matrix -> - let outDegree = countOutDegree queue matrix + let outDegree = countOutDegree queue matrix - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, matrix.Values.Length) + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, matrix.Values.Length) - let kernel = multiply.GetKernel() + let kernel = multiply.GetKernel() - let ndRange = - Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize) + let ndRange = + Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize) - queue.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - matrix.RowCount - matrix.RowPointers - matrix.Values - outDegree - resultValues) - ) + queue.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + matrix.RowCount + matrix.RowPointers + matrix.Values + outDegree + resultValues) + ) - queue.Post(Msg.CreateRunMsg<_, _> kernel) + queue.Post(Msg.CreateRunMsg<_, _> kernel) - outDegree.Free queue + outDegree.Free queue - let newMatrix = - { Context = clContext - RowCount = matrix.RowCount - ColumnCount = matrix.ColumnCount - RowPointers = copy queue DeviceOnly matrix.RowPointers - Columns = copy queue DeviceOnly matrix.Columns - Values = resultValues } + let newMatrix = + { Context = clContext + RowCount = matrix.RowCount + ColumnCount = matrix.ColumnCount + RowPointers = copy queue DeviceOnly matrix.RowPointers + Columns = copy queue DeviceOnly matrix.Columns + Values = resultValues } - let transposed = transpose queue DeviceOnly newMatrix - transposed + transposeInPlace queue DeviceOnly newMatrix |> ClMatrix.CSR + | _ -> failwith "Not implemented" let run (clContext: ClContext) workGroupSize = @@ -140,34 +144,34 @@ module internal PageRank = let mul = ArithmeticOperations.float32MulOption let spMVTo = - Operations.SpMV.runTo plus mul clContext workGroupSize + Operations.SpMVInPlace plus mul clContext workGroupSize let addToResult = - Vector.map2InPlace plus clContext workGroupSize + GraphBLAS.FSharp.Vector.map2InPlace plus clContext workGroupSize let subtractAndSquare = - Vector.map2InPlace minusAndSquare clContext workGroupSize + GraphBLAS.FSharp.Vector.map2To minusAndSquare clContext workGroupSize let reduce = - Vector.reduce <@ (+) @> clContext workGroupSize + GraphBLAS.FSharp.Vector.reduce <@ (+) @> clContext workGroupSize let create = - GraphBLAS.FSharp.ClArray.create clContext workGroupSize + GraphBLAS.FSharp.Vector.create clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) -> let vertexCount = matrix.RowCount //None is 0 - let mutable rank = create queue DeviceOnly vertexCount None + let mutable rank = create queue DeviceOnly vertexCount Dense None let mutable prevRank = - create queue DeviceOnly vertexCount (Some(1.0f / (float32 vertexCount))) + create queue DeviceOnly vertexCount Dense (Some(1.0f / (float32 vertexCount))) - let mutable errors = create queue DeviceOnly vertexCount None + let mutable errors = create queue DeviceOnly vertexCount Dense None let addition = - create queue DeviceOnly vertexCount (Some((1.0f - alpha) / (float32 vertexCount))) + create queue DeviceOnly vertexCount Dense (Some((1.0f - alpha) / (float32 vertexCount))) let mutable error = accuracy + 0.1f @@ -178,7 +182,7 @@ module internal PageRank = // rank = matrix*rank + (1 - alpha)/N spMVTo queue matrix prevRank rank - addToResult queue rank addition rank + addToResult queue rank addition // error subtractAndSquare queue rank prevRank errors @@ -189,8 +193,8 @@ module internal PageRank = rank <- prevRank prevRank <- temp - prevRank.Free queue - errors.Free queue - addition.Free queue + prevRank.Dispose queue + errors.Dispose queue + addition.Dispose queue rank From a38aa209df7a3ec6ce4e972dcff273be38405d0f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 20:23:48 +0300 Subject: [PATCH 040/102] PageRank test case --- .../Backend/Algorithms/PageRank.fs | 69 +++++++++++++++++++ .../GraphBLAS-sharp.Tests.fsproj | 1 + 2 files changed, 70 insertions(+) create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs new file mode 100644 index 00000000..7e6c394f --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -0,0 +1,69 @@ +module GraphBLAS.FSharp.Tests.Backend.Algorithms.PageRank + +open Expecto +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Objects.ClVectorExtensions +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.MatrixExtensions + +let testFixtures (testContext: TestContext) = + [ let context = testContext.ClContext + let queue = testContext.Queue + let workGroupSize = Utils.defaultWorkGroupSize + + let testName = + sprintf "Test on %A" testContext.ClContext + + let pageRank = + Algorithms.PageRank.run context workGroupSize + + testCase testName + <| fun () -> + + let matrix = Array2D.zeroCreate 4 4 + + matrix.[0, 1] <- 1f + matrix.[0, 2] <- 1f + matrix.[0, 3] <- 1f + matrix.[1, 2] <- 1f + matrix.[1, 3] <- 1f + matrix.[2, 0] <- 1f + matrix.[3, 2] <- 1f + matrix.[3, 0] <- 1f + + let matrixHost = + Utils.createMatrixFromArray2D CSR matrix ((=) 0f) + + let matrix = matrixHost.ToDevice context + + let preparedMatrix = + Algorithms.PageRank.prepareMatrix context workGroupSize queue matrix + + let res = pageRank queue preparedMatrix + + let resHost = res.ToHost queue + + preparedMatrix.Dispose queue + matrix.Dispose queue + res.Dispose queue + + let expected = + [| 0.3681506515f + 0.1418093443f + 0.2879616022f + 0.2020783126f |] + + match resHost with + | Vector.Dense resHost -> + let actual = resHost |> Utils.unwrapOptionArray 0f + + for i in 0 .. actual.Length - 1 do + Expect.isTrue (Utils.float32IsEqual actual.[i] expected.[i]) "Values should be equal" + + | _ -> failwith "Not implemented" ] + +let tests = + TestCases.gpuTests "Bfs tests" testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index cdc0d28f..870cf599 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -19,6 +19,7 @@ + From f1a6f24b9f1673b69be82d6b5adcfa93837e8f7f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 22:21:14 +0300 Subject: [PATCH 041/102] Formatting --- src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index ed121244..049aa55a 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -131,7 +131,8 @@ module internal PageRank = Columns = copy queue DeviceOnly matrix.Columns Values = resultValues } - transposeInPlace queue DeviceOnly newMatrix |> ClMatrix.CSR + transposeInPlace queue DeviceOnly newMatrix + |> ClMatrix.CSR | _ -> failwith "Not implemented" let run (clContext: ClContext) workGroupSize = @@ -163,12 +164,14 @@ module internal PageRank = let vertexCount = matrix.RowCount //None is 0 - let mutable rank = create queue DeviceOnly vertexCount Dense None + let mutable rank = + create queue DeviceOnly vertexCount Dense None let mutable prevRank = create queue DeviceOnly vertexCount Dense (Some(1.0f / (float32 vertexCount))) - let mutable errors = create queue DeviceOnly vertexCount Dense None + let mutable errors = + create queue DeviceOnly vertexCount Dense None let addition = create queue DeviceOnly vertexCount Dense (Some((1.0f - alpha) / (float32 vertexCount))) From edc5a73d87c1aa6650c0ea54a3964f2e17215fc4 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Mon, 16 Oct 2023 23:49:33 +0300 Subject: [PATCH 042/102] Vector.create tests --- .../Vector/{ZeroCreate.fs => Create.fs} | 20 +++++++++++-------- .../GraphBLAS-sharp.Tests.fsproj | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) rename tests/GraphBLAS-sharp.Tests/Backend/Vector/{ZeroCreate.fs => Create.fs} (81%) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Create.fs similarity index 81% rename from tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs rename to tests/GraphBLAS-sharp.Tests/Backend/Vector/Create.fs index 79c1e4d9..145731d5 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Create.fs @@ -35,19 +35,23 @@ let correctnessGenericTest<'a when 'a: struct and 'a: equality> (vectorSize: int) = - let vectorSize = abs vectorSize + try + let vectorSize = abs vectorSize - if vectorSize > 0 then - let q = case.TestContext.Queue + if vectorSize > 0 then + let q = case.TestContext.Queue - let clVector = - zeroCreate q HostInterop vectorSize case.Format + let clVector = + zeroCreate q HostInterop vectorSize case.Format - let hostVector = clVector.ToHost q + let hostVector = clVector.ToHost q - clVector.Dispose q + clVector.Dispose q - checkResult vectorSize hostVector + checkResult vectorSize hostVector + with + | ex when ex.Message = "Attempting to create full sparse vector" -> () + | ex -> raise ex let createTest<'a> case = let getCorrectnessTestName dataType = diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index 870cf599..80f70253 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -63,7 +63,7 @@ - + From 6f6c62963abf92e75746617f9696511c5bd65328 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 24 Oct 2023 13:06:20 +0300 Subject: [PATCH 043/102] Rename --- src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs | 2 +- src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index 930bab40..227c443f 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -13,7 +13,7 @@ module Algorithms = let singleSourcePushPull = BFS.singleSourcePushPull module SSSP = - let singleSource = SSSP.run + let run = SSSP.run module PageRank = let run = PageRank.run diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 9f5c6985..60654d23 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -246,7 +246,7 @@ module ArithmeticOperations = | _ -> None @> //PageRank specific - let minusAndSquare = + let squareOfDifference = <@ fun (x: float32 option) (y: float32 option) -> let mutable res = 0.0f From cadb1048cd461452d8aec312e91db9bca0045d0a Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 24 Oct 2023 13:08:39 +0300 Subject: [PATCH 044/102] Pass accurasy to PR --- benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs | 4 +++- src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index f01b8041..70273357 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -26,6 +26,8 @@ type Benchmarks( let mutable matrixPrepared = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> + let accuracy = 0.00000001f + member val Result = Unchecked.defaultof> with get,set [] @@ -65,7 +67,7 @@ type Benchmarks( | Some x -> x member this.PageRank() = - this.Result <- this.FunToBenchmark this.Processor matrixPrepared + this.Result <- this.FunToBenchmark this.Processor matrixPrepared accuracy member this.ClearInputMatrix() = matrix.Dispose this.Processor diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index 049aa55a..4ed17d6a 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -1,4 +1,4 @@ -namespace GraphBLAS.FSharp.Backend.Algorithms +namespace GraphBLAS.FSharp.Backend.Algorithms open GraphBLAS.FSharp open GraphBLAS.FSharp.Backend @@ -13,7 +13,6 @@ open GraphBLAS.FSharp.Objects.ClCellExtensions module internal PageRank = let alpha = 0.85f - let accuracy = 0.00000001f let countOutDegree (clContext: ClContext) workGroupSize = @@ -159,7 +158,7 @@ module internal PageRank = let create = GraphBLAS.FSharp.Vector.create clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) accuracy -> let vertexCount = matrix.RowCount From baa0c0bb7a3b649ca9bd1c3acadfd9ccc8704817 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 24 Oct 2023 13:14:55 +0300 Subject: [PATCH 045/102] Private functiona and constants --- .../Algorithms/PageRank.fs | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index 4ed17d6a..d806b4fe 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -1,4 +1,4 @@ -namespace GraphBLAS.FSharp.Backend.Algorithms +namespace GraphBLAS.FSharp.Backend.Algorithms open GraphBLAS.FSharp open GraphBLAS.FSharp.Backend @@ -14,7 +14,7 @@ open GraphBLAS.FSharp.Objects.ClCellExtensions module internal PageRank = let alpha = 0.85f - let countOutDegree (clContext: ClContext) workGroupSize = + let private countOutDegree (clContext: ClContext) workGroupSize = let one = <@ fun (x: float32 option) (_: int option) -> @@ -42,19 +42,18 @@ module internal PageRank = let prepareMatrix (clContext: ClContext) workGroupSize = - let alpha = 0.85f + //Passing global variable to kernel in Brahma is not possible + let alpha = alpha let op = <@ fun (x: float32 option) y -> - let mutable res = 0.0f + let mutable res = None match x, y with - | Some _, Some y -> res <- alpha / (float32 y) - | Some _, None -> () - | None, Some _ -> () - | None, None -> () + | Some _, Some y -> res <- Some(alpha / (float32 y)) + | _ -> () - if res = 0.0f then None else Some res @> + res @> //TODO: generalize to map2 Matrix x Vector let multiply = @@ -136,10 +135,7 @@ module internal PageRank = let run (clContext: ClContext) workGroupSize = - let alpha = 0.85f - let accuracy = 0.00000001f - - let minusAndSquare = ArithmeticOperations.minusAndSquare + let squareOfDifference = ArithmeticOperations.squareOfDifference let plus = ArithmeticOperations.float32SumOption let mul = ArithmeticOperations.float32MulOption @@ -150,7 +146,7 @@ module internal PageRank = GraphBLAS.FSharp.Vector.map2InPlace plus clContext workGroupSize let subtractAndSquare = - GraphBLAS.FSharp.Vector.map2To minusAndSquare clContext workGroupSize + GraphBLAS.FSharp.Vector.map2To squareOfDifference clContext workGroupSize let reduce = GraphBLAS.FSharp.Vector.reduce <@ (+) @> clContext workGroupSize From 15f415e705e44a160186c3819d8a491c6a37cd9e Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 24 Oct 2023 13:17:30 +0300 Subject: [PATCH 046/102] PageRank test property --- .../Backend/Algorithms/PageRank.fs | 123 ++++++++++++------ 1 file changed, 86 insertions(+), 37 deletions(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs index 7e6c394f..b88c9383 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -2,15 +2,75 @@ open Expecto open GraphBLAS.FSharp -open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Objects.MatrixExtensions + +let private alpha = 0.85f +let private accuracy = 0.00001f + +let prepareNaive (matrix: float32 [,]) = + let result = Array2D.copy matrix + let rowCount = Array2D.length1 matrix + let outDegrees = Array.zeroCreate rowCount + + //Count degree + Array2D.iteri (fun r c v -> outDegrees.[r] <- outDegrees.[r] + (if v <> 0f then 1f else 0f)) matrix + + //Set value + Array2D.iteri + (fun r c v -> + result.[r, c] <- + if v <> 0f then + alpha / outDegrees.[r] + else + 0f) + matrix + + //Transpose + Array2D.iteri + (fun r c _ -> + if r > c then + let temp = result.[r, c] + result.[r, c] <- result.[c, r] + result.[c, r] <- temp) + matrix + + result + +let pageRankNaive (matrix: float32 [,]) = + let rowCount = Array2D.length1 matrix + let mutable result = Array.zeroCreate rowCount + + let mutable prev = + Array.create rowCount (1f / (float32 rowCount)) + + let mutable error = accuracy + 1f + let addConst = (1f - alpha) / (float32 rowCount) + + while (error > accuracy) do + for r in 0 .. rowCount - 1 do + result [ r ] <- 0f + + for c in 0 .. rowCount - 1 do + result.[r] <- result.[r] + matrix.[r, c] * prev.[c] + + result.[r] <- result.[r] + addConst + + error <- + sqrt + <| Array.fold2 (fun e x1 x2 -> e + (x1 - x2) * (x1 - x2)) 0f result prev + + let temp = result + result <- prev + prev <- temp + + prev let testFixtures (testContext: TestContext) = - [ let context = testContext.ClContext + [ let config = Utils.undirectedAlgoConfig + let context = testContext.ClContext let queue = testContext.Queue let workGroupSize = Utils.defaultWorkGroupSize @@ -20,50 +80,39 @@ let testFixtures (testContext: TestContext) = let pageRank = Algorithms.PageRank.run context workGroupSize - testCase testName - <| fun () -> - - let matrix = Array2D.zeroCreate 4 4 - - matrix.[0, 1] <- 1f - matrix.[0, 2] <- 1f - matrix.[0, 3] <- 1f - matrix.[1, 2] <- 1f - matrix.[1, 3] <- 1f - matrix.[2, 0] <- 1f - matrix.[3, 2] <- 1f - matrix.[3, 0] <- 1f - + testPropertyWithConfig config testName + <| fun (matrix: float32 [,]) -> let matrixHost = Utils.createMatrixFromArray2D CSR matrix ((=) 0f) - let matrix = matrixHost.ToDevice context + if matrixHost.NNZ > 0 then + let preparedMatrixExpected = prepareNaive matrix + + let expected = pageRankNaive preparedMatrixExpected - let preparedMatrix = - Algorithms.PageRank.prepareMatrix context workGroupSize queue matrix + let matrix = matrixHost.ToDevice context - let res = pageRank queue preparedMatrix + let preparedMatrix = + Algorithms.PageRank.prepareMatrix context workGroupSize queue matrix - let resHost = res.ToHost queue + let res = pageRank queue preparedMatrix accuracy - preparedMatrix.Dispose queue - matrix.Dispose queue - res.Dispose queue + let resHost = res.ToHost queue - let expected = - [| 0.3681506515f - 0.1418093443f - 0.2879616022f - 0.2020783126f |] + preparedMatrix.Dispose queue + matrix.Dispose queue + res.Dispose queue - match resHost with - | Vector.Dense resHost -> - let actual = resHost |> Utils.unwrapOptionArray 0f + match resHost with + | Vector.Dense resHost -> + let actual = resHost |> Utils.unwrapOptionArray 0f - for i in 0 .. actual.Length - 1 do - Expect.isTrue (Utils.float32IsEqual actual.[i] expected.[i]) "Values should be equal" + for i in 0 .. actual.Length - 1 do + Expect.isTrue + ((abs (actual.[i] - expected.[i])) < accuracy) + (sprintf "Values should be equal. Expected %A, actual %A" expected.[i] actual.[i]) - | _ -> failwith "Not implemented" ] + | _ -> failwith "Not implemented" ] let tests = - TestCases.gpuTests "Bfs tests" testFixtures + TestCases.gpuTests "PageRank tests" testFixtures From 39361c4d9158a87140ba23735518c3dae149cf94 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 24 Oct 2023 13:22:05 +0300 Subject: [PATCH 047/102] Fix formatting bug --- tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs index b88c9383..72f30025 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -51,7 +51,7 @@ let pageRankNaive (matrix: float32 [,]) = while (error > accuracy) do for r in 0 .. rowCount - 1 do - result [ r ] <- 0f + result.[r] <- 0f for c in 0 .. rowCount - 1 do result.[r] <- result.[r] + matrix.[r, c] * prev.[c] From e54829400b4206ea29880c2ed386cb49219b357a Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Tue, 24 Oct 2023 13:24:21 +0300 Subject: [PATCH 048/102] Benchmark rename --- benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 7fea9add..a0c10cb6 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -154,7 +154,7 @@ type BFSPushPullWithoutTransferBenchmarkInt32() = type SSSPWithoutTransferBenchmarkInt32() = inherit WithoutTransferBenchmark( - Algorithms.SSSP.singleSource, + Algorithms.SSSP.run, int32, (fun _ -> Utils.nextInt (System.Random())), 0, From da5cb5e8479f1a266bc266234bbb234fe92a306f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 5 Nov 2023 18:00:33 +0300 Subject: [PATCH 049/102] Matrix loader memory optimization --- src/GraphBLAS-sharp/IO/MtxReader.fs | 72 ++++++++++++++++------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/src/GraphBLAS-sharp/IO/MtxReader.fs b/src/GraphBLAS-sharp/IO/MtxReader.fs index f25ce8c0..fc68be31 100644 --- a/src/GraphBLAS-sharp/IO/MtxReader.fs +++ b/src/GraphBLAS-sharp/IO/MtxReader.fs @@ -68,40 +68,46 @@ type MtxReader(pathToFile: string) = let sortedData = match this.Symmetry with | General -> - [ 0 .. nnz - 1 ] - |> List.map (fun _ -> streamReader.ReadLine().Split(' ')) - |> Array.ofList - |> Array.Parallel.map - (fun line -> - let i = int line.[0] - let j = int line.[1] - - let v = - converter - <| if line.Length > 2 then line.[2] else "" - - struct (pack i j, v)) - |> Array.sortBy (fun struct (packedIndex, _) -> packedIndex) + let result = + [| 0 .. nnz - 1 |] + |> Array.map + (fun _ -> + let line = streamReader.ReadLine().Split(' ') + + let i = int line.[0] + let j = int line.[1] + + let v = + converter + <| if line.Length > 2 then line.[2] else "" + + struct (pack i j, v)) + + Array.sortInPlaceBy (fun struct (packedIndex, _) -> packedIndex) result + result | Symmetric -> - [ 0 .. nnz - 1 ] - |> List.map (fun _ -> streamReader.ReadLine().Split(' ')) - |> Array.ofList - |> Array.Parallel.map - (fun line -> - let i = int line.[0] - let j = int line.[1] - - let v = - converter - <| if line.Length > 2 then line.[2] else "" - - if i = j then - [| struct (pack i j, v) |] - else - [| struct (pack i j, v) - struct (pack j i, v) |]) - |> Array.concat - |> Array.sortBy (fun struct (packedIndex, _) -> packedIndex) + let result = + [| 0 .. nnz - 1 |] + |> Array.map + (fun _ -> + let line = streamReader.ReadLine().Split(' ') + + let i = int line.[0] + let j = int line.[1] + + let v = + converter + <| if line.Length > 2 then line.[2] else "" + + if i = j then + [| struct (pack i j, v) |] + else + [| struct (pack i j, v) + struct (pack j i, v) |]) + |> Array.concat + + Array.sortInPlaceBy (fun struct (packedIndex, _) -> packedIndex) result + result | _ -> failwith <| sprintf "This symmetry processing is not implemented: %A" this.Symmetry From 4875a3cbf3db3e59b46af71a65e1918ab9a965e6 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 5 Nov 2023 18:01:02 +0300 Subject: [PATCH 050/102] Correct context config --- benchmarks/GraphBLAS-sharp.Benchmarks/Configs/Context.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/Context.txt b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/Context.txt index 04f1c08e..dc8e8842 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/Context.txt +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/Context.txt @@ -1,3 +1,3 @@ -NVIDIA* +AMD* Gpu -32 +64 From e6bae88db215e0afae15b6c464155597b7bb6932 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 5 Nov 2023 18:10:00 +0300 Subject: [PATCH 051/102] Absolute path in bennchmark script --- .../GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt | 2 +- benchmarks/GraphBLAS-sharp.Benchmarks/Scripts/Benchmark.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt index 6161abd9..708032bc 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt @@ -1 +1 @@ -BFSBenchmark \ No newline at end of file +BFSWithoutTransfer diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Scripts/Benchmark.py b/benchmarks/GraphBLAS-sharp.Benchmarks/Scripts/Benchmark.py index d3bf7559..a67cdbe6 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Scripts/Benchmark.py +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Scripts/Benchmark.py @@ -7,8 +7,8 @@ from dataclasses import dataclass -ROOT = pathlib.Path(__file__).parent.parent.parent.parent -BENCHMARKS = pathlib.Path(__file__).parent.parent +ROOT = pathlib.Path(__file__).resolve().parent.parent.parent.parent +BENCHMARKS = pathlib.Path(__file__).resolve().parent.parent CONFIGS = BENCHMARKS / "Configs" BINARIES = BENCHMARKS / "bin" / "Release" / "net7.0" RESULTS = ROOT / "BenchmarkDotNet.Artifacts" / "results" From 12dd993096665909a79ffb3e1fb9c636c9118349 Mon Sep 17 00:00:00 2001 From: Kirill <71129570+kirillgarbar@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:14:05 +0300 Subject: [PATCH 052/102] New file path for charts --- .github/workflows/build-and-benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-benchmark.yml b/.github/workflows/build-and-benchmark.yml index 2bde3398..d7225206 100644 --- a/.github/workflows/build-and-benchmark.yml +++ b/.github/workflows/build-and-benchmark.yml @@ -36,7 +36,7 @@ jobs: with: name: BFS tool: 'benchmarkdotnet' - output-file-path: BenchmarkDotNet.Artifacts/results/GraphBLAS.FSharp.Benchmarks.BFSWithoutTransferBenchmarkInt32-report-brief.json + output-file-path: BenchmarkDotNet.Artifacts/results/GraphBLAS.FSharp.Benchmarks.Algorithms.BFS.BFSWithoutTransferBenchmarkInt32-report-brief.json # Access token to deploy GitHub Pages branch github-token: ${{ secrets._GITHUB_TOKEN }} # Push and deploy GitHub pages branch automatically From 21992877295d27c914387146ab635e5da309ae6a Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Fri, 10 Nov 2023 18:15:08 +0300 Subject: [PATCH 053/102] add: matrix intersect --- .../GraphBLAS-sharp.Backend.fsproj | 1 + .../Matrix/COO/Intersect.fs | 64 +++++++++++++++++++ .../Matrix/COO/Matrix.fs | 13 +++- src/GraphBLAS-sharp.Backend/Quotes/Search.fs | 30 +++++++++ 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index a4268b52..e46ea5d8 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -53,6 +53,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs new file mode 100644 index 00000000..226384f0 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs @@ -0,0 +1,64 @@ +namespace GraphBLAS.FSharp.Backend.Matrix.COO + +open Brahma.FSharp +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Objects.ClContextExtensions + +module internal Intersect = + let findIntersectionByKeys (clContext: ClContext) workGroupSize = + + let findIntersection = + <@ fun (ndRange: Range1D) (leftNNZ: int) (rightNNZ: int) (leftRows: ClArray) (leftColumns: ClArray) (rightRows: ClArray) (rightColumns: ClArray) (bitmap: ClArray) -> + + let gid = ndRange.GlobalID0 + let bitmapSize = min leftNNZ rightNNZ + + if gid < bitmapSize then + + let row, column, rows, columns = + if rightNNZ >= leftNNZ then + leftRows.[gid], leftColumns.[gid], leftRows, leftColumns + else + rightRows.[gid], rightColumns.[gid], rightRows, rightColumns + + let index: uint64 = ((uint64 row) <<< 32) ||| (uint64 column) + + let intersect = (%Search.Bin.existsByKey2D) bitmapSize index rows columns + + if intersect then + bitmap.[gid] <- 1 + else + bitmap.[gid] <- 0 @> + + let kernel = + clContext.Compile <| findIntersection + + fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> + + let bitmapSize = min leftMatrix.NNZ rightMatrix.NNZ + + let bitmap = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, bitmapSize) + + let ndRange = Range1D.CreateValid(bitmapSize, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + leftMatrix.NNZ + rightMatrix.NNZ + leftMatrix.Rows + leftMatrix.Columns + rightMatrix.Rows + rightMatrix.Columns + bitmap) + ) + + processor.Post(Msg.CreateRunMsg<_, _> kernel) + + bitmap diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 327a1b45..b4960c1c 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -197,8 +197,8 @@ module Matrix = /// /// Transposes the given matrix and returns result as a new matrix. /// - ///OpenCL context. - ///Should be a power of 2 and greater than 1. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let transpose (clContext: ClContext) workGroupSize = let transposeInPlace = transposeInPlace clContext workGroupSize @@ -216,3 +216,12 @@ module Matrix = Columns = copy queue allocationMode matrix.Columns Values = copyData queue allocationMode matrix.Values } |> transposeInPlace queue + + /// + /// Build a bitmap. Maps non-zero elements of the matrix with minimum nnz to 1 + /// if the second matrix has non zero element under the same row and column pair, otherwise 0. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let findIntersectionByKeys (clContext: ClContext) workGroupSize = + Intersect.findIntersectionByKeys clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs index 183d3e4c..55600257 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs @@ -96,6 +96,36 @@ module Search = result @> + /// + /// Searches value in array by two keys. + /// In case there is a value at the given keys position, it is returned. + /// + let existsByKey2D<'a> = + <@ fun length sourceIndex (rowIndices: ClArray) (columnIndices: ClArray) -> + + let mutable leftEdge = 0 + let mutable rightEdge = length - 1 + + let mutable result = false + + while leftEdge <= rightEdge do + let middleIdx = (leftEdge + rightEdge) / 2 + + let currentIndex: uint64 = + ((uint64 rowIndices.[middleIdx]) <<< 32) + ||| (uint64 columnIndices.[middleIdx]) + + if sourceIndex = currentIndex then + result <- true + + rightEdge <- -1 // TODO() break + elif sourceIndex < currentIndex then + rightEdge <- middleIdx - 1 + else + leftEdge <- middleIdx + 1 + + result @> + /// /// Find lower position of item in array. /// From 00bdd5a7549fddcfa942b01e5dfee4ac48aebb4b Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Tue, 14 Nov 2023 20:22:56 +0300 Subject: [PATCH 054/102] add: msbfs levels --- .../Algorithms/MSBFS.fs | 136 ++++++++++++++++++ src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 111 ++++++++++++++ src/GraphBLAS-sharp.Backend/Common/Map.fs | 30 ++++ .../GraphBLAS-sharp.Backend.fsproj | 1 + .../Matrix/COO/Intersect.fs | 15 +- src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs | 1 - .../Matrix/COO/Matrix.fs | 32 ++++- .../Matrix/COO/Merge.fs | 53 ++++++- .../Matrix/LIL/Matrix.fs | 7 + src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs | 66 +++++++-- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 5 +- .../Quotes/Arithmetic.fs | 3 + .../Vector/Dense/Vector.fs | 31 ++++ .../Vector/Sparse/Vector.fs | 22 +++ src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 43 +----- 15 files changed, 487 insertions(+), 69 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs new file mode 100644 index 00000000..4605b3f8 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -0,0 +1,136 @@ +namespace GraphBLAS.FSharp.Backend.Algorithms + +open Brahma.FSharp +open FSharp.Quotations +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClMatrix +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Backend.Matrix.LIL +open GraphBLAS.FSharp.Backend.Matrix.COO + +module internal MSBFS = + module Levels = + let private updateFront (clContext: ClContext) workGroupSize = + + let excludeValues = ClArray.excludeElements clContext workGroupSize + + let excludeIndices = ClArray.excludeElements clContext workGroupSize + + fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> + + let newRows = excludeIndices queue allocationMode intersection front.Rows + + let newColumns = excludeIndices queue allocationMode intersection front.Columns + + let newValues = excludeValues queue allocationMode intersection front.Values + + match newRows, newColumns, newValues with + | Some rows, Some columns, Some values -> + { Context = clContext + Rows = rows + Columns = columns + Values = values + RowCount = front.RowCount + ColumnCount = front.ColumnCount } + |> Some + | _ -> None + + let private updateFrontAndLevels (clContext: ClContext) workGroupSize = + + let updateFront = updateFront clContext workGroupSize + + let mergeDisjoint = Matrix.mergeDisjoint clContext workGroupSize + + let findIntersection = Intersect.findKeysIntersection clContext workGroupSize + + fun (queue: MailboxProcessor<_>) allocationMode (levels: ClMatrix.COO<_>) (front: ClMatrix.COO<_>) -> + + // Find intersection of levels and front indices. + let intersection = findIntersection queue DeviceOnly front levels + + // Remove mutual elements + let newFront = updateFront queue allocationMode front intersection + + intersection.Free queue + + match newFront with + | Some f -> + // Update levels + let newLevels = mergeDisjoint queue levels f + newLevels, newFront + | _ -> levels, None + + let run<'a when 'a: struct> + (add: Expr int -> int option>) + (mul: Expr<'a -> int -> int option>) + (clContext: ClContext) + workGroupSize + = + + let spGeMM = + Operations.SpGeMM.expand add mul clContext workGroupSize + + let toCSRInPlace = Matrix.toCSRInPlace clContext workGroupSize + + let updateFrontAndLevels = updateFrontAndLevels clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> + let vertexCount = matrix.RowCount + let sourceVertexCount = source.Length + + let startMatrix = + source + |> List.mapi (fun i vertex -> i, vertex, 1) + + let mutable levels = + startMatrix + |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount + + let mutable front = + startMatrix + |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount + |> toCSRInPlace queue DeviceOnly + + let mutable level = 0 + let mutable stop = false + + while not stop do + level <- level + 1 + + //Getting new frontier + match spGeMM queue DeviceOnly matrix (ClMatrix.CSR front) with + | None -> + front.Dispose queue + stop <- true + | Some newFrontier -> + front.Dispose queue + //Filtering visited vertices + match updateFrontAndLevels queue DeviceOnly levels newFrontier with + | l, Some f -> + front <- toCSRInPlace queue DeviceOnly f + levels.Dispose queue + levels <- l + newFrontier.Dispose queue + | _, None -> + stop <- true + newFrontier.Dispose queue + + levels + + let runSingleSourceMultipleTimes<'a when 'a: struct> + (add: Expr int option -> int option>) + (mul: Expr<'a option -> int option -> int option>) + (clContext: ClContext) + workGroupSize + = + + let SSBFS = BFS.singleSourceSparse add mul clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> + source + |> List.map (SSBFS queue matrix) + + module Parents = + let run = 0 diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index dacb249e..168f170a 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -121,6 +121,37 @@ module ClArray = outputArray + /// + /// Copies all elements from source to destination array. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let copyTo (clContext: ClContext) workGroupSize = + let copy = + <@ fun (ndRange: Range1D) (source: ClArray<'a>) (destination: ClArray<'a>) inputArrayLength -> + + let i = ndRange.GlobalID0 + + if i < inputArrayLength then + source.[i] <- destination.[i] @> + + let program = clContext.Compile(copy) + + fun (processor: MailboxProcessor<_>) (source: ClArray<'a>) (destination: ClArray<'a>) -> + if source.Length <> destination.Length then + failwith "The source array length differs from the destination array length." + + let ndRange = + Range1D.CreateValid(source.Length, workGroupSize) + + let kernel = program.GetKernel() + + processor.Post( + Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange source destination source.Length) + ) + + processor.Post(Msg.CreateRunMsg<_, _> kernel) + /// /// Creates an array of the given size by replicating the values of the given initial array. /// @@ -781,3 +812,83 @@ module ClArray = bitmap.Free processor result + + /// + /// Builds a new array whose elements are the results of applying the given function + /// to each of the elements of the array. + /// + /// The function to transform elements of the array. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map<'a, 'b> (op: Expr<'a -> 'b>) (clContext: ClContext) workGroupSize = Map.map op clContext workGroupSize + + /// + /// Builds a new array whose elements are the results of applying the given function + /// to each of the elements of the array. + /// + /// The function to transform elements of the array. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let mapInPlace<'a> (op: Expr<'a -> 'a>) (clContext: ClContext) workGroupSize = Map.mapInPlace op clContext workGroupSize + + /// + /// Builds a new array whose elements are the results of applying the given function + /// to the corresponding pairs of values, where the first element of pair is from the given array + /// and the second element is the given value. + /// + /// The function to transform elements of the array. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = Map.mapWithValue clContext workGroupSize op + + /// + /// Builds a new array whose elements are the results of applying the given function + /// to the corresponding elements of the two given arrays pairwise. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = Map.map2 map clContext workGroupSize + + /// + /// Fills the third given array with the results of applying the given function + /// to the corresponding elements of the first two given arrays pairwise. + /// + /// + /// The first two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = Map.map2InPlace map clContext workGroupSize + + /// + /// Excludes elements, pointed by the bitmap. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let excludeElements (clContext: ClContext) workGroupSize = + + let invert = mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize + + let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize + + let scatter = Scatter.lastOccurrence clContext workGroupSize + + fun (queue: MailboxProcessor<_>) allocationMode (excludeBitmap: ClArray) (inputArray: ClArray<'a>) -> + + invert queue excludeBitmap + + let length = (prefixSum queue excludeBitmap).ToHostAndFree queue + + if length = 0 then + None + else + let result = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) + + scatter queue excludeBitmap inputArray result + + Some result diff --git a/src/GraphBLAS-sharp.Backend/Common/Map.fs b/src/GraphBLAS-sharp.Backend/Common/Map.fs index f22f0f6b..19cda5f4 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Map.fs @@ -40,6 +40,36 @@ module Map = result + /// + /// Changes elements of the input array, applying the given function + /// to each element of the array. + /// + /// The function to transform elements of the array. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let mapInPlace<'a> (op: Expr<'a -> 'a>) (clContext: ClContext) workGroupSize = + + let map = + <@ fun (ndRange: Range1D) lenght (inputArray: ClArray<'a>) -> + + let gid = ndRange.GlobalID0 + + if gid < lenght then + inputArray.[gid] <- (%op) inputArray.[gid] @> + + let kernel = clContext.Compile map + + fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) -> + + let ndRange = + Range1D.CreateValid(inputArray.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length inputArray)) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + /// /// Builds a new array whose elements are the results of applying the given function /// to the corresponding pairs of values, where the first element of pair is from the given array diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index e46ea5d8..3921770d 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -69,6 +69,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs index 226384f0..643fa00c 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs @@ -1,13 +1,12 @@ namespace GraphBLAS.FSharp.Backend.Matrix.COO open Brahma.FSharp -open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions module internal Intersect = - let findIntersectionByKeys (clContext: ClContext) workGroupSize = + let findKeysIntersection (clContext: ClContext) workGroupSize = let findIntersection = <@ fun (ndRange: Range1D) (leftNNZ: int) (rightNNZ: int) (leftRows: ClArray) (leftColumns: ClArray) (rightRows: ClArray) (rightColumns: ClArray) (bitmap: ClArray) -> @@ -17,15 +16,9 @@ module internal Intersect = if gid < bitmapSize then - let row, column, rows, columns = - if rightNNZ >= leftNNZ then - leftRows.[gid], leftColumns.[gid], leftRows, leftColumns - else - rightRows.[gid], rightColumns.[gid], rightRows, rightColumns + let index: uint64 = ((uint64 leftRows.[gid]) <<< 32) ||| (uint64 leftColumns.[gid]) - let index: uint64 = ((uint64 row) <<< 32) ||| (uint64 column) - - let intersect = (%Search.Bin.existsByKey2D) bitmapSize index rows columns + let intersect = (%Search.Bin.existsByKey2D) bitmapSize index rightRows rightColumns if intersect then bitmap.[gid] <- 1 @@ -37,7 +30,7 @@ module internal Intersect = fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> - let bitmapSize = min leftMatrix.NNZ rightMatrix.NNZ + let bitmapSize = leftMatrix.NNZ let bitmap = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, bitmapSize) diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs index 9b9377f0..5d99f062 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs @@ -1,6 +1,5 @@ namespace GraphBLAS.FSharp.Backend.Matrix.COO -open System open Brahma.FSharp open GraphBLAS.FSharp.Backend.Matrix open GraphBLAS.FSharp.Backend.Quotes diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index b4960c1c..13431d19 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClCellExtensions open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions module Matrix = /// @@ -218,10 +219,35 @@ module Matrix = |> transposeInPlace queue /// - /// Build a bitmap. Maps non-zero elements of the matrix with minimum nnz to 1 - /// if the second matrix has non zero element under the same row and column pair, otherwise 0. + /// Builds a bitmap. Maps non-zero elements of the left matrix + /// to 1 if the right matrix has non zero element under the same row and column pair, otherwise 0. /// /// OpenCL context. /// Should be a power of 2 and greater than 1. let findIntersectionByKeys (clContext: ClContext) workGroupSize = - Intersect.findIntersectionByKeys clContext workGroupSize + Intersect.findKeysIntersection clContext workGroupSize + + /// + /// Merges two disjoint matrices of the same size. + /// + /// + /// Matrices should have the same number of rows and columns.
+ /// Matrices should not have non zero values with the same index. + ///
+ /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let mergeDisjoint (clContext: ClContext) workGroupSize = Merge.runDisjoint clContext workGroupSize + + let ofList (clContext: ClContext) allocationMode rowCount columnCount (elements: (int * int * 'a) list) = + let rows, columns, values = + elements + |> Array.ofList + |> Array.sortBy (fun (x, _, _) -> x) + |> Array.unzip3 + + { Context = clContext + Rows = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, rows) + Columns = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, columns) + Values = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, values) + RowCount = rowCount + ColumnCount = columnCount } diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs index 5e847976..cae0817c 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs @@ -1,8 +1,10 @@ namespace GraphBLAS.FSharp.Backend.Matrix.COO open Brahma.FSharp -open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ClMatrix +open GraphBLAS.FSharp.Objects.ArraysExtensions module Merge = let run<'a, 'b when 'a: struct and 'b: struct> (clContext: ClContext) workGroupSize = @@ -180,3 +182,52 @@ module Merge = processor.Post(Msg.CreateRunMsg<_, _>(kernel)) allRows, allColumns, leftMergedValues, rightMergedValues, isLeft + + let runDisjoint<'a when 'a: struct> (clContext: ClContext) workGroupSize = + + let mergeValues = + <@ fun (ndRange: Range1D) (length: int) (leftValues: ClArray<'a>) (rightValues: ClArray<'a>) (isLeft: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < length then + + if isLeft.[gid] = 0 then + leftValues.[gid] <- rightValues.[gid] @> + + let mergeValuesKernel = clContext.Compile(mergeValues) + + let merge = run clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'a>) -> + + let length = leftMatrix.Columns.Length + rightMatrix.Columns.Length + + let rows, cols, leftValues, rightValues, isLeft = merge processor leftMatrix rightMatrix + + let ndRange = Range1D.CreateValid(length, workGroupSize) + + let mergeValuesKernel = mergeValuesKernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + mergeValuesKernel.KernelFunc + ndRange + length + leftValues + rightValues + isLeft) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(mergeValuesKernel)) + + isLeft.Free processor + rightValues.Free processor + + { Context = clContext + Rows = rows + Columns = cols + Values = leftValues + ColumnCount = leftMatrix.ColumnCount + RowCount = leftMatrix.RowCount } diff --git a/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs index 838fdead..9b3c2fbd 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs @@ -2,6 +2,7 @@ namespace GraphBLAS.FSharp.Backend.Matrix.LIL open Brahma.FSharp open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -43,3 +44,9 @@ module Matrix = RowPointers = rowsPointers Columns = columnsIndices Values = values } + + let ofVectors (clContext: ClContext) rowCount columnCount (vectors: ClVector.Sparse<_> option list) = + { Context = clContext + RowCount = rowCount + ColumnCount = columnCount + Rows = vectors } diff --git a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs index c56ec5ea..789ff43a 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs @@ -1,7 +1,6 @@ namespace GraphBLAS.FSharp open Brahma.FSharp -open Microsoft.FSharp.Quotations open GraphBLAS.FSharp open GraphBLAS.FSharp.Backend.Matrix open GraphBLAS.FSharp.Backend.Vector @@ -58,10 +57,48 @@ module Matrix = { Context = clContext RowCount = matrix.RowCount ColumnCount = matrix.ColumnCount - Rows = rows - NNZ = matrix.NNZ } + Rows = rows } |> ClMatrix.LIL + /// + /// Creates new matrix with the values from the given one. + /// New matrix represented in the format of the given one. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let copyTo (clContext: ClContext) workGroupSize = + + let copyTo = ClArray.copyTo clContext workGroupSize + + let copyDataTo = ClArray.copyTo clContext workGroupSize + + let vectorCopyTo = + Sparse.Vector.copyTo clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (source: ClMatrix<'a>) (destination: ClMatrix<'a>) -> + if source.NNZ <> destination.NNZ || source.RowCount <> destination.RowCount || source.ColumnCount <> destination.ColumnCount then + failwith "Two matrices are not of the same size or they have different number of non-zero elements" + + match source, destination with + | ClMatrix.COO s, ClMatrix.COO d -> + copyTo processor s.Rows d.Rows + copyTo processor s.Columns d.Columns + copyDataTo processor s.Values d.Values + | ClMatrix.CSR s, ClMatrix.CSR d -> + copyTo processor s.RowPointers d.RowPointers + copyTo processor s.Columns d.Columns + copyDataTo processor s.Values d.Values + | ClMatrix.CSC s, ClMatrix.CSC d -> + copyTo processor s.Rows d.Rows + copyTo processor s.ColumnPointers d.ColumnPointers + copyDataTo processor s.Values d.Values + | ClMatrix.LIL s, ClMatrix.LIL d -> + List.iter2 (fun sourceVector destinationVector -> + match sourceVector, destinationVector with + | Some sv, Some dv -> vectorCopyTo processor sv dv + | _ -> failwith "Vectors of LIL matrix are not of the same size") s.Rows d.Rows + | _ -> failwith "Matrix formats are not matching" + /// /// Creates a new matrix, represented in CSR format, that is equal to the given one. /// @@ -273,9 +310,9 @@ module Matrix = ///
/// /// The format changes according to the following: - /// * COO -> COO - /// * CSR -> CSC - /// * CSC -> CSR + /// * COO -> COO
+ /// * CSR -> CSC
+ /// * CSC -> CSR
///
///OpenCL context. ///Should be a power of 2 and greater than 1. @@ -296,12 +333,12 @@ module Matrix = ///
/// /// The format changes according to the following: - /// * COO -> COO - /// * CSR -> CSC - /// * CSC -> CSR + /// * COO -> COO
+ /// * CSR -> CSC
+ /// * CSC -> CSR
///
- ///OpenCL context. - ///Should be a power of 2 and greater than 1. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. let transpose (clContext: ClContext) workGroupSize = let COOTranspose = COO.Matrix.transpose clContext workGroupSize @@ -332,3 +369,10 @@ module Matrix = Values = copyData processor allocationMode m.Values } |> ClMatrix.CSR | ClMatrix.LIL _ -> failwith "Not yet implemented" + + let ofList (clContext: ClContext) allocationMode format rowCount columnCount (elements: (int * int * 'a) list) = + match format with + | COO -> + COO.Matrix.ofList clContext allocationMode rowCount columnCount elements + |> ClMatrix.COO + | _ -> failwith "Not implemented" diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 81771bd0..b36f1da9 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -86,8 +86,7 @@ module ClMatrix = { Context: ClContext RowCount: int ColumnCount: int - Rows: ClVector.Sparse<'elem> option list - NNZ: int } + Rows: ClVector.Sparse<'elem> option list } interface IDeviceMemObject with member this.Dispose q = @@ -95,6 +94,8 @@ module ClMatrix = |> Seq.choose id |> Seq.iter (fun vector -> vector.Dispose q) + member this.NNZ = this.Rows |> List.fold (fun acc row -> match row with | Some r -> acc + r.NNZ | None -> acc) 0 + type Tuple<'elem when 'elem: struct> = { Context: ClContext RowIndices: ClArray diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 60654d23..e98e3d76 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -191,6 +191,9 @@ module ArithmeticOperations = | Some true -> None | _ -> Some true @> + let intNotQ = + <@ fun x -> if x = 0 then 1 else 0 @> + let inline private binOpQ zero op = <@ fun (left: 'a) (right: 'a) -> let result = (%op) left right diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 6401a580..6b6a7629 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -218,3 +218,34 @@ module Vector = result | None -> clContext.CreateClCell Unchecked.defaultof<'a> + + let ofList (clContext: ClContext) workGroupSize = + let scatter = + Common.Scatter.lastOccurrence clContext workGroupSize + + let zeroCreate = + ClArray.zeroCreate clContext workGroupSize + + let map = + Backend.Common.Map.map <@ Some @> clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode size (elements: (int * 'a) list) -> + let indices, values = elements |> Array.ofList |> Array.unzip + + let values = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, values) + + let indices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, indices) + + let mappedValues = map processor DeviceOnly values + + let result = zeroCreate processor allocationMode size + + scatter processor indices mappedValues result + + processor.Post(Msg.CreateFreeMsg(mappedValues)) + processor.Post(Msg.CreateFreeMsg(indices)) + processor.Post(Msg.CreateFreeMsg(values)) + + result diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index 6d5bc25d..f8d1a35f 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -6,6 +6,7 @@ open Microsoft.FSharp.Quotations open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVector +open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Backend.Quotes module Vector = @@ -20,6 +21,15 @@ module Vector = Values = copyData processor allocationMode vector.Values Size = vector.Size } + let copyTo (clContext: ClContext) workGroupSize = + let copyTo = ClArray.copyTo clContext workGroupSize + + let copyDataTo = ClArray.copyTo clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (source: Sparse<'a>) (destination: Sparse<'a>) -> + copyTo processor source.Indices destination.Indices + copyDataTo processor source.Values destination.Values + let map = Map.run let mapWithValue = Map.WithValueOption.run @@ -74,3 +84,15 @@ module Vector = Common.Reduce.reduce opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) (vector: ClVector.Sparse<'a>) -> reduce processor vector.Values + + let ofList (clContext: ClContext) allocationMode size (elements: (int * 'a) list) = + let indices, values = + elements + |> Array.ofList + |> Array.sortBy fst + |> Array.unzip + + { Context = clContext + Indices = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, indices) + Values = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, values) + Size = size } diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index bbba4404..623d59b1 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -46,49 +46,12 @@ module Vector = /// OpenCL context. /// Should be a power of 2 and greater than 1. let ofList (clContext: ClContext) workGroupSize = - let scatter = - Common.Scatter.lastOccurrence clContext workGroupSize - - let zeroCreate = - ClArray.zeroCreate clContext workGroupSize - - let map = - Common.Map.map <@ Some @> clContext workGroupSize + let denseOfList = Dense.Vector.ofList clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode format size (elements: (int * 'a) list) -> match format with - | Sparse -> - let indices, values = - elements - |> Array.ofList - |> Array.sortBy fst - |> Array.unzip - - { Context = clContext - Indices = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, indices) - Values = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, values) - Size = size } - |> ClVector.Sparse - | Dense -> - let indices, values = elements |> Array.ofList |> Array.unzip - - let values = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, values) - - let indices = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, indices) - - let mappedValues = map processor DeviceOnly values - - let result = zeroCreate processor allocationMode size - - scatter processor indices mappedValues result - - processor.Post(Msg.CreateFreeMsg(mappedValues)) - processor.Post(Msg.CreateFreeMsg(indices)) - processor.Post(Msg.CreateFreeMsg(values)) - - ClVector.Dense result + | Sparse -> Sparse.Vector.ofList clContext allocationMode size elements |> ClVector.Sparse + | Dense -> denseOfList processor allocationMode size elements |> ClVector.Dense /// /// Creates new vector with the values from the given one. From 97281a6b3bec535b00af2dd70147c9a3f91bcab5 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Wed, 15 Nov 2023 17:32:13 +0300 Subject: [PATCH 055/102] add: spgemm coo->csr->coo --- .../Algorithms/MSBFS.fs | 19 +- .../Matrix/COO/Matrix.fs | 80 +++++++- .../Operations/Operations.fs | 122 ++++++++++++ .../Operations/SpGeMM/Expand.fs | 182 +++++++++++++++++- 4 files changed, 390 insertions(+), 13 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 4605b3f8..2ab8772e 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -45,7 +45,7 @@ module internal MSBFS = let findIntersection = Intersect.findKeysIntersection clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (levels: ClMatrix.COO<_>) (front: ClMatrix.COO<_>) -> + fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. let intersection = findIntersection queue DeviceOnly front levels @@ -64,15 +64,15 @@ module internal MSBFS = let run<'a when 'a: struct> (add: Expr int -> int option>) - (mul: Expr<'a -> int -> int option>) + (mul: Expr 'a -> int option>) (clContext: ClContext) workGroupSize = let spGeMM = - Operations.SpGeMM.expand add mul clContext workGroupSize + Operations.SpGeMM.COO.expand add mul clContext workGroupSize - let toCSRInPlace = Matrix.toCSRInPlace clContext workGroupSize + let copy = Matrix.copy clContext workGroupSize let updateFrontAndLevels = updateFrontAndLevels clContext workGroupSize @@ -88,10 +88,7 @@ module internal MSBFS = startMatrix |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount - let mutable front = - startMatrix - |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount - |> toCSRInPlace queue DeviceOnly + let mutable front = copy queue DeviceOnly levels let mutable level = 0 let mutable stop = false @@ -100,16 +97,16 @@ module internal MSBFS = level <- level + 1 //Getting new frontier - match spGeMM queue DeviceOnly matrix (ClMatrix.CSR front) with + match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with | None -> front.Dispose queue stop <- true | Some newFrontier -> front.Dispose queue //Filtering visited vertices - match updateFrontAndLevels queue DeviceOnly levels newFrontier with + match updateFrontAndLevels queue DeviceOnly newFrontier levels with | l, Some f -> - front <- toCSRInPlace queue DeviceOnly f + front <- f levels.Dispose queue levels <- l newFrontier.Dispose queue diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 13431d19..4d7315fa 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -11,6 +11,25 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions module Matrix = + /// + /// Creates new COO matrix with the values from the given one. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let copy (clContext: ClContext) workGroupSize = + + let copy = ClArray.copy clContext workGroupSize + + let copyData = ClArray.copy clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (matrix: COO<'a>) -> + { Context = clContext + RowCount = matrix.RowCount + ColumnCount = matrix.ColumnCount + Rows = copy processor allocationMode matrix.Rows + Columns = copy processor allocationMode matrix.Columns + Values = copyData processor allocationMode matrix.Values } + /// /// Builds a new COO matrix whose elements are the results of applying the given function /// to each of the elements of the matrix. @@ -85,7 +104,7 @@ module Matrix = /// /// OpenCL context. /// Should be a power of 2 and greater than 1. - let private compressRows (clContext: ClContext) workGroupSize = + let compressRows (clContext: ClContext) workGroupSize = let compressRows = <@ fun (ndRange: Range1D) (rows: ClArray) (nnz: int) (rowPointers: ClArray) -> @@ -251,3 +270,62 @@ module Matrix = Values = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, values) RowCount = rowCount ColumnCount = columnCount } + + /// + /// Returns matrix composed of all elements from the given row range of the input matrix. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let subRows (clContext: ClContext) workGroupSize = + + let upperBound = ClArray.upperBound clContext workGroupSize + + let blit = ClArray.blit clContext workGroupSize + + let blitData = ClArray.blit clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode startRow count (matrix: ClMatrix.COO<'a>) -> + if count <= 0 then + failwith "Count must be greater than zero" + + if startRow < 0 then + failwith "startIndex must be greater then zero" + + if startRow + count > matrix.RowCount then + failwith "startIndex and count sum is larger than the matrix row count" + + let firstRowClCell = clContext.CreateClCell(startRow - 1) + let lastRowClCell = clContext.CreateClCell(startRow + count) + + // extract rows + let firstIndex = (upperBound processor matrix.Rows firstRowClCell).ToHostAndFree processor + let lastIndex = (upperBound processor matrix.Rows lastRowClCell).ToHostAndFree processor - 1 + + firstRowClCell.Free processor + lastRowClCell.Free processor + + let resultLength = lastIndex - firstIndex + 1 + + let rows = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + blit processor matrix.Columns firstIndex rows 0 resultLength + + // extract values + let values = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + blitData processor matrix.Values firstIndex values 0 resultLength + + // extract indices + let columns = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + blit processor matrix.Columns firstIndex columns 0 resultLength + + { Context = clContext + RowCount = matrix.RowCount + ColumnCount = matrix.ColumnCount + Rows = rows + Columns = columns + Values = values } diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index 06b2a39a..c6950832 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -98,6 +98,88 @@ module Operations = |> Some | _ -> failwith "Vector formats are not matching." + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Stores the result in the left vector. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2InPlace (map: Expr<'a option -> 'b option -> 'a option>) (clContext: ClContext) workGroupSize = + let map2Dense = + Dense.Vector.map2InPlace map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + match leftVector, rightVector with + | ClVector.Dense left, ClVector.Dense right -> map2Dense processor left right left + | _ -> failwith "Unsupported vector format" + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Stores the result in the given vector. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2To (map: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) workGroupSize = + let map2Dense = + Dense.Vector.map2InPlace map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> + match leftVector, rightVector, resultVector with + | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result + | _ -> failwith "Unsupported vector format" + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Returns new vector. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2Dense (map: Expr<'a option -> 'b option -> 'a option>) (clContext: ClContext) workGroupSize = + let map2Dense = + Dense.Vector.map2 map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + match leftVector, rightVector with + | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationFlag left right + | _ -> failwith "Unsupported vector format" + + /// + /// Applying the given function to the corresponding elements of the two given arrays pairwise. + /// Returns new vector as option. + /// + /// + /// The two input arrays must have the same lengths. + /// + /// The function to transform the pairs of the input elements. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let map2Sparse (map: Expr<'a option -> 'b option -> 'a option>) (clContext: ClContext) workGroupSize = + let map2Sparse = + Sparse.Map2.run map clContext workGroupSize + + let map2SparseDense = + Sparse.Map2.runSparseDense map clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + match leftVector, rightVector with + | ClVector.Sparse left, ClVector.Sparse right -> + Option.map ClVector.Sparse (map2Sparse processor allocationFlag left right) + | ClVector.Sparse left, ClVector.Dense right -> + Option.map ClVector.Sparse (map2SparseDense processor allocationFlag left right) + | _ -> failwith "Unsupported vector format" + module Matrix = /// /// Builds a new matrix whose elements are the results of applying the given function @@ -374,3 +456,43 @@ module Operations = run processor allocationMode resultCapacity leftMatrix rightMatrix | _ -> failwith "Matrix formats are not matching" + + module COO = + /// + /// Generalized matrix-matrix multiplication. Left matrix should be in COO format. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let expand + (opAdd: Expr<'c -> 'c -> 'c option>) + (opMul: Expr<'a -> 'b -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpGeMM.Expand.COO.run opAdd opMul clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> + match leftMatrix, rightMatrix with + | ClMatrix.COO leftMatrix, ClMatrix.CSR rightMatrix -> + let allocCapacity = + List.max [ sizeof<'a> + sizeof<'c> + sizeof<'b> ] + |> uint64 + |> (*) 1UL + + let resultCapacity = + (clContext.MaxMemAllocSize / allocCapacity) / 3UL + + let resultCapacity = + (min + <| uint64 System.Int32.MaxValue + <| resultCapacity) + |> int + + run processor allocationMode resultCapacity leftMatrix rightMatrix + | _ -> failwith "Matrix formats are not matching" diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs index e404cf87..407a878c 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -3,7 +3,6 @@ open Brahma.FSharp open FSharp.Quotations open GraphBLAS.FSharp -open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClCellExtensions @@ -499,3 +498,184 @@ module internal Expand = Values = values } |> Some | _ -> None + + module COO = + let runOneStep opAdd opMul (clContext: ClContext) workGroupSize = + + let runCOO = + runCOO opAdd opMul clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + + let _, result = + runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix leftMatrix + + result + |> Option.map + (fun (values, columns, rows) -> + { Context = clContext + RowCount = leftMatrix.RowCount + ColumnCount = rightMatrix.ColumnCount + Rows = rows + Columns = columns + Values = values }) + + let runManySteps opAdd opMul (clContext: ClContext) workGroupSize = + + let compress = COO.Matrix.compressRows clContext workGroupSize + + let gather = + Common.Gather.run clContext workGroupSize + + let upperBound = + ClArray.upperBound clContext workGroupSize + + let set = ClArray.set clContext workGroupSize + + let subMatrix = + COO.Matrix.subRows clContext workGroupSize + + let runCOO = + runCOO opAdd opMul clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.COO<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + + let leftRowPointers = compress processor allocationMode leftMatrix.Rows leftMatrix.RowCount + + // extract segment lengths by left matrix rows pointers + let segmentPointersByLeftMatrixRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftRowPointers.Length) + + gather processor leftRowPointers segmentLengths segmentPointersByLeftMatrixRows + + // set last element to one step length + set processor segmentPointersByLeftMatrixRows (leftRowPointers.Length - 1) generalLength + + // curring + let upperBound = + upperBound processor segmentPointersByLeftMatrixRows + + let subMatrix = subMatrix processor DeviceOnly + + let runCOO = + runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix + + let rec helper beginRow workOffset previousResult = + if beginRow < leftMatrix.RowCount then + let currentBound = + clContext.CreateClCell(workOffset + maxAllocSize: int) + + // find largest row that fit into maxAllocSize + let upperBound = + (upperBound currentBound).ToHostAndFree processor + + let endRow = upperBound - 2 + + currentBound.Free processor + + // TODO(handle largest rows) + // (we can split row, multiply and merge them but merge path needed) + if endRow = beginRow then + failwith "It is impossible to multiply such a long row" + + // extract matrix TODO(Transfer overhead) + let subMatrix = + subMatrix beginRow (endRow - beginRow) leftMatrix + + // compute sub result + let length, result = runCOO subMatrix + // increase workOffset according to previous expand + let workOffset = workOffset + length + + match result with + | Some result -> + helper endRow workOffset + <| result :: previousResult + | None -> helper endRow workOffset previousResult + else + previousResult + + let result = helper 0 0 [] |> List.rev + + segmentPointersByLeftMatrixRows.Free processor + + result + + let run opAdd opMul (clContext: ClContext) workGroupSize = + + let getNNZInRows = + CSR.Matrix.NNZInRows clContext workGroupSize + + let getSegmentPointers = + getSegmentPointers clContext workGroupSize + + let runOneStep = + runOneStep opAdd opMul clContext workGroupSize + + let concat = ClArray.concat clContext workGroupSize + + let concatData = ClArray.concat clContext workGroupSize + + let runManySteps = + runManySteps opAdd opMul clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + + let rightMatrixRowsNNZ = + getNNZInRows processor DeviceOnly rightMatrix + + let generalLength, segmentLengths = + getSegmentPointers processor leftMatrix.Columns rightMatrixRowsNNZ + + if generalLength = 0 then + None + elif generalLength < maxAllocSize then + segmentLengths.Free processor + + runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix + else + let result = + runManySteps + processor + allocationMode + maxAllocSize + generalLength + leftMatrix + segmentLengths + rightMatrixRowsNNZ + rightMatrix + + rightMatrixRowsNNZ.Free processor + segmentLengths.Free processor + + match result with + | _ :: _ -> + let valuesList, columnsList, rowsList = result |> List.unzip3 + + let values = + concatData processor allocationMode valuesList + + let columns = + concat processor allocationMode columnsList + + let rows = concat processor allocationMode rowsList + + // TODO(overhead: compute result length 3 time) + // release resources + valuesList + |> List.iter (fun array -> array.Free processor) + + columnsList + |> List.iter (fun array -> array.Free processor) + + rowsList + |> List.iter (fun array -> array.Free processor) + + { Context = clContext + RowCount = leftMatrix.RowCount + ColumnCount = rightMatrix.ColumnCount + Rows = rows + Columns = columns + Values = values } + |> Some + | _ -> None From 1538ad692a25133f97c5c097b15aafe22d7c495f Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Wed, 15 Nov 2023 18:48:59 +0300 Subject: [PATCH 056/102] add: msbfs parents --- .../Algorithms/MSBFS.fs | 115 +++++++++++++++--- .../Algorithms/SSSP.fs | 2 +- .../Quotes/Arithmetic.fs | 11 +- 3 files changed, 106 insertions(+), 22 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 2ab8772e..7351e733 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend.Algorithms open Brahma.FSharp open FSharp.Quotations open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ArraysExtensions @@ -11,35 +12,35 @@ open GraphBLAS.FSharp.Backend.Matrix.LIL open GraphBLAS.FSharp.Backend.Matrix.COO module internal MSBFS = - module Levels = - let private updateFront (clContext: ClContext) workGroupSize = + let private frontExclude (clContext: ClContext) workGroupSize = - let excludeValues = ClArray.excludeElements clContext workGroupSize + let excludeValues = ClArray.excludeElements clContext workGroupSize - let excludeIndices = ClArray.excludeElements clContext workGroupSize + let excludeIndices = ClArray.excludeElements clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> + fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> - let newRows = excludeIndices queue allocationMode intersection front.Rows + let newRows = excludeIndices queue allocationMode intersection front.Rows - let newColumns = excludeIndices queue allocationMode intersection front.Columns + let newColumns = excludeIndices queue allocationMode intersection front.Columns - let newValues = excludeValues queue allocationMode intersection front.Values + let newValues = excludeValues queue allocationMode intersection front.Values - match newRows, newColumns, newValues with - | Some rows, Some columns, Some values -> - { Context = clContext - Rows = rows - Columns = columns - Values = values - RowCount = front.RowCount - ColumnCount = front.ColumnCount } - |> Some - | _ -> None + match newRows, newColumns, newValues with + | Some rows, Some columns, Some values -> + { Context = clContext + Rows = rows + Columns = columns + Values = values + RowCount = front.RowCount + ColumnCount = front.ColumnCount } + |> Some + | _ -> None + module Levels = let private updateFrontAndLevels (clContext: ClContext) workGroupSize = - let updateFront = updateFront clContext workGroupSize + let updateFront = frontExclude clContext workGroupSize let mergeDisjoint = Matrix.mergeDisjoint clContext workGroupSize @@ -130,4 +131,78 @@ module internal MSBFS = |> List.map (SSBFS queue matrix) module Parents = - let run = 0 + let updateFrontAndParents (clContext: ClContext) workGroupSize = + // update parents same as levels + // every front value should be equal to its column number + let frontExclude = frontExclude clContext workGroupSize + + let mergeDisjoint = Matrix.mergeDisjoint clContext workGroupSize + + let findIntersection = Intersect.findKeysIntersection clContext workGroupSize + + fun (queue: MailboxProcessor) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> + + // Find intersection of levels and front indices. + let intersection = findIntersection queue DeviceOnly front parents + + // Remove mutual elements + let newFront = frontExclude queue allocationMode front intersection + + intersection.Free queue + + match newFront with + | Some f -> + // Update levels + let resultFront = + { f with Values = f.Columns } + let newLevels = mergeDisjoint queue parents f + newLevels, Some resultFront + | _ -> parents, None + + let run<'a when 'a: struct> + (clContext: ClContext) + workGroupSize + = + + let spGeMM = + Operations.SpGeMM.COO.expand (ArithmeticOperations.min 0) (ArithmeticOperations.fst 0) clContext workGroupSize + + let updateFrontAndLevels = updateFrontAndParents clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> + let vertexCount = matrix.RowCount + let sourceVertexCount = source.Length + + let mutable parents = + source + |> List.mapi (fun i vertex -> i, vertex, 0) + |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount + + let mutable front = + source + |> List.mapi (fun i vertex -> i, vertex, vertex) + |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount + + let mutable stop = false + + while not stop do + + //Getting new frontier + match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with + | None -> + front.Dispose queue + stop <- true + | Some newFrontier -> + front.Dispose queue + //Filtering visited vertices + match updateFrontAndLevels queue DeviceOnly newFrontier parents with + | l, Some f -> + front <- f + parents.Dispose queue + parents <- l + newFrontier.Dispose queue + | _, None -> + stop <- true + newFrontier.Dispose queue + + parents diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 815fde6f..489a796c 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -11,7 +11,7 @@ module internal SSSP = let run (clContext: ClContext) workGroupSize = let less = ArithmeticOperations.less - let min = ArithmeticOperations.min + let min = ArithmeticOperations.minOption let plus = ArithmeticOperations.intSumAsMul let spMVInPlace = diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index e98e3d76..9db81a58 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -240,7 +240,7 @@ module ArithmeticOperations = | Some x, None -> Some 1 | _ -> None @> - let min<'a when 'a: comparison> = + let minOption<'a when 'a: comparison> = <@ fun (x: 'a option) (y: 'a option) -> match x, y with | Some x, Some y -> Some(min x y) @@ -248,6 +248,15 @@ module ArithmeticOperations = | None, Some y -> Some y | _ -> None @> + let min zero = + <@ fun x y -> + let result = min x y + if result = zero then None else Some result @> + + let fst zero = + <@ fun x _ -> + if x = zero then None else Some x @> + //PageRank specific let squareOfDifference = <@ fun (x: float32 option) (y: float32 option) -> From cf10d92eb1787c385d7ff1e19e3660d8a7a8365e Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Wed, 15 Nov 2023 21:09:42 +0300 Subject: [PATCH 057/102] fix: msbfs parents --- src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 7351e733..ee459487 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -169,10 +169,22 @@ module internal MSBFS = let updateFrontAndLevels = updateFrontAndParents clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> - let vertexCount = matrix.RowCount + fun (queue: MailboxProcessor) (inputMatrix: ClMatrix<'a>) (source: int list) -> + let vertexCount = inputMatrix.RowCount let sourceVertexCount = source.Length + let matrix = + match inputMatrix with + | ClMatrix.CSR m -> + { Context = clContext + RowPointers = m.RowPointers + Columns = m.Columns + Values = m.Columns + RowCount = m.RowCount + ColumnCount = m.ColumnCount } + |> ClMatrix.CSR + | _ -> failwith "Incorrect format" + let mutable parents = source |> List.mapi (fun i vertex -> i, vertex, 0) @@ -186,7 +198,6 @@ module internal MSBFS = let mutable stop = false while not stop do - //Getting new frontier match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with | None -> From 1558c6d5aa4dbd5aa9fda6ad9358cd7a37cdc97b Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Fri, 17 Nov 2023 14:09:13 +0300 Subject: [PATCH 058/102] add: tests --- .../Algorithms/Algorithms.fs | 5 + .../Algorithms/MSBFS.fs | 10 +- src/GraphBLAS-sharp/Objects/Matrix.fs | 3 +- .../Backend/Algorithms/MSBFS.fs | 115 ++++++++++++++++++ .../Backend/Matrix/SpGeMM/ExpandCOO.fs | 77 ++++++++++++ .../GraphBLAS-sharp.Tests.fsproj | 2 + tests/GraphBLAS-sharp.Tests/Helpers.fs | 42 +++++++ tests/GraphBLAS-sharp.Tests/Program.fs | 7 +- 8 files changed, 252 insertions(+), 9 deletions(-) create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index 227c443f..180b72b6 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -12,6 +12,11 @@ module Algorithms = let singleSourcePushPull = BFS.singleSourcePushPull + module MSBFS = + let runLevels = MSBFS.Levels.run + + let runParents = MSBFS.Parents.run + module SSSP = let run = SSSP.run diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index ee459487..2607df67 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -115,7 +115,7 @@ module internal MSBFS = stop <- true newFrontier.Dispose queue - levels + ClMatrix.COO levels let runSingleSourceMultipleTimes<'a when 'a: struct> (add: Expr int option -> int option>) @@ -131,7 +131,7 @@ module internal MSBFS = |> List.map (SSBFS queue matrix) module Parents = - let updateFrontAndParents (clContext: ClContext) workGroupSize = + let private updateFrontAndParents (clContext: ClContext) workGroupSize = // update parents same as levels // every front value should be equal to its column number let frontExclude = frontExclude clContext workGroupSize @@ -165,7 +165,7 @@ module internal MSBFS = = let spGeMM = - Operations.SpGeMM.COO.expand (ArithmeticOperations.min 0) (ArithmeticOperations.fst 0) clContext workGroupSize + Operations.SpGeMM.COO.expand (ArithmeticOperations.min -1) (ArithmeticOperations.fst -1) clContext workGroupSize let updateFrontAndLevels = updateFrontAndParents clContext workGroupSize @@ -187,7 +187,7 @@ module internal MSBFS = let mutable parents = source - |> List.mapi (fun i vertex -> i, vertex, 0) + |> List.mapi (fun i vertex -> i, vertex, -1) |> Matrix.ofList clContext DeviceOnly sourceVertexCount vertexCount let mutable front = @@ -216,4 +216,4 @@ module internal MSBFS = stop <- true newFrontier.Dispose queue - parents + ClMatrix.COO parents diff --git a/src/GraphBLAS-sharp/Objects/Matrix.fs b/src/GraphBLAS-sharp/Objects/Matrix.fs index e74e9153..84004b1a 100644 --- a/src/GraphBLAS-sharp/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp/Objects/Matrix.fs @@ -187,8 +187,7 @@ module Matrix = { Context = context RowCount = this.RowCount ColumnCount = this.ColumnCount - Rows = rows - NNZ = this.NNZ } + Rows = rows } type Tuples<'a> = { RowIndices: int [] diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs new file mode 100644 index 00000000..8cc65562 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -0,0 +1,115 @@ +module GraphBLAS.FSharp.Tests.Backend.Algorithms.MSBFS + +open Expecto +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms +open GraphBLAS.FSharp.Tests.Backend.QuickGraph.CreateGraph +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.MatrixExtensions + +let config = Utils.undirectedAlgoConfig +let workGroupSize = Utils.defaultWorkGroupSize + +let makeLevelsTest context queue bfs (matrix: int [,]) = + let graph = undirectedFromArray2D matrix 0 + + let largestComponent = + ConnectedComponents.largestComponent graph + + if largestComponent.Length > 1 then + let sourceVertexCount = max 2 (largestComponent.Length / 10) + let source = largestComponent.[0 .. sourceVertexCount] |> Array.toList + + let matrixHost = + Utils.createMatrixFromArray2D CSR matrix ((=) 0) + let matrixDevice = matrixHost.ToDevice context + + let expectedArray2D: int [,] = Array2D.zeroCreate sourceVertexCount (Array2D.length2 matrix) + + source + |> Seq.iteri (fun i vertex -> + (snd (BFS.runUndirected graph vertex)) + |> Utils.createArrayFromDictionary (Array2D.length1 matrix) 0 + |> Array.iteri (fun col value -> expectedArray2D.[i, col] <- value)) + + let expected = Utils.createMatrixFromArray2D COO expectedArray2D ((=) 0) + + let actual: ClMatrix = bfs queue matrixDevice source + let actual = actual.ToHostAndFree queue + + matrixDevice.Dispose queue + + match actual, expected with + | Matrix.COO a, Matrix.COO e -> + Utils.compareCOOMatrix (=) a e + | _ -> failwith "Not implemented" + +let createLevelsTest context queue testFun = + testFun + |> makeLevelsTest context queue + |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + +let levelsTestFixtures (testContext: TestContext) = + [ let context = testContext.ClContext + let queue = testContext.Queue + + let bfsLevels = + Algorithms.MSBFS.runLevels + (fst ArithmeticOperations.intAdd) + (fst ArithmeticOperations.intMul) + context + workGroupSize + + createLevelsTest context queue bfsLevels ] + +let levelsTests = + TestCases.gpuTests "MSBFS Levels tests" levelsTestFixtures + +let makeParentsTest context queue bfs (matrix: int [,]) = + let graph = undirectedFromArray2D matrix -1 + + let largestComponent = + ConnectedComponents.largestComponent graph + + if largestComponent.Length > 1 then + let sourceVertexCount = max 2 (largestComponent.Length / 10) + let source = largestComponent.[0 .. sourceVertexCount] |> Array.toList + + let matrixHost = + Utils.createMatrixFromArray2D CSR matrix ((=) -1) + let matrixDevice = matrixHost.ToDevice context + + let expectedArray2D = HostPrimitives.MSBFSParents matrix source + let expected = Utils.createMatrixFromArray2D COO expectedArray2D ((=) -1) + + let actual: ClMatrix = bfs queue matrixDevice source + let actual = actual.ToHostAndFree queue + + matrixDevice.Dispose queue + + match actual, expected with + | Matrix.COO a, Matrix.COO e -> + Utils.compareCOOMatrix (=) a e + | _ -> failwith "Not implemented" + +let createParentsTest context queue testFun = + testFun + |> makeLevelsTest context queue + |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + +let parentsTestFixtures (testContext: TestContext) = + [ let context = testContext.ClContext + let queue = testContext.Queue + + let bfsLevels = + Algorithms.MSBFS.runParents + context + workGroupSize + + createLevelsTest context queue bfsLevels ] + +let parentsTests = + TestCases.gpuTests "MSBFS Levels tests" parentsTestFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs new file mode 100644 index 00000000..43787eac --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs @@ -0,0 +1,77 @@ +module GraphBLAS.FSharp.Tests.Backend.Matrix.SpGeMM.ExpandCOO + +open Expecto +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.MatrixExtensions +open GraphBLAS.FSharp.Test +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Backend + +let context = Context.defaultContext.ClContext + +let processor = Context.defaultContext.Queue + +let config = + { Utils.defaultConfig with + arbitrary = [ typeof ] } + +let makeGeneralTest zero isEqual opAdd opMul testFun (leftArray: 'a [,], rightArray: 'a [,]) = + + let leftMatrix = + Utils.createMatrixFromArray2D COO leftArray (isEqual zero) + + let rightMatrix = + Utils.createMatrixFromArray2D CSR rightArray (isEqual zero) + + if leftMatrix.NNZ > 0 && rightMatrix.NNZ > 0 then + let clLeftMatrix = leftMatrix.ToDevice context + let clRightMatrix = rightMatrix.ToDevice context + + let (clMatrixActual: ClMatrix.COO<_> option) = + testFun processor HostInterop clLeftMatrix clRightMatrix + + let expected = + HostPrimitives.array2DMultiplication zero opMul opAdd leftArray rightArray + |> fun array -> Matrix.COO.FromArray2D(array, isEqual zero) + + match clMatrixActual with + | Some clMatrixActual -> + + let matrixActual = clMatrixActual.ToHost processor + clMatrixActual.Dispose processor + + Utils.compareCOOMatrix isEqual matrixActual expected + | None -> + "Expected should be empty" + |> Expect.isTrue (expected.NNZ = 0) + +let createGeneralTest (zero: 'a) isEqual (opAddQ, opAdd) (opMulQ, opMul) testFun = + testFun opAddQ opMulQ context Utils.defaultWorkGroupSize + |> makeGeneralTest zero isEqual opAdd opMul + |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + +let generalTests = + [ createGeneralTest 0 (=) ArithmeticOperations.intAdd ArithmeticOperations.intMul Operations.SpGeMM.COO.expand + + if Utils.isFloat64Available context.ClDevice then + createGeneralTest + 0.0 + Utils.floatIsEqual + ArithmeticOperations.floatAdd + ArithmeticOperations.floatMul + Operations.SpGeMM.COO.expand + + createGeneralTest + 0.0f + Utils.float32IsEqual + ArithmeticOperations.float32Add + ArithmeticOperations.float32Mul + Operations.SpGeMM.COO.expand + createGeneralTest false (=) ArithmeticOperations.boolAdd ArithmeticOperations.boolMul Operations.SpGeMM.COO.expand ] + |> testList "General" + +let tests = + testList "SpGeMM.Expand" [ generalTests ] diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index 80f70253..8fc687dd 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -20,6 +20,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index 5f8d043b..0db4a28c 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -337,6 +337,48 @@ module HostPrimitives = op leftElement rightElement + let MSBFSParents matrix source = + let opAdd a b = + let result = min a b + if result = -1 then None else Some result + + let opMul (a: int) _ = if a = -1 then None else Some a + + let array2DMultiplication = array2DMultiplication -1 opMul opAdd + + let front = + Array2D.create + <| Seq.length source + <| Array2D.length1 matrix + <| -1 + + source + |> Seq.iteri (fun row vertex -> + front.[row, vertex] <- vertex) + + let parents = + Array2D.create + <| Seq.length source + <| Array2D.length1 matrix + <| -1 + + let mutable stop = false + + while not stop do + let newFront = array2DMultiplication front matrix + stop <- true + + newFront + |> Array2D.iteri (fun i j value -> + if value <> -1 then + if parents.[i, j] <> -1 then + newFront.[i, j] <- -1 + else + stop <- false + parents.[i, j] <- value) + + front + module Context = type TestContext = { ClContext: ClContext diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 5b7b7908..47768522 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -1,7 +1,6 @@ open Expecto open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Backend -open GraphBLAS.FSharp.Tests.Backend.Matrix let matrixTests = testList @@ -18,6 +17,7 @@ let matrixTests = Matrix.Kronecker.tests Matrix.SpGeMM.Expand.tests + Matrix.SpGeMM.ExpandCOO.tests Matrix.SpGeMM.Masked.tests ] |> testSequenced @@ -92,7 +92,10 @@ let algorithmsTests = testList "Algorithms tests" [ Algorithms.BFS.tests - Algorithms.SSSP.tests ] + Algorithms.SSSP.tests + + Algorithms.MSBFS.levelsTests + Algorithms.MSBFS.parentsTests ] |> testSequenced let deviceTests = From e78e50ea65bcf31191721fb2ff230e5ffeba3b8b Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Fri, 17 Nov 2023 14:10:32 +0300 Subject: [PATCH 059/102] refactor: formatting --- .../Algorithms/MSBFS.fs | 70 +++++++++++-------- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 32 +++++---- .../Matrix/COO/Intersect.fs | 16 +++-- .../Matrix/COO/Matrix.fs | 16 +++-- .../Matrix/COO/Merge.fs | 16 ++--- src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs | 15 ++-- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 9 ++- .../Operations/Operations.fs | 3 +- .../Operations/SpGeMM/Expand.fs | 6 +- .../Quotes/Arithmetic.fs | 12 ++-- .../Vector/Sparse/Vector.fs | 4 +- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 11 ++- .../Backend/Algorithms/MSBFS.fs | 52 ++++++++------ tests/GraphBLAS-sharp.Tests/Helpers.fs | 24 ++++--- 14 files changed, 176 insertions(+), 110 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 2607df67..21eeb023 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -14,17 +14,22 @@ open GraphBLAS.FSharp.Backend.Matrix.COO module internal MSBFS = let private frontExclude (clContext: ClContext) workGroupSize = - let excludeValues = ClArray.excludeElements clContext workGroupSize + let excludeValues = + ClArray.excludeElements clContext workGroupSize - let excludeIndices = ClArray.excludeElements clContext workGroupSize + let excludeIndices = + ClArray.excludeElements clContext workGroupSize fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> - let newRows = excludeIndices queue allocationMode intersection front.Rows + let newRows = + excludeIndices queue allocationMode intersection front.Rows - let newColumns = excludeIndices queue allocationMode intersection front.Columns + let newColumns = + excludeIndices queue allocationMode intersection front.Columns - let newValues = excludeValues queue allocationMode intersection front.Values + let newValues = + excludeValues queue allocationMode intersection front.Values match newRows, newColumns, newValues with | Some rows, Some columns, Some values -> @@ -42,17 +47,21 @@ module internal MSBFS = let updateFront = frontExclude clContext workGroupSize - let mergeDisjoint = Matrix.mergeDisjoint clContext workGroupSize + let mergeDisjoint = + Matrix.mergeDisjoint clContext workGroupSize - let findIntersection = Intersect.findKeysIntersection clContext workGroupSize + let findIntersection = + Intersect.findKeysIntersection clContext workGroupSize fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. - let intersection = findIntersection queue DeviceOnly front levels + let intersection = + findIntersection queue DeviceOnly front levels // Remove mutual elements - let newFront = updateFront queue allocationMode front intersection + let newFront = + updateFront queue allocationMode front intersection intersection.Free queue @@ -75,15 +84,15 @@ module internal MSBFS = let copy = Matrix.copy clContext workGroupSize - let updateFrontAndLevels = updateFrontAndLevels clContext workGroupSize + let updateFrontAndLevels = + updateFrontAndLevels clContext workGroupSize fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> let vertexCount = matrix.RowCount let sourceVertexCount = source.Length let startMatrix = - source - |> List.mapi (fun i vertex -> i, vertex, 1) + source |> List.mapi (fun i vertex -> i, vertex, 1) let mutable levels = startMatrix @@ -124,11 +133,11 @@ module internal MSBFS = workGroupSize = - let SSBFS = BFS.singleSourceSparse add mul clContext workGroupSize + let SSBFS = + BFS.singleSourceSparse add mul clContext workGroupSize fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> - source - |> List.map (SSBFS queue matrix) + source |> List.map (SSBFS queue matrix) module Parents = let private updateFrontAndParents (clContext: ClContext) workGroupSize = @@ -136,38 +145,43 @@ module internal MSBFS = // every front value should be equal to its column number let frontExclude = frontExclude clContext workGroupSize - let mergeDisjoint = Matrix.mergeDisjoint clContext workGroupSize + let mergeDisjoint = + Matrix.mergeDisjoint clContext workGroupSize - let findIntersection = Intersect.findKeysIntersection clContext workGroupSize + let findIntersection = + Intersect.findKeysIntersection clContext workGroupSize fun (queue: MailboxProcessor) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. - let intersection = findIntersection queue DeviceOnly front parents + let intersection = + findIntersection queue DeviceOnly front parents // Remove mutual elements - let newFront = frontExclude queue allocationMode front intersection + let newFront = + frontExclude queue allocationMode front intersection intersection.Free queue match newFront with | Some f -> // Update levels - let resultFront = - { f with Values = f.Columns } + let resultFront = { f with Values = f.Columns } let newLevels = mergeDisjoint queue parents f newLevels, Some resultFront | _ -> parents, None - let run<'a when 'a: struct> - (clContext: ClContext) - workGroupSize - = + let run<'a when 'a: struct> (clContext: ClContext) workGroupSize = let spGeMM = - Operations.SpGeMM.COO.expand (ArithmeticOperations.min -1) (ArithmeticOperations.fst -1) clContext workGroupSize - - let updateFrontAndLevels = updateFrontAndParents clContext workGroupSize + Operations.SpGeMM.COO.expand + (ArithmeticOperations.min -1) + (ArithmeticOperations.fst -1) + clContext + workGroupSize + + let updateFrontAndLevels = + updateFrontAndParents clContext workGroupSize fun (queue: MailboxProcessor) (inputMatrix: ClMatrix<'a>) (source: int list) -> let vertexCount = inputMatrix.RowCount diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 168f170a..8eaa4847 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -146,9 +146,7 @@ module ClArray = let kernel = program.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange source destination source.Length) - ) + processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange source destination source.Length)) processor.Post(Msg.CreateRunMsg<_, _> kernel) @@ -829,7 +827,8 @@ module ClArray = /// The function to transform elements of the array. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let mapInPlace<'a> (op: Expr<'a -> 'a>) (clContext: ClContext) workGroupSize = Map.mapInPlace op clContext workGroupSize + let mapInPlace<'a> (op: Expr<'a -> 'a>) (clContext: ClContext) workGroupSize = + Map.mapInPlace op clContext workGroupSize /// /// Builds a new array whose elements are the results of applying the given function @@ -839,7 +838,8 @@ module ClArray = /// The function to transform elements of the array. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = Map.mapWithValue clContext workGroupSize op + let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = + Map.mapWithValue clContext workGroupSize op /// /// Builds a new array whose elements are the results of applying the given function @@ -851,7 +851,8 @@ module ClArray = /// The function to transform the pairs of the input elements. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let map2<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = Map.map2 map clContext workGroupSize + let map2<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = + Map.map2 map clContext workGroupSize /// /// Fills the third given array with the results of applying the given function @@ -863,7 +864,8 @@ module ClArray = /// The function to transform the pairs of the input elements. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = Map.map2InPlace map clContext workGroupSize + let map2InPlace<'a, 'b, 'c> (map: Expr<'a -> 'b -> 'c>) (clContext: ClContext) workGroupSize = + Map.map2InPlace map clContext workGroupSize /// /// Excludes elements, pointed by the bitmap. @@ -872,22 +874,28 @@ module ClArray = /// Should be a power of 2 and greater than 1. let excludeElements (clContext: ClContext) workGroupSize = - let invert = mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize + let invert = + mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize - let prefixSum = PrefixSum.standardExcludeInPlace clContext workGroupSize + let prefixSum = + PrefixSum.standardExcludeInPlace clContext workGroupSize - let scatter = Scatter.lastOccurrence clContext workGroupSize + let scatter = + Scatter.lastOccurrence clContext workGroupSize fun (queue: MailboxProcessor<_>) allocationMode (excludeBitmap: ClArray) (inputArray: ClArray<'a>) -> invert queue excludeBitmap - let length = (prefixSum queue excludeBitmap).ToHostAndFree queue + let length = + (prefixSum queue excludeBitmap) + .ToHostAndFree queue if length = 0 then None else - let result = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) + let result = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) scatter queue excludeBitmap inputArray result diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs index 643fa00c..318ce885 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs @@ -16,25 +16,29 @@ module internal Intersect = if gid < bitmapSize then - let index: uint64 = ((uint64 leftRows.[gid]) <<< 32) ||| (uint64 leftColumns.[gid]) + let index: uint64 = + ((uint64 leftRows.[gid]) <<< 32) + ||| (uint64 leftColumns.[gid]) - let intersect = (%Search.Bin.existsByKey2D) bitmapSize index rightRows rightColumns + let intersect = + (%Search.Bin.existsByKey2D) bitmapSize index rightRows rightColumns if intersect then bitmap.[gid] <- 1 else bitmap.[gid] <- 0 @> - let kernel = - clContext.Compile <| findIntersection + let kernel = clContext.Compile <| findIntersection fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> let bitmapSize = leftMatrix.NNZ - let bitmap = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, bitmapSize) + let bitmap = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, bitmapSize) - let ndRange = Range1D.CreateValid(bitmapSize, workGroupSize) + let ndRange = + Range1D.CreateValid(bitmapSize, workGroupSize) let kernel = kernel.GetKernel() diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 4d7315fa..15fb0e24 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -255,7 +255,8 @@ module Matrix = /// /// OpenCL context. /// Should be a power of 2 and greater than 1. - let mergeDisjoint (clContext: ClContext) workGroupSize = Merge.runDisjoint clContext workGroupSize + let mergeDisjoint (clContext: ClContext) workGroupSize = + Merge.runDisjoint clContext workGroupSize let ofList (clContext: ClContext) allocationMode rowCount columnCount (elements: (int * int * 'a) list) = let rows, columns, values = @@ -278,7 +279,8 @@ module Matrix = /// Should be a power of 2 and greater than 1. let subRows (clContext: ClContext) workGroupSize = - let upperBound = ClArray.upperBound clContext workGroupSize + let upperBound = + ClArray.upperBound clContext workGroupSize let blit = ClArray.blit clContext workGroupSize @@ -298,8 +300,14 @@ module Matrix = let lastRowClCell = clContext.CreateClCell(startRow + count) // extract rows - let firstIndex = (upperBound processor matrix.Rows firstRowClCell).ToHostAndFree processor - let lastIndex = (upperBound processor matrix.Rows lastRowClCell).ToHostAndFree processor - 1 + let firstIndex = + (upperBound processor matrix.Rows firstRowClCell) + .ToHostAndFree processor + + let lastIndex = + (upperBound processor matrix.Rows lastRowClCell) + .ToHostAndFree processor + - 1 firstRowClCell.Free processor lastRowClCell.Free processor diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs index cae0817c..1401f3cc 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs @@ -201,23 +201,19 @@ module Merge = fun (processor: MailboxProcessor<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'a>) -> - let length = leftMatrix.Columns.Length + rightMatrix.Columns.Length + let length = + leftMatrix.Columns.Length + + rightMatrix.Columns.Length let rows, cols, leftValues, rightValues, isLeft = merge processor leftMatrix rightMatrix - let ndRange = Range1D.CreateValid(length, workGroupSize) + let ndRange = + Range1D.CreateValid(length, workGroupSize) let mergeValuesKernel = mergeValuesKernel.GetKernel() processor.Post( - Msg.MsgSetArguments - (fun () -> - mergeValuesKernel.KernelFunc - ndRange - length - leftValues - rightValues - isLeft) + Msg.MsgSetArguments(fun () -> mergeValuesKernel.KernelFunc ndRange length leftValues rightValues isLeft) ) processor.Post(Msg.CreateRunMsg<_, _>(mergeValuesKernel)) diff --git a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs index 789ff43a..b15c85e1 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs @@ -76,7 +76,9 @@ module Matrix = Sparse.Vector.copyTo clContext workGroupSize fun (processor: MailboxProcessor<_>) (source: ClMatrix<'a>) (destination: ClMatrix<'a>) -> - if source.NNZ <> destination.NNZ || source.RowCount <> destination.RowCount || source.ColumnCount <> destination.ColumnCount then + if source.NNZ <> destination.NNZ + || source.RowCount <> destination.RowCount + || source.ColumnCount <> destination.ColumnCount then failwith "Two matrices are not of the same size or they have different number of non-zero elements" match source, destination with @@ -93,10 +95,13 @@ module Matrix = copyTo processor s.ColumnPointers d.ColumnPointers copyDataTo processor s.Values d.Values | ClMatrix.LIL s, ClMatrix.LIL d -> - List.iter2 (fun sourceVector destinationVector -> - match sourceVector, destinationVector with - | Some sv, Some dv -> vectorCopyTo processor sv dv - | _ -> failwith "Vectors of LIL matrix are not of the same size") s.Rows d.Rows + List.iter2 + (fun sourceVector destinationVector -> + match sourceVector, destinationVector with + | Some sv, Some dv -> vectorCopyTo processor sv dv + | _ -> failwith "Vectors of LIL matrix are not of the same size") + s.Rows + d.Rows | _ -> failwith "Matrix formats are not matching" /// diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index b36f1da9..766925aa 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -94,7 +94,14 @@ module ClMatrix = |> Seq.choose id |> Seq.iter (fun vector -> vector.Dispose q) - member this.NNZ = this.Rows |> List.fold (fun acc row -> match row with | Some r -> acc + r.NNZ | None -> acc) 0 + member this.NNZ = + this.Rows + |> List.fold + (fun acc row -> + match row with + | Some r -> acc + r.NNZ + | None -> acc) + 0 type Tuple<'elem when 'elem: struct> = { Context: ClContext diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index c6950832..2e99b7dc 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -133,7 +133,8 @@ module Operations = fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> match leftVector, rightVector, resultVector with - | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result + | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> + map2Dense processor left right result | _ -> failwith "Unsupported vector format" /// diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs index 407a878c..45ff0df0 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -522,7 +522,8 @@ module internal Expand = let runManySteps opAdd opMul (clContext: ClContext) workGroupSize = - let compress = COO.Matrix.compressRows clContext workGroupSize + let compress = + COO.Matrix.compressRows clContext workGroupSize let gather = Common.Gather.run clContext workGroupSize @@ -540,7 +541,8 @@ module internal Expand = fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.COO<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> - let leftRowPointers = compress processor allocationMode leftMatrix.Rows leftMatrix.RowCount + let leftRowPointers = + compress processor allocationMode leftMatrix.Rows leftMatrix.RowCount // extract segment lengths by left matrix rows pointers let segmentPointersByLeftMatrixRows = diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 9db81a58..03107f05 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -191,8 +191,7 @@ module ArithmeticOperations = | Some true -> None | _ -> Some true @> - let intNotQ = - <@ fun x -> if x = 0 then 1 else 0 @> + let intNotQ = <@ fun x -> if x = 0 then 1 else 0 @> let inline private binOpQ zero op = <@ fun (left: 'a) (right: 'a) -> @@ -251,11 +250,14 @@ module ArithmeticOperations = let min zero = <@ fun x y -> let result = min x y - if result = zero then None else Some result @> + + if result = zero then + None + else + Some result @> let fst zero = - <@ fun x _ -> - if x = zero then None else Some x @> + <@ fun x _ -> if x = zero then None else Some x @> //PageRank specific let squareOfDifference = diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index f8d1a35f..1a7fb8f7 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -27,8 +27,8 @@ module Vector = let copyDataTo = ClArray.copyTo clContext workGroupSize fun (processor: MailboxProcessor<_>) (source: Sparse<'a>) (destination: Sparse<'a>) -> - copyTo processor source.Indices destination.Indices - copyDataTo processor source.Values destination.Values + copyTo processor source.Indices destination.Indices + copyDataTo processor source.Values destination.Values let map = Map.run diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index 623d59b1..9494990e 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -46,12 +46,17 @@ module Vector = /// OpenCL context. /// Should be a power of 2 and greater than 1. let ofList (clContext: ClContext) workGroupSize = - let denseOfList = Dense.Vector.ofList clContext workGroupSize + let denseOfList = + Dense.Vector.ofList clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode format size (elements: (int * 'a) list) -> match format with - | Sparse -> Sparse.Vector.ofList clContext allocationMode size elements |> ClVector.Sparse - | Dense -> denseOfList processor allocationMode size elements |> ClVector.Dense + | Sparse -> + Sparse.Vector.ofList clContext allocationMode size elements + |> ClVector.Sparse + | Dense -> + denseOfList processor allocationMode size elements + |> ClVector.Dense /// /// Creates new vector with the values from the given one. diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index 8cc65562..083ea67f 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -17,25 +17,32 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = let graph = undirectedFromArray2D matrix 0 let largestComponent = - ConnectedComponents.largestComponent graph + ConnectedComponents.largestComponent graph if largestComponent.Length > 1 then let sourceVertexCount = max 2 (largestComponent.Length / 10) - let source = largestComponent.[0 .. sourceVertexCount] |> Array.toList + + let source = + largestComponent.[0..sourceVertexCount] + |> Array.toList let matrixHost = - Utils.createMatrixFromArray2D CSR matrix ((=) 0) + Utils.createMatrixFromArray2D CSR matrix ((=) 0) + let matrixDevice = matrixHost.ToDevice context - let expectedArray2D: int [,] = Array2D.zeroCreate sourceVertexCount (Array2D.length2 matrix) + let expectedArray2D: int [,] = + Array2D.zeroCreate sourceVertexCount (Array2D.length2 matrix) source - |> Seq.iteri (fun i vertex -> - (snd (BFS.runUndirected graph vertex)) - |> Utils.createArrayFromDictionary (Array2D.length1 matrix) 0 - |> Array.iteri (fun col value -> expectedArray2D.[i, col] <- value)) + |> Seq.iteri + (fun i vertex -> + (snd (BFS.runUndirected graph vertex)) + |> Utils.createArrayFromDictionary (Array2D.length1 matrix) 0 + |> Array.iteri (fun col value -> expectedArray2D.[i, col] <- value)) - let expected = Utils.createMatrixFromArray2D COO expectedArray2D ((=) 0) + let expected = + Utils.createMatrixFromArray2D COO expectedArray2D ((=) 0) let actual: ClMatrix = bfs queue matrixDevice source let actual = actual.ToHostAndFree queue @@ -43,8 +50,7 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = matrixDevice.Dispose queue match actual, expected with - | Matrix.COO a, Matrix.COO e -> - Utils.compareCOOMatrix (=) a e + | Matrix.COO a, Matrix.COO e -> Utils.compareCOOMatrix (=) a e | _ -> failwith "Not implemented" let createLevelsTest context queue testFun = @@ -72,18 +78,25 @@ let makeParentsTest context queue bfs (matrix: int [,]) = let graph = undirectedFromArray2D matrix -1 let largestComponent = - ConnectedComponents.largestComponent graph + ConnectedComponents.largestComponent graph if largestComponent.Length > 1 then let sourceVertexCount = max 2 (largestComponent.Length / 10) - let source = largestComponent.[0 .. sourceVertexCount] |> Array.toList + + let source = + largestComponent.[0..sourceVertexCount] + |> Array.toList let matrixHost = - Utils.createMatrixFromArray2D CSR matrix ((=) -1) + Utils.createMatrixFromArray2D CSR matrix ((=) -1) + let matrixDevice = matrixHost.ToDevice context - let expectedArray2D = HostPrimitives.MSBFSParents matrix source - let expected = Utils.createMatrixFromArray2D COO expectedArray2D ((=) -1) + let expectedArray2D = + HostPrimitives.MSBFSParents matrix source + + let expected = + Utils.createMatrixFromArray2D COO expectedArray2D ((=) -1) let actual: ClMatrix = bfs queue matrixDevice source let actual = actual.ToHostAndFree queue @@ -91,8 +104,7 @@ let makeParentsTest context queue bfs (matrix: int [,]) = matrixDevice.Dispose queue match actual, expected with - | Matrix.COO a, Matrix.COO e -> - Utils.compareCOOMatrix (=) a e + | Matrix.COO a, Matrix.COO e -> Utils.compareCOOMatrix (=) a e | _ -> failwith "Not implemented" let createParentsTest context queue testFun = @@ -105,9 +117,7 @@ let parentsTestFixtures (testContext: TestContext) = let queue = testContext.Queue let bfsLevels = - Algorithms.MSBFS.runParents - context - workGroupSize + Algorithms.MSBFS.runParents context workGroupSize createLevelsTest context queue bfsLevels ] diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index 0db4a28c..612b7601 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -340,7 +340,11 @@ module HostPrimitives = let MSBFSParents matrix source = let opAdd a b = let result = min a b - if result = -1 then None else Some result + + if result = -1 then + None + else + Some result let opMul (a: int) _ = if a = -1 then None else Some a @@ -353,8 +357,7 @@ module HostPrimitives = <| -1 source - |> Seq.iteri (fun row vertex -> - front.[row, vertex] <- vertex) + |> Seq.iteri (fun row vertex -> front.[row, vertex] <- vertex) let parents = Array2D.create @@ -369,13 +372,14 @@ module HostPrimitives = stop <- true newFront - |> Array2D.iteri (fun i j value -> - if value <> -1 then - if parents.[i, j] <> -1 then - newFront.[i, j] <- -1 - else - stop <- false - parents.[i, j] <- value) + |> Array2D.iteri + (fun i j value -> + if value <> -1 then + if parents.[i, j] <> -1 then + newFront.[i, j] <- -1 + else + stop <- false + parents.[i, j] <- value) front From 95941af50a76531c9b5e2dc08f96212a34d81658 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Mon, 20 Nov 2023 14:55:12 +0300 Subject: [PATCH 060/102] wip: tests and msbfs bug fix --- .../Algorithms/MSBFS.fs | 14 +- src/GraphBLAS-sharp.Backend/Common/Map.fs | 15 +- .../Matrix/COO/Intersect.fs | 4 +- .../Matrix/COO/Matrix.fs | 2 +- .../Matrix/CSR/Matrix.fs | 3 +- src/GraphBLAS-sharp.Backend/Quotes/Search.fs | 2 +- .../Backend/Algorithms/MSBFS.fs | 8 +- .../Backend/Common/ClArray/ExcludeElements.fs | 61 +++++ .../Backend/Matrix/Intersect.fs | 71 ++++++ .../Backend/Matrix/Merge.fs | 50 +++- tests/GraphBLAS-sharp.Tests/Generators.fs | 226 +++++++++++++++++- .../GraphBLAS-sharp.Tests.fsproj | 2 + tests/GraphBLAS-sharp.Tests/Program.fs | 168 ++++--------- 13 files changed, 491 insertions(+), 135 deletions(-) create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 21eeb023..8c5ed016 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions open GraphBLAS.FSharp.Backend.Matrix.LIL open GraphBLAS.FSharp.Backend.Matrix.COO @@ -50,10 +51,12 @@ module internal MSBFS = let mergeDisjoint = Matrix.mergeDisjoint clContext workGroupSize + let setLevel = ClArray.fill clContext workGroupSize + let findIntersection = Intersect.findKeysIntersection clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> + fun (queue: MailboxProcessor<_>) allocationMode (level: int) (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. let intersection = @@ -68,7 +71,14 @@ module internal MSBFS = match newFront with | Some f -> // Update levels + let levelClCell = clContext.CreateClCell level + + setLevel queue levelClCell 0 f.Values.Length f.Values + + levelClCell.Free queue + let newLevels = mergeDisjoint queue levels f + newLevels, newFront | _ -> levels, None @@ -114,7 +124,7 @@ module internal MSBFS = | Some newFrontier -> front.Dispose queue //Filtering visited vertices - match updateFrontAndLevels queue DeviceOnly newFrontier levels with + match updateFrontAndLevels queue DeviceOnly level newFrontier levels with | l, Some f -> front <- f levels.Dispose queue diff --git a/src/GraphBLAS-sharp.Backend/Common/Map.fs b/src/GraphBLAS-sharp.Backend/Common/Map.fs index 19cda5f4..2459e1ef 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Map.fs @@ -3,6 +3,7 @@ open Brahma.FSharp open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions module Map = /// @@ -15,11 +16,11 @@ module Map = let map<'a, 'b> (op: Expr<'a -> 'b>) (clContext: ClContext) workGroupSize = let map = - <@ fun (ndRange: Range1D) lenght (inputArray: ClArray<'a>) (result: ClArray<'b>) -> + <@ fun (ndRange: Range1D) length (inputArray: ClArray<'a>) (result: ClArray<'b>) -> let gid = ndRange.GlobalID0 - if gid < lenght then + if gid < length then result.[gid] <- (%op) inputArray.[gid] @> let kernel = clContext.Compile map @@ -50,11 +51,11 @@ module Map = let mapInPlace<'a> (op: Expr<'a -> 'a>) (clContext: ClContext) workGroupSize = let map = - <@ fun (ndRange: Range1D) lenght (inputArray: ClArray<'a>) -> + <@ fun (ndRange: Range1D) length (inputArray: ClArray<'a>) -> let gid = ndRange.GlobalID0 - if gid < lenght then + if gid < length then inputArray.[gid] <- (%op) inputArray.[gid] @> let kernel = clContext.Compile map @@ -81,11 +82,11 @@ module Map = let mapWithValue<'a, 'b, 'c> (clContext: ClContext) workGroupSize (op: Expr<'a -> 'b -> 'c>) = let map = - <@ fun (ndRange: Range1D) lenght (value: ClCell<'a>) (inputArray: ClArray<'b>) (result: ClArray<'c>) -> + <@ fun (ndRange: Range1D) length (value: ClCell<'a>) (inputArray: ClArray<'b>) (result: ClArray<'c>) -> let gid = ndRange.GlobalID0 - if gid < lenght then + if gid < length then result.[gid] <- (%op) value.Value inputArray.[gid] @> let kernel = clContext.Compile map @@ -108,6 +109,8 @@ module Map = processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + valueClCell.Free processor + result /// diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs index 318ce885..d5a326a3 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs @@ -12,7 +12,7 @@ module internal Intersect = <@ fun (ndRange: Range1D) (leftNNZ: int) (rightNNZ: int) (leftRows: ClArray) (leftColumns: ClArray) (rightRows: ClArray) (rightColumns: ClArray) (bitmap: ClArray) -> let gid = ndRange.GlobalID0 - let bitmapSize = min leftNNZ rightNNZ + let bitmapSize = leftNNZ if gid < bitmapSize then @@ -21,7 +21,7 @@ module internal Intersect = ||| (uint64 leftColumns.[gid]) let intersect = - (%Search.Bin.existsByKey2D) bitmapSize index rightRows rightColumns + (%Search.Bin.existsByKey2D) rightNNZ index rightRows rightColumns if intersect then bitmap.[gid] <- 1 diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 15fb0e24..1dd458aa 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -243,7 +243,7 @@ module Matrix = /// /// OpenCL context. /// Should be a power of 2 and greater than 1. - let findIntersectionByKeys (clContext: ClContext) workGroupSize = + let findKeysIntersection (clContext: ClContext) workGroupSize = Intersect.findKeysIntersection clContext workGroupSize /// diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 5cc805f9..0bea32dd 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -393,8 +393,7 @@ module Matrix = { Context = clContext RowCount = matrix.RowCount ColumnCount = matrix.ColumnCount - Rows = rows - NNZ = matrix.NNZ } + Rows = rows } /// /// Gets the number of non-zero elements in each row. diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs index 55600257..27687645 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs @@ -98,7 +98,7 @@ module Search = /// /// Searches value in array by two keys. - /// In case there is a value at the given keys position, it is returned. + /// In case there is a value at the given keys position, it returns true. /// let existsByKey2D<'a> = <@ fun length sourceIndex (rowIndices: ClArray) (columnIndices: ClArray) -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index 083ea67f..89e6aa74 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -32,7 +32,7 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = let matrixDevice = matrixHost.ToDevice context let expectedArray2D: int [,] = - Array2D.zeroCreate sourceVertexCount (Array2D.length2 matrix) + Array2D.zeroCreate sourceVertexCount (Array2D.length1 matrix) source |> Seq.iteri @@ -109,7 +109,7 @@ let makeParentsTest context queue bfs (matrix: int [,]) = let createParentsTest context queue testFun = testFun - |> makeLevelsTest context queue + |> makeParentsTest context queue |> testPropertyWithConfig config $"test on %A{typeof<'a>}" let parentsTestFixtures (testContext: TestContext) = @@ -119,7 +119,7 @@ let parentsTestFixtures (testContext: TestContext) = let bfsLevels = Algorithms.MSBFS.runParents context workGroupSize - createLevelsTest context queue bfsLevels ] + createParentsTest context queue bfsLevels ] let parentsTests = - TestCases.gpuTests "MSBFS Levels tests" parentsTestFixtures + TestCases.gpuTests "MSBFS Parents tests" parentsTestFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs new file mode 100644 index 00000000..f938f745 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs @@ -0,0 +1,61 @@ +module GraphBLAS.FSharp.Tests.Backend.Common.ClArray.ExcludeElements + +open Expecto +open Brahma.FSharp +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Test +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions + +let context = Context.defaultContext.ClContext + +let processor = Context.defaultContext.Queue + +let config = + { Utils.defaultConfig with + arbitrary = [ typeof ] } + +let makeTest<'a> isEqual (zero: 'a) testFun ((array, bitmap): 'a array * int array) = + if array.Length > 0 && (Array.exists ((=) 1) bitmap) then + + let arrayCl = context.CreateClArray array + let bitmapCl = context.CreateClArray bitmap + + let actual: ClArray<'a> option = testFun processor HostInterop bitmapCl arrayCl + let actual = + actual + |> Option.map (fun a -> a.ToHostAndFree processor) + + arrayCl.Free processor + bitmapCl.Free processor + + let expected = + (bitmap, array) + ||> Array.zip + |> Array.filter (fun (bit, _) -> bit <> 1) + |> Array.unzip + |> snd + + match actual with + | Some actual -> + "Results must be the same" + |> Utils.compareArrays isEqual actual expected + | None -> + "Expected should be empty" + |> Expect.isEmpty expected + +let createTest<'a> (zero: 'a) isEqual = + ClArray.excludeElements context Utils.defaultWorkGroupSize + |> makeTest<'a> isEqual zero + |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + +let tests = + [ createTest 0 (=) + + if Utils.isFloat64Available context.ClDevice then + createTest 0.0 (=) + + createTest 0.0f (=) + createTest false (=) ] + |> testList "ExcludeElements tests" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs new file mode 100644 index 00000000..d8a9bf5a --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs @@ -0,0 +1,71 @@ +module GraphBLAS.FSharp.Tests.Backend.Matrix.Intersect + +open Expecto +open Brahma.FSharp +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend +open GraphBLAS.FSharp.Test +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ArraysExtensions + +let config = + { Utils.defaultConfig with + arbitrary = [ typeof ] } + +let workGroupSize = Utils.defaultWorkGroupSize + +let context = Context.defaultContext.ClContext +let processor = Context.defaultContext.Queue + +let makeTest isZero testFun (leftMatrix: 'a [,], rightMatrix: 'a [,]) = + + let m1 = Matrix.COO.FromArray2D(leftMatrix, isZero) + let m2 = Matrix.COO.FromArray2D(rightMatrix, isZero) + + if m1.NNZ > 0 && m2.NNZ > 0 then + let expected = + let leftIndices = + (m1.Rows, m1.Columns) + ||> Array.zip + + let rightIndices = + (m2.Rows, m2.Columns) + ||> Array.zip + + Array.init + <| m1.NNZ + <| fun i -> + let index = leftIndices.[i] + if Array.exists ((=) index) rightIndices then 1 else 0 + + let m1 = m1.ToDevice context + let m2 = m2.ToDevice context + + let actual: ClArray = + testFun processor ClContextExtensions.HostInterop m1 m2 + + let actual = actual.ToHostAndFree processor + + m1.Dispose processor + m2.Dispose processor + + // Check result + "Matrices should be equal" + |> Expect.equal actual expected + +let createTest isZero = + Matrix.COO.Matrix.findKeysIntersection context workGroupSize + |> makeTest isZero + |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + +let tests = + [ createTest ((=) false) + createTest ((=) 0) + createTest ((=) 0uy) + createTest (Utils.float32IsEqual 0.0f) + + if Utils.isFloat64Available context.ClDevice then + createTest (Utils.floatIsEqual 0.0) ] + |> testList "Intersect tests" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs index 554fbff2..9d0b80dd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs @@ -2,12 +2,14 @@ module GraphBLAS.FSharp.Tests.Backend.Matrix.Merge open Brahma.FSharp open Expecto +open GraphBLAS.FSharp.Test open Microsoft.FSharp.Collections open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Backend open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.MatrixExtensions let context = Context.defaultContext.ClContext @@ -108,6 +110,52 @@ let testsCOO = createTestCOO (=) false ] |> testList "COO" +let makeTestCOODisjoint isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = + + let leftMatrix = + Matrix.COO.FromArray2D(leftArray, isEqual zero) + + let rightMatrix = + Matrix.COO.FromArray2D(rightArray, isEqual zero) + + if leftMatrix.NNZ > 0 && rightMatrix.NNZ > 0 then + + let clLeftMatrix = leftMatrix.ToDevice context + let clRightMatrix = rightMatrix.ToDevice context + + let actual: ClMatrix.COO<'a> = testFun processor clLeftMatrix clRightMatrix + let actual = actual.ToHostAndFree processor + + clLeftMatrix.Dispose processor + clRightMatrix.Dispose processor + + rightArray + |> Array2D.iteri (fun row column value -> leftArray.[row, column] <- value) + + let expected = Matrix.COO.FromArray2D(leftArray, isEqual zero) + + Utils.compareCOOMatrix isEqual actual expected + +let createTestCOODisjoint isEqual (zero: 'a) = + let configDisjoint = + {Utils.defaultConfig with + endSize = 10 + arbitrary = [ typeof ]} + + Matrix.COO.Merge.runDisjoint context Utils.defaultWorkGroupSize + |> makeTestCOODisjoint isEqual zero + |> testPropertyWithConfig configDisjoint $"test on {typeof<'a>}" + +let testsCOODisjoint = + [ createTestCOODisjoint (=) 0 + + if Utils.isFloat64Available context.ClDevice then + createTestCOODisjoint (=) 0.0 + + createTestCOODisjoint (=) 0.0f + createTestCOODisjoint (=) false ] + |> testList "COO Disjoint" + let makeTestCSR isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = let leftMatrix = Matrix.CSR.FromArray2D(leftArray, isEqual zero) @@ -173,4 +221,4 @@ let testsCSR = |> testList "CSR" let allTests = - [ testsCSR; testsCOO ] |> testList "Merge" + [ testsCSR; testsCOO; testsCOODisjoint ] |> testList "Merge" diff --git a/tests/GraphBLAS-sharp.Tests/Generators.fs b/tests/GraphBLAS-sharp.Tests/Generators.fs index fec8f61e..3cb65f39 100644 --- a/tests/GraphBLAS-sharp.Tests/Generators.fs +++ b/tests/GraphBLAS-sharp.Tests/Generators.fs @@ -167,6 +167,67 @@ module Generators = |> genericSparseGenerator false Arb.generate |> Arb.fromGen + type PairOfSparseMatrices() = + static let pairOfMatricesOfEqualSizeGenerator (valuesGenerator: Gen<'a>) = + gen { + let! nRowsA, nColumnsA = dimension2DGenerator + let! nRowsB, nColumnsB = dimension2DGenerator + + let! matrixA = + valuesGenerator + |> Gen.array2DOfDim (nRowsA, nColumnsA) + + let! matrixB = + valuesGenerator + |> Gen.array2DOfDim (nRowsB, nColumnsB) + + return (matrixA, matrixB) + } + + static member IntType() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator 0 Arb.generate + |> Arb.fromGen + + static member FloatType() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator + 0. + (Arb.Default.NormalFloat() + |> Arb.toGen + |> Gen.map float) + |> Arb.fromGen + + static member Float32Type() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator 0.0f (normalFloat32Generator <| System.Random()) + |> Arb.fromGen + + static member SByteType() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator 0y Arb.generate + |> Arb.fromGen + + static member ByteType() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator 0uy Arb.generate + |> Arb.fromGen + + static member Int16Type() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator 0s Arb.generate + |> Arb.fromGen + + static member UInt16Type() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator 0us Arb.generate + |> Arb.fromGen + + static member BoolType() = + pairOfMatricesOfEqualSizeGenerator + |> genericSparseGenerator false Arb.generate + |> Arb.fromGen + type PairOfSparseMatricesOfEqualSize() = static let pairOfMatricesOfEqualSizeGenerator (valuesGenerator: Gen<'a>) = gen { @@ -403,6 +464,95 @@ module Generators = |> genericSparseGenerator false Arb.generate |> Arb.fromGen + type PairOfDisjointMatricesOfTheSameSize() = + static let pairOfDisjointMatricesGenerator zero (valuesGenerator: Gen<'a>) = + gen { + let! rowCount, columnCount = dimension2DGenerator + + let! matrixA = + valuesGenerator + |> Gen.array2DOfDim (rowCount, columnCount) + + let! matrixB = + valuesGenerator + |> Gen.array2DOfDim (rowCount, columnCount) + + for row in 0 .. rowCount - 1 do + for col in 0 .. columnCount - 1 do + + if matrixA.[row, col] <> zero then + matrixB.[row, col] <- matrixA.[row, col] + + return (matrixA, matrixB) + + // let! rowCount, columnCount = dimension2DGenerator + // + // let! arrayA = + // valuesGenerator + // |> Gen.arrayOfLength (rowCount * columnCount) + // + // let! arrayB = + // arrayA + // |> Gen.collectToArr (fun v -> if v = zero then valuesGenerator else Gen.constant zero) + // + // let matrixA = Array2D.zeroCreate rowCount columnCount + // let matrixB = Array2D.zeroCreate rowCount columnCount + // + // (arrayA, arrayB) + // ||> Array.iteri2 (fun i valueA valueB -> + // let row = i / columnCount + // let column = i % columnCount + // + // matrixA.[row, column] <- valueA + // matrixB.[row, column] <- valueB) + // + // return (matrixA, matrixB) + } + + static member IntType() = + (pairOfDisjointMatricesGenerator 0) + |> genericSparseGenerator 0 Arb.generate + |> Arb.fromGen + + static member FloatType() = + (pairOfDisjointMatricesGenerator 0.) + |> genericSparseGenerator + 0. + (Arb.Default.NormalFloat() + |> Arb.toGen + |> Gen.map float) + |> Arb.fromGen + + static member Float32Type() = + (pairOfDisjointMatricesGenerator 0.0f) + |> genericSparseGenerator 0.0f (normalFloat32Generator <| System.Random()) + |> Arb.fromGen + + static member SByteType() = + (pairOfDisjointMatricesGenerator 0y) + |> genericSparseGenerator 0y Arb.generate + |> Arb.fromGen + + static member ByteType() = + (pairOfDisjointMatricesGenerator 0uy) + |> genericSparseGenerator 0uy Arb.generate + |> Arb.fromGen + + static member Int16Type() = + (pairOfDisjointMatricesGenerator 0s) + |> genericSparseGenerator 0s Arb.generate + |> Arb.fromGen + + static member UInt16Type() = + (pairOfDisjointMatricesGenerator 0us) + |> genericSparseGenerator 0us Arb.generate + |> Arb.fromGen + + static member BoolType() = + (pairOfDisjointMatricesGenerator false) + |> genericSparseGenerator false Arb.generate + |> Arb.fromGen + type VectorXMatrix() = static let pairOfVectorAndMatrixOfCompatibleSizeGenerator (valuesGenerator: Gen<'a>) = gen { @@ -1278,6 +1428,79 @@ module Generators = |> Arb.fromGen module ClArray = + type ExcludeElements() = + static let arrayAndBitmap (valuesGenerator: Gen<'a>) zero = + gen { + let! length = Gen.sized <| fun size -> Gen.choose (1, size) + + let! array = Gen.arrayOfLength length valuesGenerator + + let! bitmap = Gen.collectToArr (fun value -> if value = zero then Gen.constant 0 else Gen.choose (0, 1)) array + + return (array, bitmap) + } + + static member IntType() = + arrayAndBitmap + <| Arb.generate + <| 0 + |> Arb.fromGen + + static member FloatType() = + arrayAndBitmap + <| (Arb.Default.NormalFloat() + |> Arb.toGen + |> Gen.map float) + <| 0. + |> Arb.fromGen + + static member Float32Type() = + arrayAndBitmap + <| (normalFloat32Generator <| System.Random()) + <| 0.0f + |> Arb.fromGen + + static member SByteType() = + arrayAndBitmap + <| Arb.generate + <| 0y + |> Arb.fromGen + + static member ByteType() = + arrayAndBitmap + <| Arb.generate + <| 0uy + |> Arb.fromGen + + static member Int16Type() = + arrayAndBitmap + <| Arb.generate + <| 0s + |> Arb.fromGen + + static member UInt16Type() = + arrayAndBitmap + <| Arb.generate + <| 0us + |> Arb.fromGen + + static member Int32Type() = + arrayAndBitmap + <| Arb.generate + <| 0 + |> Arb.fromGen + + static member UInt32Type() = + arrayAndBitmap + <| Arb.generate + <| 0u + |> Arb.fromGen + static member BoolType() = + arrayAndBitmap + <| Arb.generate + <| false + |> Arb.fromGen + type Set() = static let arrayAndChunkPosition (valuesGenerator: Gen<'a>) = gen { @@ -1428,7 +1651,7 @@ module Generators = |> Arb.fromGen static member ByteType() = - arrayAndChunkPosition <| Arb.generate + arrayAndChunkPosition <| Arb.generate |> Arb.fromGen static member Int16Type() = @@ -1450,3 +1673,4 @@ module Generators = static member BoolType() = arrayAndChunkPosition <| Arb.generate |> Arb.fromGen + diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index 8fc687dd..945ac0a3 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -36,6 +36,7 @@ + @@ -58,6 +59,7 @@ + diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 47768522..1dfb072b 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -2,123 +2,61 @@ open Expecto open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Backend -let matrixTests = - testList - "Matrix" - [ Matrix.Convert.tests - Matrix.Map2.allTests - Matrix.Map.allTests - Matrix.Merge.allTests - Matrix.Transpose.tests - Matrix.RowsLengths.tests - Matrix.ByRows.tests - Matrix.ExpandRows.tests - Matrix.SubRows.tests - Matrix.Kronecker.tests - - Matrix.SpGeMM.Expand.tests - Matrix.SpGeMM.ExpandCOO.tests - Matrix.SpGeMM.Masked.tests ] - |> testSequenced - -let commonTests = - let scanTests = - testList - "Scan" - [ Common.Scan.ByKey.tests - Common.Scan.PrefixSum.tests ] - - let reduceTests = - testList - "Reduce" - [ Common.Reduce.ByKey.allTests - Common.Reduce.Reduce.tests - Common.Reduce.Sum.tests ] - - let clArrayTests = - testList - "ClArray" - [ Common.ClArray.RemoveDuplicates.tests - Common.ClArray.Copy.tests - Common.ClArray.Replicate.tests - Common.ClArray.Exists.tests - Common.ClArray.Map.tests - Common.ClArray.Map2.addTests - Common.ClArray.Map2.mulTests - Common.ClArray.Choose.allTests - Common.ClArray.ChunkBySize.allTests - Common.ClArray.Blit.tests - Common.ClArray.Concat.tests - Common.ClArray.Fill.tests - Common.ClArray.Pairwise.tests - Common.ClArray.UpperBound.tests - Common.ClArray.Set.tests - Common.ClArray.Item.tests ] - - let sortTests = - testList - "Sort" - [ Common.Sort.Bitonic.tests - Common.Sort.Radix.allTests ] - - testList - "Common" - [ Common.Scatter.allTests - Common.Gather.allTests - clArrayTests - sortTests - reduceTests - scanTests ] - |> testSequenced - -let vectorTests = - testList - "Vector" - [ Vector.SpMV.tests - Vector.SpMSpV.tests - Vector.ZeroCreate.tests - Vector.OfList.tests - Vector.Copy.tests - Vector.Convert.tests - Vector.Map.allTests - Vector.Map2.allTests - Vector.AssignByMask.tests - Vector.AssignByMask.complementedTests - Vector.Reduce.tests - Vector.Merge.tests ] - |> testSequenced - -let algorithmsTests = - testList - "Algorithms tests" - [ Algorithms.BFS.tests - Algorithms.SSSP.tests - - Algorithms.MSBFS.levelsTests - Algorithms.MSBFS.parentsTests ] - |> testSequenced - -let deviceTests = - testList - "Device" - [ matrixTests - commonTests - vectorTests - algorithmsTests ] - |> testSequenced - -let hostTests = - testList - "Host" - [ Host.Matrix.FromArray2D.tests - Host.Matrix.Convert.tests - Host.IO.MtxReader.test ] - |> testSequenced +// let matrixTests = +// testList "Matrix" [ Matrix.Intersect.tests ] +// |> testSequenced + +// let commonTests = +// let clArrayTests = +// testList +// "ClArray" +// [ Common.ClArray.ExcludeElements.tests ] + + // testList + // "Common" + // [clArrayTests] + // |> testSequenced +// +// let vectorTests = +// testList +// "Vector" +// [ Vector.SpMV.tests +// Vector.SpMSpV.tests +// Vector.ZeroCreate.tests +// Vector.OfList.tests +// Vector.Copy.tests +// Vector.Convert.tests +// Vector.Map.allTests +// Vector.Map2.allTests +// Vector.AssignByMask.tests +// Vector.AssignByMask.complementedTests +// Vector.Reduce.tests +// Vector.Merge.tests ] +// |> testSequenced + +// let algorithmsTests = +// testList +// "Algorithms tests" +// [ Algorithms.MSBFS.levelsTests +// Algorithms.MSBFS.parentsTests ] +// |> testSequenced + +// let deviceTests = +// testList "Device" [ matrixTests ] +// |> testSequenced + +// let hostTests = +// testList +// "Host" +// [ Host.Matrix.FromArray2D.tests +// Host.Matrix.Convert.tests +// Host.IO.MtxReader.test ] +// |> testSequenced [] let allTests = - testList "All" [ deviceTests; hostTests ] - |> testSequenced + testList "All" [ Algorithms.MSBFS.levelsTests + Algorithms.MSBFS.parentsTests ] |> testSequenced [] -let main argv = allTests |> runTestsWithCLIArgs [] argv +let main argv = allTests |> runTestsWithCLIArgs [ CLIArguments.Allow_Duplicate_Names ] argv From 7b21b4f6113814e7eeb5e9e56261a398c0d848ce Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Tue, 21 Nov 2023 23:13:51 +0300 Subject: [PATCH 061/102] fix: msbfs levels bug --- .../Algorithms/MSBFS.fs | 82 +++++++++++++------ .../Matrix/COO/Matrix.fs | 7 +- .../Quotes/Arithmetic.fs | 8 ++ 3 files changed, 68 insertions(+), 29 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 8c5ed016..d263cb4b 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -3,37 +3,55 @@ namespace GraphBLAS.FSharp.Backend.Algorithms open Brahma.FSharp open FSharp.Quotations open GraphBLAS.FSharp -open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Common open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions +open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Backend.Matrix.LIL open GraphBLAS.FSharp.Backend.Matrix.COO module internal MSBFS = let private frontExclude (clContext: ClContext) workGroupSize = - let excludeValues = - ClArray.excludeElements clContext workGroupSize + let invert = + ClArray.mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize + + let prefixSum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + let scatterIndices = + Scatter.lastOccurrence clContext workGroupSize - let excludeIndices = - ClArray.excludeElements clContext workGroupSize + let scatterValues = + Scatter.lastOccurrence clContext workGroupSize fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> - let newRows = - excludeIndices queue allocationMode intersection front.Rows + invert queue intersection + + let length = + (prefixSum queue intersection) + .ToHostAndFree queue + + if length = 0 then + None + else + let rows = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) + + let columns = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) - let newColumns = - excludeIndices queue allocationMode intersection front.Columns + let values = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) - let newValues = - excludeValues queue allocationMode intersection front.Values + scatterIndices queue intersection front.Rows rows + scatterIndices queue intersection front.Columns columns + scatterValues queue intersection front.Values values - match newRows, newColumns, newValues with - | Some rows, Some columns, Some values -> { Context = clContext Rows = rows Columns = columns @@ -41,7 +59,6 @@ module internal MSBFS = RowCount = front.RowCount ColumnCount = front.ColumnCount } |> Some - | _ -> None module Levels = let private updateFrontAndLevels (clContext: ClContext) workGroupSize = @@ -70,13 +87,14 @@ module internal MSBFS = match newFront with | Some f -> - // Update levels let levelClCell = clContext.CreateClCell level + // Set current level value to all remaining front positions setLevel queue levelClCell 0 f.Values.Length f.Values levelClCell.Free queue + // Update levels let newLevels = mergeDisjoint queue levels f newLevels, newFront @@ -110,7 +128,7 @@ module internal MSBFS = let mutable front = copy queue DeviceOnly levels - let mutable level = 0 + let mutable level = 1 let mutable stop = false while not stop do @@ -121,15 +139,21 @@ module internal MSBFS = | None -> front.Dispose queue stop <- true + | Some newFrontier -> front.Dispose queue + //Filtering visited vertices match updateFrontAndLevels queue DeviceOnly level newFrontier levels with | l, Some f -> front <- f + levels.Dispose queue + levels <- l + newFrontier.Dispose queue + | _, None -> stop <- true newFrontier.Dispose queue @@ -151,8 +175,6 @@ module internal MSBFS = module Parents = let private updateFrontAndParents (clContext: ClContext) workGroupSize = - // update parents same as levels - // every front value should be equal to its column number let frontExclude = frontExclude clContext workGroupSize let mergeDisjoint = @@ -175,10 +197,15 @@ module internal MSBFS = match newFront with | Some f -> - // Update levels let resultFront = { f with Values = f.Columns } - let newLevels = mergeDisjoint queue parents f - newLevels, Some resultFront + + // Update parents + let newParents = mergeDisjoint queue parents f + + f.Values.Free queue + + newParents, Some resultFront + | _ -> parents, None let run<'a when 'a: struct> (clContext: ClContext) workGroupSize = @@ -190,7 +217,7 @@ module internal MSBFS = clContext workGroupSize - let updateFrontAndLevels = + let updateFrontAndParents = updateFrontAndParents clContext workGroupSize fun (queue: MailboxProcessor) (inputMatrix: ClMatrix<'a>) (source: int list) -> @@ -227,15 +254,20 @@ module internal MSBFS = | None -> front.Dispose queue stop <- true + | Some newFrontier -> front.Dispose queue + //Filtering visited vertices - match updateFrontAndLevels queue DeviceOnly newFrontier parents with - | l, Some f -> + match updateFrontAndParents queue DeviceOnly newFrontier parents with + | p, Some f -> front <- f + parents.Dispose queue - parents <- l + parents <- p + newFrontier.Dispose queue + | _, None -> stop <- true newFrontier.Dispose queue diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 1dd458aa..c5fa56dd 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -260,10 +260,9 @@ module Matrix = let ofList (clContext: ClContext) allocationMode rowCount columnCount (elements: (int * int * 'a) list) = let rows, columns, values = - elements - |> Array.ofList - |> Array.sortBy (fun (x, _, _) -> x) - |> Array.unzip3 + let elements = elements |> Array.ofList + elements |> Array.sortInPlaceBy (fun (x, _, _) -> x) + elements |> Array.unzip3 { Context = clContext Rows = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, rows) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 03107f05..3662bd7f 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -1,6 +1,7 @@ namespace GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects +open Microsoft.FSharp.Quotations module ArithmeticOperations = let inline private mkUnaryOp zero unaryOp = @@ -231,6 +232,13 @@ module ArithmeticOperations = let float32Mul = createPair 0.0f (*) <@ (*) @> + // without zero + let intAddWithoutZero = + <@ fun x y -> Some (x + y) @> + + let intMulWithoutZero = + <@ fun x y -> Some (x * y) @> + // other operations let less<'a when 'a: comparison> = <@ fun (x: 'a option) (y: 'a option) -> From f4016eba3deb2e5baff8104669448e8f33a596b7 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Tue, 21 Nov 2023 23:14:53 +0300 Subject: [PATCH 062/102] fix: msbfs tests --- .../Backend/Algorithms/MSBFS.fs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index 89e6aa74..daf3ab23 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -11,6 +11,7 @@ open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.MatrixExtensions let config = Utils.undirectedAlgoConfig + let workGroupSize = Utils.defaultWorkGroupSize let makeLevelsTest context queue bfs (matrix: int [,]) = @@ -19,11 +20,14 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = let largestComponent = ConnectedComponents.largestComponent graph + Array.sortInPlace largestComponent + if largestComponent.Length > 1 then let sourceVertexCount = max 2 (largestComponent.Length / 10) let source = - largestComponent.[0..sourceVertexCount] + largestComponent.[0..sourceVertexCount - 1] + |> Array.sort |> Array.toList let matrixHost = @@ -35,7 +39,7 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = Array2D.zeroCreate sourceVertexCount (Array2D.length1 matrix) source - |> Seq.iteri + |> List.iteri (fun i vertex -> (snd (BFS.runUndirected graph vertex)) |> Utils.createArrayFromDictionary (Array2D.length1 matrix) 0 @@ -53,7 +57,7 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = | Matrix.COO a, Matrix.COO e -> Utils.compareCOOMatrix (=) a e | _ -> failwith "Not implemented" -let createLevelsTest context queue testFun = +let createLevelsTest<'a> context queue testFun = testFun |> makeLevelsTest context queue |> testPropertyWithConfig config $"test on %A{typeof<'a>}" @@ -64,12 +68,12 @@ let levelsTestFixtures (testContext: TestContext) = let bfsLevels = Algorithms.MSBFS.runLevels - (fst ArithmeticOperations.intAdd) - (fst ArithmeticOperations.intMul) + ArithmeticOperations.intAddWithoutZero + ArithmeticOperations.intMulWithoutZero context workGroupSize - createLevelsTest context queue bfsLevels ] + createLevelsTest context queue bfsLevels ] let levelsTests = TestCases.gpuTests "MSBFS Levels tests" levelsTestFixtures From 94fec78b1a43dbd969a6ac9d7175deedc6c00bd8 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Wed, 22 Nov 2023 13:28:14 +0300 Subject: [PATCH 063/102] fix: msbfs parents bug --- src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index d263cb4b..a73f9de0 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -183,6 +183,10 @@ module internal MSBFS = let findIntersection = Intersect.findKeysIntersection clContext workGroupSize + let copyIndices = ClArray.copyTo clContext workGroupSize + + // let copyMatrix = Matrix.copy clContext workGroupSize + fun (queue: MailboxProcessor) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. @@ -197,14 +201,12 @@ module internal MSBFS = match newFront with | Some f -> - let resultFront = { f with Values = f.Columns } - // Update parents let newParents = mergeDisjoint queue parents f - f.Values.Free queue + copyIndices queue f.Columns f.Values - newParents, Some resultFront + newParents, Some f | _ -> parents, None From 3d9654da7e318787e05c8da7864bc98cc2be1e85 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Thu, 23 Nov 2023 00:00:24 +0300 Subject: [PATCH 064/102] fix: msbfs parents, clarray.copyto bugs --- src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs | 10 ++++++---- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 2 +- src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs | 12 ++---------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index a73f9de0..1d6a2512 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -119,6 +119,8 @@ module internal MSBFS = let vertexCount = matrix.RowCount let sourceVertexCount = source.Length + let source = source |> List.sort + let startMatrix = source |> List.mapi (fun i vertex -> i, vertex, 1) @@ -185,8 +187,6 @@ module internal MSBFS = let copyIndices = ClArray.copyTo clContext workGroupSize - // let copyMatrix = Matrix.copy clContext workGroupSize - fun (queue: MailboxProcessor) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. @@ -214,8 +214,8 @@ module internal MSBFS = let spGeMM = Operations.SpGeMM.COO.expand - (ArithmeticOperations.min -1) - (ArithmeticOperations.fst -1) + (ArithmeticOperations.min) + (ArithmeticOperations.fst) clContext workGroupSize @@ -226,6 +226,8 @@ module internal MSBFS = let vertexCount = inputMatrix.RowCount let sourceVertexCount = source.Length + let source = source |> List.sort + let matrix = match inputMatrix with | ClMatrix.CSR m -> diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 8eaa4847..ad6b3caf 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -133,7 +133,7 @@ module ClArray = let i = ndRange.GlobalID0 if i < inputArrayLength then - source.[i] <- destination.[i] @> + destination.[i] <- source.[i] @> let program = clContext.Compile(copy) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 3662bd7f..5ed5f6ba 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -255,17 +255,9 @@ module ArithmeticOperations = | None, Some y -> Some y | _ -> None @> - let min zero = - <@ fun x y -> - let result = min x y + let min<'a when 'a: comparison> = <@ fun (x: 'a) (y: 'a) -> Some (min x y) @> - if result = zero then - None - else - Some result @> - - let fst zero = - <@ fun x _ -> if x = zero then None else Some x @> + let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @> //PageRank specific let squareOfDifference = From e33db1a445be9c438e89bef1803d6c3cc59fd0a6 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Thu, 23 Nov 2023 00:01:41 +0300 Subject: [PATCH 065/102] fix: mergeDisjoint, msbfs, intersect tests bugs --- .../Backend/Algorithms/MSBFS.fs | 22 ++- .../Backend/Common/ClArray/ExcludeElements.fs | 4 +- .../Backend/Matrix/Intersect.fs | 44 +++-- .../Backend/Matrix/Merge.fs | 25 ++- tests/GraphBLAS-sharp.Tests/Generators.fs | 94 ++++------ tests/GraphBLAS-sharp.Tests/Helpers.fs | 37 ++-- tests/GraphBLAS-sharp.Tests/Program.fs | 169 ++++++++++++------ 7 files changed, 228 insertions(+), 167 deletions(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index daf3ab23..205e1218 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -79,7 +79,8 @@ let levelsTests = TestCases.gpuTests "MSBFS Levels tests" levelsTestFixtures let makeParentsTest context queue bfs (matrix: int [,]) = - let graph = undirectedFromArray2D matrix -1 + + let graph = undirectedFromArray2D matrix 0 let largestComponent = ConnectedComponents.largestComponent graph @@ -87,20 +88,17 @@ let makeParentsTest context queue bfs (matrix: int [,]) = if largestComponent.Length > 1 then let sourceVertexCount = max 2 (largestComponent.Length / 10) - let source = - largestComponent.[0..sourceVertexCount] - |> Array.toList + let source = largestComponent.[0..sourceVertexCount] + source |> Array.sortInPlace + let source = source |> Array.toList let matrixHost = - Utils.createMatrixFromArray2D CSR matrix ((=) -1) + Utils.createMatrixFromArray2D CSR matrix ((=) 0) let matrixDevice = matrixHost.ToDevice context - let expectedArray2D = - HostPrimitives.MSBFSParents matrix source - let expected = - Utils.createMatrixFromArray2D COO expectedArray2D ((=) -1) + HostPrimitives.MSBFSParents matrix source let actual: ClMatrix = bfs queue matrixDevice source let actual = actual.ToHostAndFree queue @@ -111,7 +109,7 @@ let makeParentsTest context queue bfs (matrix: int [,]) = | Matrix.COO a, Matrix.COO e -> Utils.compareCOOMatrix (=) a e | _ -> failwith "Not implemented" -let createParentsTest context queue testFun = +let createParentsTest<'a> context queue testFun = testFun |> makeParentsTest context queue |> testPropertyWithConfig config $"test on %A{typeof<'a>}" @@ -120,10 +118,10 @@ let parentsTestFixtures (testContext: TestContext) = [ let context = testContext.ClContext let queue = testContext.Queue - let bfsLevels = + let bfsParents = Algorithms.MSBFS.runParents context workGroupSize - createParentsTest context queue bfsLevels ] + createParentsTest context queue bfsParents ] let parentsTests = TestCases.gpuTests "MSBFS Parents tests" parentsTestFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs index f938f745..335cd665 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs @@ -22,7 +22,9 @@ let makeTest<'a> isEqual (zero: 'a) testFun ((array, bitmap): 'a array * int arr let arrayCl = context.CreateClArray array let bitmapCl = context.CreateClArray bitmap - let actual: ClArray<'a> option = testFun processor HostInterop bitmapCl arrayCl + let actual: ClArray<'a> option = + testFun processor HostInterop bitmapCl arrayCl + let actual = actual |> Option.map (fun a -> a.ToHostAndFree processor) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs index d8a9bf5a..bcfe9a77 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs @@ -12,33 +12,39 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions let config = { Utils.defaultConfig with - arbitrary = [ typeof ] } + arbitrary = [ typeof ] } let workGroupSize = Utils.defaultWorkGroupSize -let context = Context.defaultContext.ClContext -let processor = Context.defaultContext.Queue +let context = defaultContext.ClContext +let processor = defaultContext.Queue -let makeTest isZero testFun (leftMatrix: 'a [,], rightMatrix: 'a [,]) = +let makeTest<'a when 'a: struct> isZero testFun (leftMatrix: 'a [,], rightMatrix: 'a [,]) = - let m1 = Matrix.COO.FromArray2D(leftMatrix, isZero) - let m2 = Matrix.COO.FromArray2D(rightMatrix, isZero) + let m1 = + Matrix.COO.FromArray2D(leftMatrix, isZero) + + let m2 = + Matrix.COO.FromArray2D(rightMatrix, isZero) if m1.NNZ > 0 && m2.NNZ > 0 then + let expected = - let leftIndices = - (m1.Rows, m1.Columns) - ||> Array.zip + let mutable index = 0 + let bitmap = Array.zeroCreate m1.NNZ + + leftMatrix + |> Array2D.iteri (fun row col value -> + if row < m2.RowCount + && col < m2.ColumnCount + && not <| isZero rightMatrix.[row, col] + && not <| isZero value then + bitmap.[index] <- 1 - let rightIndices = - (m2.Rows, m2.Columns) - ||> Array.zip + if not <| isZero value then + index <- index + 1) - Array.init - <| m1.NNZ - <| fun i -> - let index = leftIndices.[i] - if Array.exists ((=) index) rightIndices then 1 else 0 + bitmap let m1 = m1.ToDevice context let m2 = m2.ToDevice context @@ -55,9 +61,9 @@ let makeTest isZero testFun (leftMatrix: 'a [,], rightMatrix: 'a [,]) = "Matrices should be equal" |> Expect.equal actual expected -let createTest isZero = +let inline createTest<'a when 'a: struct> (isZero: 'a -> bool) = Matrix.COO.Matrix.findKeysIntersection context workGroupSize - |> makeTest isZero + |> makeTest<'a> isZero |> testPropertyWithConfig config $"test on %A{typeof<'a>}" let tests = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs index 9d0b80dd..af7a2700 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs @@ -110,7 +110,10 @@ let testsCOO = createTestCOO (=) false ] |> testList "COO" -let makeTestCOODisjoint isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = +let makeTestCOODisjoint isEqual zero testFun (array: ('a * 'a) [,]) = + + let leftArray = Array2D.map fst array + let rightArray = Array2D.map snd array let leftMatrix = Matrix.COO.FromArray2D(leftArray, isEqual zero) @@ -123,24 +126,29 @@ let makeTestCOODisjoint isEqual zero testFun (leftArray: 'a [,], rightArray: 'a let clLeftMatrix = leftMatrix.ToDevice context let clRightMatrix = rightMatrix.ToDevice context - let actual: ClMatrix.COO<'a> = testFun processor clLeftMatrix clRightMatrix + let actual: ClMatrix.COO<'a> = + testFun processor clLeftMatrix clRightMatrix + let actual = actual.ToHostAndFree processor clLeftMatrix.Dispose processor clRightMatrix.Dispose processor rightArray - |> Array2D.iteri (fun row column value -> leftArray.[row, column] <- value) + |> Array2D.iteri + (fun row column value -> + if value <> zero then + leftArray.[row, column] <- value) - let expected = Matrix.COO.FromArray2D(leftArray, isEqual zero) + let expected = + Matrix.COO.FromArray2D(leftArray, isEqual zero) Utils.compareCOOMatrix isEqual actual expected let createTestCOODisjoint isEqual (zero: 'a) = let configDisjoint = - {Utils.defaultConfig with - endSize = 10 - arbitrary = [ typeof ]} + { Utils.defaultConfig with + arbitrary = [ typeof ] } Matrix.COO.Merge.runDisjoint context Utils.defaultWorkGroupSize |> makeTestCOODisjoint isEqual zero @@ -221,4 +229,5 @@ let testsCSR = |> testList "CSR" let allTests = - [ testsCSR; testsCOO; testsCOODisjoint ] |> testList "Merge" + [ testsCSR; testsCOO; testsCOODisjoint ] + |> testList "Merge" diff --git a/tests/GraphBLAS-sharp.Tests/Generators.fs b/tests/GraphBLAS-sharp.Tests/Generators.fs index 3cb65f39..deaab99c 100644 --- a/tests/GraphBLAS-sharp.Tests/Generators.fs +++ b/tests/GraphBLAS-sharp.Tests/Generators.fs @@ -34,9 +34,10 @@ module Generators = } let genericSparseGenerator zero valuesGen handler = - let maxSparsity = 10 + let minSparsity = 10 + let maxSparsity = 50 let upperBound = 100 - let sparsityGen = Gen.choose (1, maxSparsity) + let sparsityGen = Gen.choose (minSparsity, maxSparsity) let genWithSparsity sparseValuesGenProvider = gen { @@ -469,44 +470,22 @@ module Generators = gen { let! rowCount, columnCount = dimension2DGenerator - let! matrixA = - valuesGenerator + let! pairs = + Gen.two valuesGenerator |> Gen.array2DOfDim (rowCount, columnCount) - let! matrixB = - valuesGenerator - |> Gen.array2DOfDim (rowCount, columnCount) + let isZero = (=) zero - for row in 0 .. rowCount - 1 do - for col in 0 .. columnCount - 1 do + let pairs = + pairs + |> Array2D.map + (fun (fst, snd) -> + match () with + | () when isZero fst && not <| isZero snd -> (zero, snd) + | () when not <| isZero fst && isZero snd -> (fst, zero) + | () -> (fst, zero)) - if matrixA.[row, col] <> zero then - matrixB.[row, col] <- matrixA.[row, col] - - return (matrixA, matrixB) - - // let! rowCount, columnCount = dimension2DGenerator - // - // let! arrayA = - // valuesGenerator - // |> Gen.arrayOfLength (rowCount * columnCount) - // - // let! arrayB = - // arrayA - // |> Gen.collectToArr (fun v -> if v = zero then valuesGenerator else Gen.constant zero) - // - // let matrixA = Array2D.zeroCreate rowCount columnCount - // let matrixB = Array2D.zeroCreate rowCount columnCount - // - // (arrayA, arrayB) - // ||> Array.iteri2 (fun i valueA valueB -> - // let row = i / columnCount - // let column = i % columnCount - // - // matrixA.[row, column] <- valueA - // matrixB.[row, column] <- valueB) - // - // return (matrixA, matrixB) + return pairs } static member IntType() = @@ -1435,15 +1414,20 @@ module Generators = let! array = Gen.arrayOfLength length valuesGenerator - let! bitmap = Gen.collectToArr (fun value -> if value = zero then Gen.constant 0 else Gen.choose (0, 1)) array + let! bitmap = + Gen.collectToArr + (fun value -> + if value = zero then + Gen.constant 0 + else + Gen.choose (0, 1)) + array return (array, bitmap) } static member IntType() = - arrayAndBitmap - <| Arb.generate - <| 0 + arrayAndBitmap <| Arb.generate <| 0 |> Arb.fromGen static member FloatType() = @@ -1461,44 +1445,31 @@ module Generators = |> Arb.fromGen static member SByteType() = - arrayAndBitmap - <| Arb.generate - <| 0y + arrayAndBitmap <| Arb.generate <| 0y |> Arb.fromGen static member ByteType() = - arrayAndBitmap - <| Arb.generate - <| 0uy + arrayAndBitmap <| Arb.generate <| 0uy |> Arb.fromGen static member Int16Type() = - arrayAndBitmap - <| Arb.generate - <| 0s + arrayAndBitmap <| Arb.generate <| 0s |> Arb.fromGen static member UInt16Type() = - arrayAndBitmap - <| Arb.generate - <| 0us + arrayAndBitmap <| Arb.generate <| 0us |> Arb.fromGen static member Int32Type() = - arrayAndBitmap - <| Arb.generate - <| 0 + arrayAndBitmap <| Arb.generate <| 0 |> Arb.fromGen static member UInt32Type() = - arrayAndBitmap - <| Arb.generate - <| 0u + arrayAndBitmap <| Arb.generate <| 0u |> Arb.fromGen + static member BoolType() = - arrayAndBitmap - <| Arb.generate - <| false + arrayAndBitmap <| Arb.generate <| false |> Arb.fromGen type Set() = @@ -1673,4 +1644,3 @@ module Generators = static member BoolType() = arrayAndChunkPosition <| Arb.generate |> Arb.fromGen - diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index 612b7601..e9d2e86a 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -338,23 +338,29 @@ module HostPrimitives = op leftElement rightElement let MSBFSParents matrix source = + let zero = -2 + let opAdd a b = let result = min a b - if result = -1 then + if result = zero then None else Some result - let opMul (a: int) _ = if a = -1 then None else Some a + let opMul (a: int) (b: int) = + if a = zero || b = 0 then + None + else + Some a - let array2DMultiplication = array2DMultiplication -1 opMul opAdd + let array2DMultiplication = array2DMultiplication zero opMul opAdd - let front = + let mutable front = Array2D.create <| Seq.length source <| Array2D.length1 matrix - <| -1 + <| zero source |> Seq.iteri (fun row vertex -> front.[row, vertex] <- vertex) @@ -363,7 +369,10 @@ module HostPrimitives = Array2D.create <| Seq.length source <| Array2D.length1 matrix - <| -1 + <| zero + + source + |> Seq.iteri (fun row vertex -> parents.[row, vertex] <- -1) let mutable stop = false @@ -373,15 +382,19 @@ module HostPrimitives = newFront |> Array2D.iteri - (fun i j value -> - if value <> -1 then - if parents.[i, j] <> -1 then - newFront.[i, j] <- -1 + (fun row col value -> + if value <> zero then + if parents.[row, col] <> zero then + newFront.[row, col] <- zero + else stop <- false - parents.[i, j] <- value) + parents.[row, col] <- value + newFront.[row, col] <- col) + + front <- newFront - front + Utils.createMatrixFromArray2D COO parents ((=) -2) module Context = type TestContext = diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 1dfb072b..3a59d101 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -1,62 +1,125 @@ open Expecto +open GraphBLAS.FSharp.Test.Generators open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Backend -// let matrixTests = -// testList "Matrix" [ Matrix.Intersect.tests ] -// |> testSequenced - -// let commonTests = -// let clArrayTests = -// testList -// "ClArray" -// [ Common.ClArray.ExcludeElements.tests ] - - // testList - // "Common" - // [clArrayTests] - // |> testSequenced -// -// let vectorTests = -// testList -// "Vector" -// [ Vector.SpMV.tests -// Vector.SpMSpV.tests -// Vector.ZeroCreate.tests -// Vector.OfList.tests -// Vector.Copy.tests -// Vector.Convert.tests -// Vector.Map.allTests -// Vector.Map2.allTests -// Vector.AssignByMask.tests -// Vector.AssignByMask.complementedTests -// Vector.Reduce.tests -// Vector.Merge.tests ] -// |> testSequenced - -// let algorithmsTests = -// testList -// "Algorithms tests" -// [ Algorithms.MSBFS.levelsTests -// Algorithms.MSBFS.parentsTests ] -// |> testSequenced - -// let deviceTests = -// testList "Device" [ matrixTests ] -// |> testSequenced - -// let hostTests = -// testList -// "Host" -// [ Host.Matrix.FromArray2D.tests -// Host.Matrix.Convert.tests -// Host.IO.MtxReader.test ] -// |> testSequenced +let matrixTests = + testList + "Matrix" + [ Matrix.Convert.tests + Matrix.Map2.allTests + Matrix.Map.allTests + Matrix.Merge.allTests + Matrix.Transpose.tests + Matrix.RowsLengths.tests + Matrix.ByRows.tests + Matrix.ExpandRows.tests + Matrix.SubRows.tests + Matrix.Intersect.tests + Matrix.Kronecker.tests + + Matrix.SpGeMM.Expand.tests + Matrix.SpGeMM.Masked.tests ] + |> testSequenced + +let commonTests = + let scanTests = + testList + "Scan" + [ Common.Scan.ByKey.tests + Common.Scan.PrefixSum.tests ] + + let reduceTests = + testList + "Reduce" + [ Common.Reduce.ByKey.allTests + Common.Reduce.Reduce.tests + Common.Reduce.Sum.tests ] + + let clArrayTests = + testList + "ClArray" + [ Common.ClArray.RemoveDuplicates.tests + Common.ClArray.Copy.tests + Common.ClArray.Replicate.tests + Common.ClArray.Exists.tests + Common.ClArray.Map.tests + Common.ClArray.Map2.addTests + Common.ClArray.Map2.mulTests + Common.ClArray.Choose.allTests + Common.ClArray.ChunkBySize.allTests + Common.ClArray.Blit.tests + Common.ClArray.Concat.tests + Common.ClArray.Fill.tests + Common.ClArray.Pairwise.tests + Common.ClArray.UpperBound.tests + Common.ClArray.Set.tests + Common.ClArray.Item.tests ] + + let sortTests = + testList + "Sort" + [ Common.Sort.Bitonic.tests + Common.Sort.Radix.allTests ] + + testList + "Common" + [ Common.Scatter.allTests + Common.Gather.allTests + clArrayTests + sortTests + reduceTests + scanTests ] + |> testSequenced + +let vectorTests = + testList + "Vector" + [ Vector.SpMV.tests + Vector.SpMSpV.tests + Vector.ZeroCreate.tests + Vector.OfList.tests + Vector.Copy.tests + Vector.Convert.tests + Vector.Map.allTests + Vector.Map2.allTests + Vector.AssignByMask.tests + Vector.AssignByMask.complementedTests + Vector.Reduce.tests + Vector.Merge.tests ] + |> testSequenced + +let algorithmsTests = + testList + "Algorithms tests" + [ Algorithms.BFS.tests + Algorithms.SSSP.tests + + Algorithms.MSBFS.levelsTests + Algorithms.MSBFS.parentsTests ] + |> testSequenced + +let deviceTests = + testList + "Device" + [ matrixTests + commonTests + vectorTests + algorithmsTests ] + |> testSequenced + +let hostTests = + testList + "Host" + [ Host.Matrix.FromArray2D.tests + Host.Matrix.Convert.tests + Host.IO.MtxReader.test ] + |> testSequenced [] let allTests = - testList "All" [ Algorithms.MSBFS.levelsTests - Algorithms.MSBFS.parentsTests ] |> testSequenced + testList "All" [ deviceTests; hostTests ] + |> testSequenced [] -let main argv = allTests |> runTestsWithCLIArgs [ CLIArguments.Allow_Duplicate_Names ] argv +let main argv = allTests |> runTestsWithCLIArgs [] argv From 63a44e3a88f0225a3c3e3e29b2d2f114f3aa88c7 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Thu, 23 Nov 2023 00:02:13 +0300 Subject: [PATCH 066/102] refactor: formatting --- .../Algorithms/MSBFS.fs | 3 +-- .../Matrix/COO/Matrix.fs | 5 ++++- .../Quotes/Arithmetic.fs | 9 ++++----- .../Backend/Matrix/Intersect.fs | 19 ++++++++++--------- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 1d6a2512..30b40b6d 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -33,8 +33,7 @@ module internal MSBFS = invert queue intersection let length = - (prefixSum queue intersection) - .ToHostAndFree queue + (prefixSum queue intersection).ToHostAndFree queue if length = 0 then None diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index c5fa56dd..5c7838fc 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -261,7 +261,10 @@ module Matrix = let ofList (clContext: ClContext) allocationMode rowCount columnCount (elements: (int * int * 'a) list) = let rows, columns, values = let elements = elements |> Array.ofList - elements |> Array.sortInPlaceBy (fun (x, _, _) -> x) + + elements + |> Array.sortInPlaceBy (fun (x, _, _) -> x) + elements |> Array.unzip3 { Context = clContext diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 5ed5f6ba..8dc37dec 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -233,11 +233,9 @@ module ArithmeticOperations = let float32Mul = createPair 0.0f (*) <@ (*) @> // without zero - let intAddWithoutZero = - <@ fun x y -> Some (x + y) @> + let intAddWithoutZero = <@ fun x y -> Some(x + y) @> - let intMulWithoutZero = - <@ fun x y -> Some (x * y) @> + let intMulWithoutZero = <@ fun x y -> Some(x * y) @> // other operations let less<'a when 'a: comparison> = @@ -255,7 +253,8 @@ module ArithmeticOperations = | None, Some y -> Some y | _ -> None @> - let min<'a when 'a: comparison> = <@ fun (x: 'a) (y: 'a) -> Some (min x y) @> + let min<'a when 'a: comparison> = + <@ fun (x: 'a) (y: 'a) -> Some(min x y) @> let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs index bcfe9a77..15760ada 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs @@ -34,15 +34,16 @@ let makeTest<'a when 'a: struct> isZero testFun (leftMatrix: 'a [,], rightMatrix let bitmap = Array.zeroCreate m1.NNZ leftMatrix - |> Array2D.iteri (fun row col value -> - if row < m2.RowCount - && col < m2.ColumnCount - && not <| isZero rightMatrix.[row, col] - && not <| isZero value then - bitmap.[index] <- 1 - - if not <| isZero value then - index <- index + 1) + |> Array2D.iteri + (fun row col value -> + if row < m2.RowCount + && col < m2.ColumnCount + && not <| isZero rightMatrix.[row, col] + && not <| isZero value then + bitmap.[index] <- 1 + + if not <| isZero value then + index <- index + 1) bitmap From dacc3e14641281b329cd701a123d88e003799b27 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Sat, 25 Nov 2023 14:36:34 +0300 Subject: [PATCH 067/102] merge dev --- .../Algorithms/BFS.fs | 42 +-- .../Algorithms/PageRank.fs | 132 -------- .../GraphBLAS-sharp.Benchmarks.fsproj | 3 +- .../Matrix/Map2/Map2.fs | 2 +- .../Matrix/SpGeMM/Expand.fs | 21 +- .../Matrix/SpGeMM/Masked.fs | 2 +- .../GraphBLAS-sharp.Benchmarks/Program.fs | 4 +- .../GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 14 +- paket.lock | 168 +++++----- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 217 ++----------- .../Algorithms/PageRank.fs | 198 ------------ src/GraphBLAS-sharp.Backend/Common/Bitmap.fs | 99 ------ src/GraphBLAS-sharp.Backend/Common/Common.fs | 35 +- .../Common/Sort/Radix.fs | 18 +- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 148 +-------- .../GraphBLAS-sharp.Backend.fsproj | 9 +- .../Matrix/CSR/Matrix.fs | 2 +- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 1 + src/GraphBLAS-sharp.Backend/Objects/Vector.fs | 1 + .../Operations/Operations.fs | 83 +---- .../Operations/SpGeMM/Expand.fs | 10 +- .../Operations/SpMSpV.fs | 305 ------------------ .../Quotes/Arithmetic.fs | 56 +--- src/GraphBLAS-sharp.Backend/Quotes/Map.fs | 5 - src/GraphBLAS-sharp.Backend/Quotes/Mask.fs | 6 - src/GraphBLAS-sharp.Backend/Quotes/Search.fs | 26 -- .../Vector/Dense/Vector.fs | 65 +--- .../Vector/Sparse/Common.fs | 3 +- .../Vector/Sparse/Map.fs | 2 +- .../Vector/Sparse/Map2.fs | 138 +------- .../Vector/Sparse/Vector.fs | 2 - .../Backend/Algorithms/BFS.fs | 50 +-- .../Backend/Algorithms/PageRank.fs | 118 ------- .../Backend/Algorithms/SSSP.fs | 63 ---- .../Backend/Common/ClArray/Map.fs | 4 +- .../Backend/Common/ClArray/Map2.fs | 4 +- .../Backend/Common/Reduce/ReduceByKey.fs | 2 +- .../Backend/Common/Sort/Radix.fs | 14 +- .../Backend/QuickGraph/Algorithms/SSSP.fs | 37 --- .../Backend/Vector/AssignByMask.fs | 5 +- .../Backend/Vector/Map2.fs | 19 +- .../Backend/Vector/SpMSpV.fs | 165 ---------- .../Backend/Vector/SpMV.fs | 15 +- .../Vector/{Create.fs => ZeroCreate.fs} | 20 +- .../GraphBLAS-sharp.Tests.fsproj | 6 +- 45 files changed, 250 insertions(+), 2089 deletions(-) delete mode 100644 benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs delete mode 100644 src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs delete mode 100644 src/GraphBLAS-sharp.Backend/Common/Bitmap.fs delete mode 100644 src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs delete mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs delete mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs delete mode 100644 tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs delete mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs rename tests/GraphBLAS-sharp.Tests/Backend/Vector/{Create.fs => ZeroCreate.fs} (81%) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index a0c10cb6..7a3c1cf6 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -12,8 +12,8 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend.Quotes [] -[] -[] +[] +[] [)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( let mutable matrix = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> - member val ResultLevels = Unchecked.defaultof> with get,set + member val ResultLevels = Unchecked.defaultof> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -71,10 +71,7 @@ type Benchmarks<'elem when 'elem : struct>( member this.ClearInputMatrix() = matrix.Dispose this.Processor - member this.ClearResult() = - match this.ResultLevels with - | ClVector.Dense result -> result.FreeAndWait this.Processor - | _ -> failwith "Impossible" + member this.ClearResult() = this.ResultLevels.FreeAndWait this.Processor member this.ReadMatrix() = let converter = @@ -139,30 +136,6 @@ type BFSWithoutTransferBenchmarkInt32() = static member InputMatrixProvider = Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt" -type BFSPushPullWithoutTransferBenchmarkInt32() = - - inherit WithoutTransferBenchmark( - (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( - 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, @@ -194,11 +167,8 @@ type WithTransferBenchmark<'elem when 'elem : struct>( override this.Benchmark() = this.LoadMatrixToGPU() this.BFS() - match this.ResultLevels with - | ClVector.Dense result -> - result.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe - | _ -> failwith "Impossible" + this.ResultLevels.ToHost this.Processor |> ignore + this.Processor.PostAndReply Msg.MsgNotifyMe type BFSWithTransferBenchmarkInt32() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs deleted file mode 100644 index 70273357..00000000 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ /dev/null @@ -1,132 +0,0 @@ -namespace GraphBLAS.FSharp.Benchmarks.Algorithms.PageRank - -open System.IO -open BenchmarkDotNet.Attributes -open GraphBLAS.FSharp -open GraphBLAS.FSharp.IO -open Brahma.FSharp -open Microsoft.FSharp.Core -open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Benchmarks -open GraphBLAS.FSharp.Objects - -[] -[] -[] -[)>] -type Benchmarks( - buildFunToBenchmark, - converter: string -> float32, - binaryConverter, - buildMatrix) - = - - let mutable funToBenchmark = None - let mutable matrix = Unchecked.defaultof> - let mutable matrixPrepared = Unchecked.defaultof> - let mutable matrixHost = Unchecked.defaultof<_> - - let accuracy = 0.00000001f - - member val Result = Unchecked.defaultof> with get,set - - [] - member val OclContextInfo = Unchecked.defaultof with get, set - - [] - member val InputMatrixReader = Unchecked.defaultof with get, set - - member this.OclContext = (fst this.OclContextInfo).ClContext - member this.WorkGroupSize = snd this.OclContextInfo - - member this.Processor = - let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf "%A" e) - p - - static member AvailableContexts = Utils.availableContexts - - static member InputMatrixProviderBuilder pathToConfig = - let datasetFolder = "" - pathToConfig - |> Utils.getMatricesFilenames - |> Seq.map - (fun matrixFilename -> - printfn "%A" matrixFilename - - match Path.GetExtension matrixFilename with - | ".mtx" -> MtxReader(Utils.getFullPathToMatrix datasetFolder matrixFilename) - | _ -> failwith "Unsupported matrix format") - - member this.FunToBenchmark = - match funToBenchmark with - | None -> - let x = buildFunToBenchmark this.OclContext this.WorkGroupSize - funToBenchmark <- Some x - x - | Some x -> x - - member this.PageRank() = - this.Result <- this.FunToBenchmark this.Processor matrixPrepared accuracy - - member this.ClearInputMatrix() = - matrix.Dispose this.Processor - - member this.ClearPreparedMatrix() = - matrixPrepared.Dispose this.Processor - - member this.ClearResult() = this.Result.Dispose this.Processor - - member this.ReadMatrix() = - let converter = - match this.InputMatrixReader.Field with - | Pattern -> binaryConverter - | _ -> converter - - matrixHost <- this.InputMatrixReader.ReadMatrix converter - - member this.LoadMatrixToGPU() = - matrix <- buildMatrix this.OclContext matrixHost - - member this.PrepareMatrix() = - matrixPrepared <- Algorithms.PageRank.prepareMatrix this.OclContext this.WorkGroupSize this.Processor matrix - - abstract member GlobalSetup : unit -> unit - - abstract member IterationCleanup : unit -> unit - - abstract member GlobalCleanup : unit -> unit - - abstract member Benchmark : unit -> unit - -type PageRankWithoutTransferBenchmarkFloat32() = - - inherit Benchmarks( - Algorithms.PageRank.run, - float32, - (fun _ -> float32 <| Utils.nextInt (System.Random())), - (fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context)) - - static member InputMatrixProvider = - Benchmarks.InputMatrixProviderBuilder "BFSBenchmarks.txt" - - [] - override this.GlobalSetup() = - this.ReadMatrix() - this.LoadMatrixToGPU() - this.Processor.PostAndReply(Msg.MsgNotifyMe) - this.PrepareMatrix() - this.ClearInputMatrix() - - [] - override this.IterationCleanup() = - this.ClearResult() - - [] - override this.GlobalCleanup() = - this.ClearPreparedMatrix() - - [] - override this.Benchmark() = - this.PageRank() - this.Processor.PostAndReply(Msg.MsgNotifyMe) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index 75ddfc15..6e8486b0 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -25,7 +25,6 @@ - diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index ab54db75..975e8a72 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -46,7 +46,7 @@ type Benchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem : st static member AvailableContexts = Utils.availableContexts static member InputMatricesProviderBuilder pathToConfig = - let datasetFolder = "" + let datasetFolder = "EWiseAdd" pathToConfig |> Utils.getMatricesFilenames |> Seq.map diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index e8a75071..0eb398cd 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -13,7 +13,7 @@ open GraphBLAS.FSharp.Benchmarks [] [] [] -[)>] +[)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, converter: string -> 'elem, @@ -22,9 +22,11 @@ type Benchmarks<'elem when 'elem : struct>( let mutable funToBenchmark = None - let mutable matrix = Unchecked.defaultof> + let mutable firstMatrix = Unchecked.defaultof> + let mutable secondMatrix = Unchecked.defaultof> - let mutable matrixHost = Unchecked.defaultof<_> + let mutable firstMatrixHost = Unchecked.defaultof<_> + let mutable secondMatrixHost = Unchecked.defaultof<_> member val ResultMatrix = Unchecked.defaultof option> with get, set @@ -34,7 +36,7 @@ type Benchmarks<'elem when 'elem : struct>( [] member val InputMatrixReader = Unchecked.defaultof with get, set - member this.OclContext: ClContext = (fst this.OclContextInfo).ClContext + member this.OclContext:ClContext = (fst this.OclContextInfo).ClContext member this.WorkGroupSize = snd this.OclContextInfo member this.Processor = @@ -74,10 +76,11 @@ type Benchmarks<'elem when 'elem : struct>( reader.ReadMatrix converter member this.Mxm() = - this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly matrix matrix + this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly firstMatrix secondMatrix member this.ClearInputMatrices() = - matrix.Dispose this.Processor + firstMatrix.Dispose this.Processor + secondMatrix.Dispose this.Processor member this.ClearResult() = match this.ResultMatrix with @@ -85,10 +88,12 @@ type Benchmarks<'elem when 'elem : struct>( | None -> () member this.ReadMatrices() = - matrixHost <- this.ReadMatrix this.InputMatrixReader + firstMatrixHost <- this.ReadMatrix this.InputMatrixReader + secondMatrixHost <- this.ReadMatrix this.InputMatrixReader member this.LoadMatricesToGPU () = - matrix <- buildMatrix this.OclContext matrixHost + firstMatrix <- buildMatrix this.OclContext firstMatrixHost + secondMatrix <- buildMatrix this.OclContext secondMatrixHost abstract member GlobalSetup : unit -> unit diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index ff0495bf..69f0c399 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -51,7 +51,7 @@ type Masked<'elem when 'elem : struct>( static member AvaliableContexts = Utils.availableContexts static member InputMatrixProviderBuilder pathToConfig = - let datasetFolder = "" + let datasetFolder = "Mxm" pathToConfig |> Utils.getMatricesFilenames |> Seq.map diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 0655cd45..5a3ccf37 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,9 +4,7 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof - typeof - typeof |] + BenchmarkSwitcher [| typeof |] benchmarks.Run argv |> ignore 0 diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index 5c4871e2..d4e0078c 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( member val HostVectorPair = Unchecked.defaultof * Vector<'elem>> with get, set - member val ResultVector = Unchecked.defaultof option> with get,set + member val ResultVector = Unchecked.defaultof> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -67,9 +67,7 @@ type Benchmarks<'elem when 'elem : struct>( secondVector.Dispose this.Processor member this.ClearResult() = - match this.ResultVector with - | Some v -> v.Dispose this.Processor - | None -> () + this.ResultVector.Dispose this.Processor member this.CreateVectors() = this.HostVectorPair <- List.last (Gen.sample this.Size 1 generator) @@ -164,12 +162,8 @@ module WithTransfer = override this.Benchmark () = this.LoadVectorsToGPU() this.Map2() - match this.ResultVector with - | Some v -> - v.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe - | None -> () - + this.ResultVector.ToHost this.Processor |> ignore + this.Processor.PostAndReply Msg.MsgNotifyMe [] override this.IterationCleanup () = diff --git a/paket.lock b/paket.lock index 7cae92f5..f2bbb161 100644 --- a/paket.lock +++ b/paket.lock @@ -2,8 +2,8 @@ STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 altcover (7.6.812) - BenchmarkDotNet (0.13.9) - BenchmarkDotNet.Annotations (>= 0.13.9) - restriction: >= netstandard2.0 + BenchmarkDotNet (0.13.6) + BenchmarkDotNet.Annotations (>= 0.13.6) - restriction: >= netstandard2.0 CommandLineParser (>= 2.9.1) - restriction: >= netstandard2.0 Gee.External.Capstone (>= 2.3) - restriction: >= netstandard2.0 Iced (>= 1.17) - restriction: >= netstandard2.0 @@ -18,7 +18,7 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - BenchmarkDotNet.Annotations (0.13.9) - restriction: >= netstandard2.0 + BenchmarkDotNet.Annotations (0.13.6) - restriction: >= netstandard2.0 Brahma.FSharp (2.0.5) Brahma.FSharp.OpenCL.Printer (>= 2.0.5) - restriction: >= net7.0 Brahma.FSharp.OpenCL.Shared (>= 2.0.5) - restriction: >= net7.0 @@ -83,27 +83,27 @@ NUGET System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (>= 7.0) - restriction: >= netstandard2.0 System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.7) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.7.2) - restriction: || (>= net45) (>= netcoreapp2.1) + Microsoft.CodeAnalysis.CSharp (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.6.3) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.447801) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.430602) - restriction: >= netstandard2.0 Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 6.0) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Diagnostics.Runtime (3.0.442202) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.1.5) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (2.4.416101) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.3) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) @@ -145,11 +145,11 @@ NUGET Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.7.2) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.ObjectModel (17.6.3) - restriction: >= netcoreapp3.1 NuGet.Frameworks (>= 6.5) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.7.2) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.7.2) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.6.3) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.6.3) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -214,7 +214,7 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.7) - restriction: >= netcoreapp3.1 + NuGet.Frameworks (6.6.1) - restriction: >= netcoreapp3.1 Perfolizer (0.2.1) - restriction: >= netstandard2.0 System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 QuikGraph (2.5) @@ -656,7 +656,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (7.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) @@ -762,20 +762,20 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.14.1) - restriction: >= net5.0 - FSharp.Compiler.Service (>= 43.7.400) - restriction: >= net6.0 - FSharp.Core (>= 7.0.400) - restriction: >= net6.0 + FSharp.Analyzers.SDK (0.12) - restriction: >= net5.0 + FSharp.Compiler.Service (>= 43.7.200) - restriction: >= net6.0 + FSharp.Core (>= 7.0.200) - restriction: >= net6.0 McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 - FSharp.Compiler.Service (43.7.400) - restriction: >= net6.0 - FSharp.Core (7.0.400) - restriction: >= netstandard2.0 + FSharp.Compiler.Service (43.7.300) - restriction: >= net6.0 + FSharp.Core (7.0.300) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 - System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 + System.Diagnostics.DiagnosticSource (>= 6.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.400) - restriction: >= net5.0 + FSharp.Core (7.0.300) - restriction: >= net5.0 McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 @@ -932,18 +932,17 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.400) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 + FSharp.Core (7.0.300) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -956,12 +955,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) @@ -969,24 +968,25 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.844) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.7) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Configuration (6.7) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Common (6.6.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Configuration (6.6.1) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.6.1) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6.1) - restriction: >= netstandard2.0 + NuGet.Packaging (6.6.1) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 - System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.6.1) - restriction: >= netstandard2.0 + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.6.1) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Versioning (6.6.1) - restriction: >= netstandard2.0 Octokit (0.48) System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 @@ -999,9 +999,10 @@ NUGET System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 System.Drawing.Common (7.0) - restriction: >= net6.0 Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1011,7 +1012,7 @@ NUGET System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) - System.Runtime (4.3.1) - restriction: && (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) 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)) 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)) System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) @@ -1019,14 +1020,22 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) + System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) System.Security.Permissions (7.0) - restriction: >= netstandard2.0 @@ -1074,7 +1083,7 @@ NUGET Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (4.1) - restriction: >= netstandard2.0 + Fable.Core (4.0) - restriction: >= netstandard2.0 Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 @@ -1167,23 +1176,22 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.400) + FSharp.Core (7.0.300) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -1196,12 +1204,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1213,24 +1221,25 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.844) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.7) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Configuration (6.7) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Common (6.6.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Configuration (6.6.1) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.6.1) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.6.1) - restriction: >= netstandard2.0 + NuGet.Packaging (6.6.1) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 - System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.6.1) - restriction: >= netstandard2.0 + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.6.1) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Versioning (6.6.1) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1334,7 +1343,7 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Drawing.Common (7.0) - restriction: >= net6.0 Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1423,7 +1432,7 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: && (< net461) (>= netstandard2.0) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (< net461) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1438,9 +1447,10 @@ NUGET System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) System.Text.Encoding (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 830c0bad..de7f0cc8 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -5,8 +5,9 @@ open FSharp.Quotations open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Backend.Vector.Dense open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions module internal BFS = @@ -17,218 +18,54 @@ module internal BFS = workGroupSize = - let spMVInPlace = - Operations.SpMVInPlace add mul clContext workGroupSize + let spMVTo = + Operations.SpMVInplace add mul clContext workGroupSize let zeroCreate = - Vector.zeroCreate clContext workGroupSize + ClArray.zeroCreate clContext workGroupSize let ofList = Vector.ofList clContext workGroupSize - let maskComplementedInPlace = + let maskComplementedTo = Vector.map2InPlace Mask.complementedOp clContext workGroupSize let fillSubVectorTo = - Vector.assignByMaskInPlace Mask.assign clContext workGroupSize + Vector.assignByMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize let containsNonZero = - Vector.exists Predicates.isSome clContext workGroupSize + ClArray.exists Predicates.isSome clContext workGroupSize fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> let vertexCount = matrix.RowCount - let levels = - zeroCreate queue DeviceOnly vertexCount Dense + let levels = zeroCreate queue HostInterop vertexCount - let front = + let frontier = ofList queue DeviceOnly Dense vertexCount [ source, 1 ] - let mutable level = 0 - let mutable stop = false - - while not stop do - level <- level + 1 - - //Assigning new level values - fillSubVectorTo queue levels front level - - //Getting new frontier - spMVInPlace queue matrix front front - - maskComplementedInPlace queue front levels - - //Checking if front is empty - stop <- - not - <| (containsNonZero queue front).ToHostAndFree queue - - front.Dispose queue - - levels - - let singleSourceSparse - (add: Expr int option -> int option>) - (mul: Expr<'a option -> int option -> int option>) - (clContext: ClContext) - workGroupSize - = - - let spMSpV = - Operations.SpMSpV add mul clContext workGroupSize + match frontier with + | ClVector.Dense front -> - let zeroCreate = - Vector.zeroCreate clContext workGroupSize - - let ofList = Vector.ofList clContext workGroupSize - - let maskComplemented = - Vector.map2Sparse Mask.complementedOp clContext workGroupSize - - let fillSubVectorTo = - Vector.assignByMaskInPlace Mask.assign clContext workGroupSize - - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> - let vertexCount = matrix.RowCount - - let levels = - zeroCreate queue DeviceOnly vertexCount Dense - - let mutable front = - ofList queue DeviceOnly Sparse vertexCount [ source, 1 ] - - let mutable level = 0 - let mutable stop = false + let mutable level = 0 + let mutable stop = false - while not stop do - level <- level + 1 + while not stop do + level <- level + 1 - //Assigning new level values - fillSubVectorTo queue levels front level + //Assigning new level values + fillSubVectorTo queue levels front (clContext.CreateClCell level) levels - //Getting new frontier - match spMSpV queue matrix front with - | None -> - front.Dispose queue - stop <- true - | Some newFrontier -> - front.Dispose queue - //Filtering visited vertices - match maskComplemented queue DeviceOnly newFrontier levels with - | None -> - stop <- true - newFrontier.Dispose queue - | Some f -> - front <- f - newFrontier.Dispose queue - - levels - - - let singleSourcePushPull - (add: Expr int option -> int option>) - (mul: Expr<'a option -> int option -> int option>) - (clContext: ClContext) - workGroupSize - = - - let spMVInPlace = - Operations.SpMVInPlace add mul clContext workGroupSize - - let spMSpV = - Operations.SpMSpV add mul clContext workGroupSize - - let zeroCreate = - Vector.zeroCreate clContext workGroupSize - - let ofList = Vector.ofList clContext workGroupSize - - let maskComplementedInPlace = - Vector.map2InPlace Mask.complementedOp clContext workGroupSize - - let maskComplemented = - Vector.map2Sparse Mask.complementedOp clContext workGroupSize - - let fillSubVectorInPlace = - Vector.assignByMaskInPlace Mask.assign clContext workGroupSize - - let toSparse = Vector.toSparse clContext workGroupSize - - let toDense = Vector.toDense clContext workGroupSize - - let countNNZ = - ClArray.count Predicates.isSome clContext workGroupSize - - //Push or pull functions - let getNNZ (queue: MailboxProcessor) (v: ClVector) = - match v with - | ClVector.Sparse v -> v.NNZ - | ClVector.Dense v -> countNNZ queue v - - let SPARSITY = 0.001f - - let push nnz size = - (float32 nnz) / (float32 size) <= SPARSITY - - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> - let vertexCount = matrix.RowCount - - let levels = - zeroCreate queue DeviceOnly vertexCount Dense - - let mutable frontier = - ofList queue DeviceOnly Sparse vertexCount [ source, 1 ] - - let mutable level = 0 - let mutable stop = false - - while not stop do - level <- level + 1 - - //Assigning new level values - fillSubVectorInPlace queue levels frontier level - - match frontier with - | ClVector.Sparse _ -> - //Getting new frontier - match spMSpV queue matrix frontier with - | None -> - frontier.Dispose queue - stop <- true - | Some newFrontier -> - frontier.Dispose queue - //Filtering visited vertices - match maskComplemented queue DeviceOnly newFrontier levels with - | None -> - stop <- true - newFrontier.Dispose queue - | Some newMaskedFrontier -> - newFrontier.Dispose queue - - //Push/pull - let NNZ = getNNZ queue newMaskedFrontier - - if (push NNZ newMaskedFrontier.Size) then - frontier <- newMaskedFrontier - else - frontier <- toDense queue DeviceOnly newMaskedFrontier - newMaskedFrontier.Dispose queue - | ClVector.Dense oldFrontier -> //Getting new frontier - spMVInPlace queue matrix frontier frontier - - maskComplementedInPlace queue frontier levels + spMVTo queue matrix frontier frontier - //Emptiness check - let NNZ = getNNZ queue frontier + maskComplementedTo queue front levels front - stop <- NNZ = 0 + //Checking if front is empty + stop <- + not + <| (containsNonZero queue front).ToHostAndFree queue - //Push/pull - if not stop then - if (push NNZ frontier.Size) then - frontier <- toSparse queue DeviceOnly frontier - oldFrontier.Free queue - else - frontier.Dispose queue + front.Free queue - levels + levels + | _ -> failwith "Not implemented" diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs deleted file mode 100644 index d806b4fe..00000000 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ /dev/null @@ -1,198 +0,0 @@ -namespace GraphBLAS.FSharp.Backend.Algorithms - -open GraphBLAS.FSharp -open GraphBLAS.FSharp.Backend -open Brahma.FSharp -open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Vector.Dense -open GraphBLAS.FSharp.Objects.ClMatrix -open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Objects.ClCellExtensions - -module internal PageRank = - let alpha = 0.85f - - let private countOutDegree (clContext: ClContext) workGroupSize = - - let one = - <@ fun (x: float32 option) (_: int option) -> - let mutable res = 0 - - match x with - | Some _ -> res <- 1 - | None -> () - - if res = 0 then None else Some res @> - - let spMV = - Operations.SpMV.runTo ArithmeticOperations.intSumOption one clContext workGroupSize - - let zeroCreate = - GraphBLAS.FSharp.ClArray.zeroCreate clContext workGroupSize - - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> - let outDegree: ClArray = - zeroCreate queue DeviceOnly matrix.ColumnCount - - spMV queue matrix outDegree outDegree - - outDegree - - let prepareMatrix (clContext: ClContext) workGroupSize = - - //Passing global variable to kernel in Brahma is not possible - let alpha = alpha - - let op = - <@ fun (x: float32 option) y -> - let mutable res = None - - match x, y with - | Some _, Some y -> res <- Some(alpha / (float32 y)) - | _ -> () - - res @> - - //TODO: generalize to map2 Matrix x Vector - let multiply = - <@ fun (range: Range1D) (numberOfRows: int) (matrixRowPointers: ClArray) (matrixValues: ClArray) (vectorValues: ClArray) (resultMatrixValues: ClArray) -> - - let i = range.GlobalID0 - let li = range.LocalID0 - let group = i / workGroupSize - - if group < numberOfRows then - let rowStart = matrixRowPointers.[group] - let rowEnd = matrixRowPointers.[group + 1] - - let vectorValue = vectorValues.[group] - let mutable index = rowStart + li - - while index < rowEnd do - let matrixValue = matrixValues.[index] - let resultValue = (%op) (Some matrixValue) vectorValue - - match resultValue with - | Some v -> resultMatrixValues.[index] <- v - | None -> () //This should not be reachable - - index <- index + workGroupSize @> - - let countOutDegree = countOutDegree clContext workGroupSize - - let copy = - GraphBLAS.FSharp.ClArray.copy clContext workGroupSize - - let transposeInPlace = - Matrix.CSR.Matrix.transposeInPlace clContext workGroupSize - - let multiply = clContext.Compile multiply - - fun (queue: MailboxProcessor) (matrix: ClMatrix) -> - - match matrix with - | ClMatrix.CSR matrix -> - - let outDegree = countOutDegree queue matrix - - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, matrix.Values.Length) - - let kernel = multiply.GetKernel() - - let ndRange = - Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize) - - queue.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - matrix.RowCount - matrix.RowPointers - matrix.Values - outDegree - resultValues) - ) - - queue.Post(Msg.CreateRunMsg<_, _> kernel) - - outDegree.Free queue - - let newMatrix = - { Context = clContext - RowCount = matrix.RowCount - ColumnCount = matrix.ColumnCount - RowPointers = copy queue DeviceOnly matrix.RowPointers - Columns = copy queue DeviceOnly matrix.Columns - Values = resultValues } - - transposeInPlace queue DeviceOnly newMatrix - |> ClMatrix.CSR - | _ -> failwith "Not implemented" - - let run (clContext: ClContext) workGroupSize = - - let squareOfDifference = ArithmeticOperations.squareOfDifference - let plus = ArithmeticOperations.float32SumOption - let mul = ArithmeticOperations.float32MulOption - - let spMVTo = - Operations.SpMVInPlace plus mul clContext workGroupSize - - let addToResult = - GraphBLAS.FSharp.Vector.map2InPlace plus clContext workGroupSize - - let subtractAndSquare = - GraphBLAS.FSharp.Vector.map2To squareOfDifference clContext workGroupSize - - let reduce = - GraphBLAS.FSharp.Vector.reduce <@ (+) @> clContext workGroupSize - - let create = - GraphBLAS.FSharp.Vector.create clContext workGroupSize - - fun (queue: MailboxProcessor) (matrix: ClMatrix) accuracy -> - - let vertexCount = matrix.RowCount - - //None is 0 - let mutable rank = - create queue DeviceOnly vertexCount Dense None - - let mutable prevRank = - create queue DeviceOnly vertexCount Dense (Some(1.0f / (float32 vertexCount))) - - let mutable errors = - create queue DeviceOnly vertexCount Dense None - - let addition = - create queue DeviceOnly vertexCount Dense (Some((1.0f - alpha) / (float32 vertexCount))) - - let mutable error = accuracy + 0.1f - - let mutable i = 0 - - while error > accuracy do - i <- i + 1 - - // rank = matrix*rank + (1 - alpha)/N - spMVTo queue matrix prevRank rank - addToResult queue rank addition - - // error - subtractAndSquare queue rank prevRank errors - error <- sqrt <| (reduce queue errors).ToHostAndFree queue - - //Swap vectors - let temp = rank - rank <- prevRank - prevRank <- temp - - prevRank.Dispose queue - errors.Dispose queue - addition.Dispose queue - - rank diff --git a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs deleted file mode 100644 index 889cd43f..00000000 --- a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs +++ /dev/null @@ -1,99 +0,0 @@ -namespace GraphBLAS.FSharp.Backend.Common - -open Brahma.FSharp -open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Common.Map - -module Bitmap = - let private getUniqueBitmapGeneral predicate (clContext: ClContext) workGroupSize = - - let getUniqueBitmap = - <@ fun (ndRange: Range1D) (inputArray: ClArray<'a>) inputLength (isUniqueBitmap: ClArray) -> - - let gid = ndRange.GlobalID0 - - if gid < inputLength then - let isUnique = (%predicate) gid inputLength inputArray // brahma error - - if isUnique then - isUniqueBitmap.[gid] <- 1 - else - isUniqueBitmap.[gid] <- 0 @> - - let kernel = clContext.Compile(getUniqueBitmap) - - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> - - let inputLength = inputArray.Length - - let ndRange = - Range1D.CreateValid(inputLength, workGroupSize) - - let bitmap = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputLength) - - let kernel = kernel.GetKernel() - - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray inputLength bitmap)) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - bitmap - - /// - /// Gets the bitmap that indicates the first elements of the sequences of consecutive identical elements - /// - /// OpenCL context. - let firstOccurrence clContext = - getUniqueBitmapGeneral - <| Predicates.firstOccurrence () - <| clContext - - /// - /// Gets the bitmap that indicates the last elements of the sequences of consecutive identical elements - /// - /// OpenCL context. - let lastOccurrence clContext = - getUniqueBitmapGeneral - <| Predicates.lastOccurrence () - <| clContext - - let private getUniqueBitmap2General<'a when 'a: equality> getUniqueBitmap (clContext: ClContext) workGroupSize = - - let map = - map2 <@ fun x y -> x ||| y @> clContext workGroupSize - - let firstGetBitmap = getUniqueBitmap clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> - let firstBitmap = - firstGetBitmap processor DeviceOnly firstArray - - let secondBitmap = - firstGetBitmap processor DeviceOnly secondArray - - let result = - map processor allocationMode firstBitmap secondBitmap - - firstBitmap.Free processor - secondBitmap.Free processor - - result - - /// - /// Gets the bitmap that indicates the first elements of the sequences - /// of consecutive identical elements from either first array or second array. - /// - /// OpenCL context. - let firstOccurrence2 clContext = - getUniqueBitmap2General firstOccurrence clContext - - /// - /// Gets the bitmap that indicates the last elements of the sequences - /// of consecutive identical elements from either first array or second array. - /// - /// OpenCL context. - let lastOccurrence2 clContext = - getUniqueBitmap2General lastOccurrence clContext diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index ae9839f2..53777d33 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -43,20 +43,6 @@ module Common = /// let runByKeysStandard = Sort.Radix.runByKeysStandard - /// - /// Sorts stable input array of values by given integer keys and return only values. - /// - /// - /// - /// let keys = [| 0; 4; 3; 1; 2; 6; 5 |] - /// let values = [| 1.9; 2.8; 3.7; 4.6; 5.5; 6.4; 7.3; |] - /// runByKeysStandard clContext 32 processor keys values - /// ... - /// > val values = [| 1.9; 4.6; 5.5; 3.7; 2.8; 7.3; 6.4 |] - /// - /// - let runByKeysStandardValuesOnly = Sort.Radix.runByKeysStandardValuesOnly - /// /// Sorts stable input array of integer keys. /// @@ -385,27 +371,8 @@ module Common = /// /// The length of the result must be calculated in advance. /// - let segmentSequential<'a> - (reduceOp: Expr<'a option -> 'a option -> 'a option>) - (clContext: ClContext) - workGroupSize - = + let segmentSequential<'a> (reduceOp: Expr<'a -> 'a -> 'a option>) (clContext: ClContext) workGroupSize = Reduce.ByKey.Option.segmentSequential reduceOp clContext workGroupSize - /// - /// Reduces values by key. Each segment is reduced by one work item. - /// - /// ClContext. - /// Work group size. - /// Operation for reducing values. - /// - /// The length of the result and offsets for each segment must be calculated in advance. - /// - let segmentSequentialByOffsets<'a> - (reduceOp: Expr<'a -> 'a -> 'a option>) - (clContext: ClContext) - workGroupSize - = - Reduce.ByKey.Option.segmentSequentialByOffsets reduceOp clContext workGroupSize module ByKey2D = /// diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index b7db92d0..03ad4ed0 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -269,7 +269,7 @@ module internal Radix = failwith "Mismatch of key lengths and value. Lengths must be the same" if values.Length <= 1 then - copy processor DeviceOnly keys, dataCopy processor DeviceOnly values + dataCopy processor allocationMode values else let firstKeys = copy processor DeviceOnly keys @@ -319,26 +319,14 @@ module internal Radix = keysPair <- swap keysPair valuesPair <- swap valuesPair - globalOffset.Free processor localOffset.Free processor shift.Free processor + (fst keysPair).Free processor (snd keysPair).Free processor (snd valuesPair).Free processor - (fst keysPair, fst valuesPair) - - let runByKeysStandardValuesOnly clContext workGroupSize = - let runByKeys = - runByKeys clContext workGroupSize defaultBitCount - - fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> - let keys, values = - runByKeys processor allocationMode keys values - - keys.Free processor - - values + (fst valuesPair) let runByKeysStandard clContext workGroupSize = runByKeys clContext workGroupSize defaultBitCount diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 94a745c2..8f3fe936 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -428,7 +428,7 @@ module Reduce = let itemKeyId = lid + 1 let startKeyIndex = - (%Search.Bin.lowerPositionLocal) length itemKeyId localBitmap + (%Search.Bin.lowerPosition) length itemKeyId localBitmap match startKeyIndex with | Some startPosition -> @@ -473,135 +473,6 @@ module Reduce = reducedValues, reducedKeys module Option = - /// - /// Reduces values by key. Each segment is reduced by one work item. - /// - /// ClContext. - /// Work group size. - /// Operation for reducing values. - let segmentSequential<'a> - (reduceOp: Expr<'a option -> 'a option -> 'a option>) - (clContext: ClContext) - workGroupSize - = - - let kernel = - <@ fun (ndRange: Range1D) uniqueKeyCount keysLength (offsets: ClArray) (keys: ClArray) (values: ClArray<'a option>) (reducedValues: ClArray<'a>) (firstReducedKeys: ClArray) (resultPositions: ClArray) -> - - let gid = ndRange.GlobalID0 - - if gid < uniqueKeyCount then - let startPosition = - (%Search.Bin.lowerPosition) keysLength gid offsets - - match startPosition with - | Some startPosition -> - let firstSourceKey = keys.[startPosition] - - let mutable sum = None - - let mutable currentPosition = startPosition - - while currentPosition < keysLength - && firstSourceKey = keys.[currentPosition] do - let result = (%reduceOp) sum values.[currentPosition] // brahma error - sum <- result - currentPosition <- currentPosition + 1 - - match sum with - | Some value -> - reducedValues.[gid] <- value - resultPositions.[gid] <- 1 - | None -> resultPositions.[gid] <- 0 - - firstReducedKeys.[gid] <- firstSourceKey - | None -> () @> // not possible if done correctly - - let kernel = clContext.Compile kernel - - let getUniqueBitmap = - Bitmap.lastOccurrence clContext workGroupSize - - let scatterData = - Scatter.lastOccurrence clContext workGroupSize - - let scatterIndices = - Scatter.lastOccurrence clContext workGroupSize - - let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> - - let offsets = - getUniqueBitmap processor DeviceOnly keys - - let uniqueKeysCount = - (prefixSum processor offsets) - .ToHostAndFree processor - - let reducedValues = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) - - let reducedKeys = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) - - let resultPositions = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) - - let ndRange = - Range1D.CreateValid(uniqueKeysCount, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - uniqueKeysCount - keys.Length - offsets - keys - values - reducedValues - reducedKeys - resultPositions) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - offsets.Free processor - - let resultLength = - (prefixSum processor resultPositions) - .ToHostAndFree processor - - if resultLength = 0 then - reducedValues.Free processor - reducedKeys.Free processor - resultPositions.Free processor - None - else - // write values - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) - - scatterData processor resultPositions reducedValues resultValues - - reducedValues.Free processor - - // write keys - let resultKeys = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) - - scatterIndices processor resultPositions reducedKeys resultKeys - - reducedKeys.Free processor - resultPositions.Free processor - - Some(resultValues, resultKeys) - /// /// Reduces values by key. Each segment is reduced by one work item. /// @@ -609,13 +480,9 @@ module Reduce = /// Work group size. /// Operation for reducing values. /// - /// The length of the result and offsets for each segment must be calculated in advance. + /// The length of the result must be calculated in advance. /// - let segmentSequentialByOffsets<'a> - (reduceOp: Expr<'a -> 'a -> 'a option>) - (clContext: ClContext) - workGroupSize - = + let segmentSequential<'a> (reduceOp: Expr<'a -> 'a -> 'a option>) (clContext: ClContext) workGroupSize = let kernel = <@ fun (ndRange: Range1D) uniqueKeyCount keysLength (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) (reducedValues: ClArray<'a>) (firstReducedKeys: ClArray) (resultPositions: ClArray) -> @@ -701,10 +568,6 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then - reducedValues.Free processor - reducedKeys.Free processor - resultPositions.Free processor - None else // write values @@ -985,11 +848,6 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then - reducedValues.Free processor - firstReducedKeys.Free processor - secondReducedKeys.Free processor - resultPositions.Free processor - None else // write value diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index 3921770d..4198cbe0 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -1,4 +1,4 @@ - + @@ -33,13 +33,10 @@ - - - @@ -61,10 +58,10 @@ - + + - diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 0bea32dd..8f305001 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -405,7 +405,7 @@ module Matrix = let pairwise = ClArray.pairwise clContext workGroupSize let subtract = - Backend.Common.Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize + ClArray.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> let pointerPairs = diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 766925aa..2ae2678b 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -23,6 +23,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Columns)) q.Post(Msg.CreateFreeMsg<_>(this.RowPointers)) + q.PostAndReply(Msg.MsgNotifyMe) member this.Dispose q = (this :> IDeviceMemObject).Dispose q diff --git a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs index e7a221f1..82e25d8d 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs @@ -18,6 +18,7 @@ module ClVector = member this.Dispose(q) = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Indices)) + q.PostAndReply(Msg.MsgNotifyMe) member this.Dispose(q) = (this :> IDeviceMemObject).Dispose(q) diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index 2e99b7dc..5f43bc74 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -1,7 +1,6 @@ namespace GraphBLAS.FSharp open Brahma.FSharp -open Microsoft.FSharp.Core open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -61,11 +60,11 @@ module Operations = fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> - map2Dense processor allocationMode left right - |> ClVector.Dense - |> Some + ClVector.Dense + <| map2Dense processor allocationMode left right | ClVector.Sparse left, ClVector.Sparse right -> - Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) + ClVector.Sparse + <| map2Sparse processor allocationMode left right | _ -> failwith "Vector formats are not matching." /// @@ -91,11 +90,11 @@ module Operations = fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> - Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) + ClVector.Sparse + <| map2Sparse processor allocationMode left right | ClVector.Dense left, ClVector.Dense right -> - map2Dense processor allocationMode left right - |> ClVector.Dense - |> Some + ClVector.Dense + <| map2Dense processor allocationMode left right | _ -> failwith "Vector formats are not matching." /// @@ -294,7 +293,7 @@ module Operations = /// Type of binary function to combine entries. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let SpMVInPlace + let SpMVInplace (add: Expr<'c option -> 'c option -> 'c option>) (mul: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) @@ -310,69 +309,9 @@ module Operations = | _ -> failwith "Not implemented yet" /// - /// CSR Matrix - dense vector multiplication. - /// - /// Type of binary function to reduce entries. - /// Type of binary function to combine entries. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let SpMV - (add: Expr<'c option -> 'c option -> 'c option>) - (mul: Expr<'a option -> 'b option -> 'c option>) - (clContext: ClContext) - workGroupSize - = - - let run = SpMV.run add mul clContext workGroupSize - - fun (queue: MailboxProcessor<_>) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> - match matrix, vector with - | ClMatrix.CSR m, ClVector.Dense v -> run queue allocationFlag m v |> ClVector.Dense - | _ -> failwith "Not implemented yet" - - /// - /// CSR Matrix - sparse vector multiplication. Optimized for bool OR and AND operations. - /// - /// Type of binary function to reduce entries. - /// Type of binary function to combine entries. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let SpMSpVBool - (add: Expr bool option -> bool option>) - (mul: Expr bool option -> bool option>) - (clContext: ClContext) - workGroupSize - = - - let run = - SpMSpV.runBoolStandard add mul clContext workGroupSize - - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix) (vector: ClVector) -> - match matrix, vector with - | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) - | _ -> failwith "Not implemented yet" - - /// - /// CSR Matrix - sparse vector multiplication. + /// Matrix-vector multiplication. /// - /// Type of binary function to reduce entries. - /// Type of binary function to combine entries. - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let SpMSpV - (add: Expr<'c option -> 'c option -> 'c option>) - (mul: Expr<'a option -> 'b option -> 'c option>) - (clContext: ClContext) - workGroupSize - = - - let run = - SpMSpV.run add mul clContext workGroupSize - - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> - match matrix, vector with - | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) - | _ -> failwith "Not implemented yet" + let SpMV = SpMV.run /// /// Kronecker product for matrices. diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs index 45ff0df0..7c9229a1 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -1,4 +1,4 @@ -namespace GraphBLAS.FSharp.Backend.Operations.SpGeMM +namespace GraphBLAS.FSharp.Backend.Operations.SpGeMM open Brahma.FSharp open FSharp.Quotations @@ -37,7 +37,7 @@ module internal Expand = let multiply (predicate: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = let getBitmap = - Backend.Common.Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize + ClArray.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -174,10 +174,10 @@ module internal Expand = let sortByColumnsAndRows (clContext: ClContext) workGroupSize = let sortByKeyIndices = - Common.Sort.Radix.runByKeysStandardValuesOnly clContext workGroupSize + Common.Sort.Radix.runByKeysStandard clContext workGroupSize let sortByKeyValues = - Common.Sort.Radix.runByKeysStandardValuesOnly clContext workGroupSize + Common.Sort.Radix.runByKeysStandard clContext workGroupSize let sortKeys = Common.Sort.Radix.standardRunKeysOnly clContext workGroupSize @@ -213,7 +213,7 @@ module internal Expand = Common.Reduce.ByKey2D.Option.segmentSequential opAdd clContext workGroupSize let getUniqueBitmap = - Backend.Common.Bitmap.lastOccurrence2 clContext workGroupSize + ClArray.Bitmap.lastOccurrence2 clContext workGroupSize let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs deleted file mode 100644 index bca119a1..00000000 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs +++ /dev/null @@ -1,305 +0,0 @@ -namespace GraphBLAS.FSharp.Backend.Operations - -open Brahma.FSharp -open GraphBLAS.FSharp.Backend.Common -open GraphBLAS.FSharp.Backend.Quotes -open Microsoft.FSharp.Quotations -open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Objects.ClVector -open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Objects.ClCellExtensions - -module SpMSpV = - - //For v in vectorIndices collect R[v] and R[v + 1] - let private collectRows (clContext: ClContext) workGroupSize = - - let collectRows = - <@ fun (ndRange: Range1D) inputSize (vectorIndices: ClArray) (rowOffsets: ClArray) (resultArray: ClArray) -> - - let i = ndRange.GlobalID0 - - //resultArray is twice vector size - if i < (inputSize * 2) then - let columnIndex = vectorIndices.[i / 2] - - if i % 2 = 0 then - resultArray.[i] <- rowOffsets.[columnIndex] - else - resultArray.[i] <- rowOffsets.[columnIndex + 1] - elif i = inputSize * 2 then - resultArray.[i] <- 0 @> - - let collectRows = clContext.Compile collectRows - - fun (queue: MailboxProcessor<_>) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> - - let ndRange = - Range1D.CreateValid(size * 2 + 1, workGroupSize) - - // Last element will contain length of array for gather - let resultRows = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, size * 2 + 1) - - let collectRows = collectRows.GetKernel() - - queue.Post( - Msg.MsgSetArguments(fun () -> collectRows.KernelFunc ndRange size vectorIndices rowOffsets resultRows) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(collectRows)) - - resultRows - - //For above array compute result offsets - let private computeOffsetsInplace (clContext: ClContext) workGroupSize = - - let prepareOffsets = - <@ fun (ndRange: Range1D) inputSize (inputArray: ClArray) -> - - let i = ndRange.GlobalID0 - - if i < inputSize && i % 2 = 0 then - inputArray.[i + 1] <- inputArray.[i + 1] - inputArray.[i] - inputArray.[i] <- 0 @> - - let sum = - PrefixSum.standardExcludeInPlace clContext workGroupSize - - let prepareOffsets = clContext.Compile prepareOffsets - - fun (queue: MailboxProcessor<_>) size (input: ClArray) -> - - let ndRange = Range1D.CreateValid(size, workGroupSize) - - let prepareOffsets = prepareOffsets.GetKernel() - - queue.Post(Msg.MsgSetArguments(fun () -> prepareOffsets.KernelFunc ndRange size input)) - - queue.Post(Msg.CreateRunMsg<_, _>(prepareOffsets)) - - let resSize = (sum queue input).ToHostAndFree queue - - resSize - - //Gather rows from the matrix that will be used in multiplication - let private gather (clContext: ClContext) workGroupSize = - - let gather = - <@ fun (ndRange: Range1D) vectorNNZ (rowOffsets: ClArray) (matrixRowPointers: ClArray) (matrixColumns: ClArray) (matrixValues: ClArray<'a>) (vectorIndices: ClArray) (resultRowsArray: ClArray) (resultIndicesArray: ClArray) (resultValuesArray: ClArray<'a>) -> - - //Serial number of row to gather - let row = ndRange.GlobalID0 - - if row < vectorNNZ then - let offsetIndex = row * 2 + 1 - let rowOffset = rowOffsets.[offsetIndex] - - //vectorIndices.[row] --- actual number of row in matrix - let actualRow = vectorIndices.[row] - let matrixIndexOffset = matrixRowPointers.[actualRow] - - if rowOffset <> rowOffsets.[offsetIndex + 1] then - let rowSize = rowOffsets.[offsetIndex + 1] - rowOffset - - for i in 0 .. rowSize - 1 do - resultRowsArray.[i + rowOffset] <- actualRow - resultIndicesArray.[i + rowOffset] <- matrixColumns.[matrixIndexOffset + i] - resultValuesArray.[i + rowOffset] <- matrixValues.[matrixIndexOffset + i] @> - - let collectRows = collectRows clContext workGroupSize - - let computeOffsetsInplace = - computeOffsetsInplace clContext workGroupSize - - let gather = clContext.Compile gather - - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - - //Collect R[v] and R[v + 1] for each v in vector - let collectedRows = - collectRows queue vector.NNZ vector.Indices matrix.RowPointers - - //Place R[v + 1] - R[v] in previous array and do prefix sum, computing offsets for gather array - let gatherArraySize = - computeOffsetsInplace queue (vector.NNZ * 2 + 1) collectedRows - - if gatherArraySize = 0 then - collectedRows.Free queue - None - else - let ndRange = - Range1D.CreateValid(vector.NNZ, workGroupSize) - - let gather = gather.GetKernel() - - let resultRows = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, gatherArraySize) - - let resultIndices = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, gatherArraySize) - - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, gatherArraySize) - - if gatherArraySize > 0 then - queue.Post( - Msg.MsgSetArguments - (fun () -> - gather.KernelFunc - ndRange - vector.NNZ - collectedRows - matrix.RowPointers - matrix.Columns - matrix.Values - vector.Indices - resultRows - resultIndices - resultValues) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(gather)) - - collectedRows.Free queue - - Some(resultRows, resultIndices, resultValues) - - - let private multiplyScalar (clContext: ClContext) (mul: Expr<'a option -> 'b option -> 'c option>) workGroupSize = - - let multiply = - <@ fun (ndRange: Range1D) resultLength vectorLength (rowIndices: ClArray) (matrixValues: ClArray<'a>) (vectorIndices: ClArray) (vectorValues: ClArray<'b>) (resultValues: ClArray<'c option>) -> - let i = ndRange.GlobalID0 - - if i < resultLength then - let index = rowIndices.[i] - let matrixValue = matrixValues.[i] - - let vectorValue = - (%Search.Bin.byKey) vectorLength index vectorIndices vectorValues - - let res = (%mul) (Some matrixValue) vectorValue - resultValues.[i] <- res @> - - let multiply = clContext.Compile multiply - - fun (queue: MailboxProcessor<_>) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> - - let resultLength = columnIndices.Length - - let result = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) - - let ndRange = - Range1D.CreateValid(resultLength, workGroupSize) - - let multiply = multiply.GetKernel() - - queue.Post( - Msg.MsgSetArguments - (fun () -> - multiply.KernelFunc - ndRange - resultLength - vector.NNZ - columnIndices - matrixValues - vector.Indices - vector.Values - result) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(multiply)) - - result - - let run - (add: Expr<'c option -> 'c option -> 'c option>) - (mul: Expr<'a option -> 'b option -> 'c option>) - (clContext: ClContext) - workGroupSize - = - - //TODO: Common.Gather? - let gather = gather clContext workGroupSize - - //TODO: Radix sort - let sort = - Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize - - let multiplyScalar = - multiplyScalar clContext mul workGroupSize - - let segReduce = - Reduce.ByKey.Option.segmentSequential add clContext workGroupSize - - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - gather queue matrix vector - |> Option.map - (fun (gatherRows, gatherIndices, gatherValues) -> - sort queue gatherIndices gatherRows gatherValues - - let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues - - let multipliedValues = - multiplyScalar queue sortedRows sortedValues vector - - sortedValues.Free queue - sortedRows.Free queue - - let result = - segReduce queue DeviceOnly sortedIndices multipliedValues - |> Option.map - (fun (reducedValues, reducedKeys) -> - - { Context = clContext - Indices = reducedKeys - Values = reducedValues - Size = matrix.ColumnCount }) - - multipliedValues.Free queue - sortedIndices.Free queue - - result) - |> Option.bind id - - - let runBoolStandard - (add: Expr<'c option -> 'c option -> 'c option>) - (mul: Expr<'a option -> 'b option -> 'c option>) - (clContext: ClContext) - workGroupSize - = - - let gather = gather clContext workGroupSize - - let sort = - Sort.Radix.standardRunKeysOnly clContext workGroupSize - - let removeDuplicates = - GraphBLAS.FSharp.ClArray.removeDuplications clContext workGroupSize - - let create = - GraphBLAS.FSharp.ClArray.create clContext workGroupSize - - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> - - gather queue matrix vector - |> Option.map - (fun (gatherRows, gatherIndices, gatherValues) -> - gatherRows.Free queue - gatherValues.Free queue - - let sortedIndices = sort queue gatherIndices - - let resultIndices = removeDuplicates queue sortedIndices - - gatherIndices.Free queue - sortedIndices.Free queue - - { Context = clContext - Indices = resultIndices - Values = create queue DeviceOnly resultIndices.Length true - Size = matrix.ColumnCount }) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 8dc37dec..f79a2193 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -1,7 +1,6 @@ -namespace GraphBLAS.FSharp.Backend.Quotes +namespace GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects -open Microsoft.FSharp.Quotations module ArithmeticOperations = let inline private mkUnaryOp zero unaryOp = @@ -37,16 +36,6 @@ module ArithmeticOperations = if res = zero then None else Some res @> - let inline private mkNumericSumAsMul zero = - <@ fun (x: 't option) (y: 't option) -> - let mutable res = None - - match x, y with - | Some f, Some s -> res <- Some(f + s) - | _ -> () - - res @> - let inline private mkNumericMul zero = <@ fun (x: 't option) (y: 't option) -> let mutable res = zero @@ -184,16 +173,12 @@ module ArithmeticOperations = let floatMulAtLeastOne = mkNumericMulAtLeastOne 0.0 let float32MulAtLeastOne = mkNumericMulAtLeastOne 0f - let intSumAsMul = mkNumericSumAsMul System.Int32.MaxValue - let notOption = <@ fun x -> match x with | Some true -> None | _ -> Some true @> - let intNotQ = <@ fun x -> if x = 0 then 1 else 0 @> - let inline private binOpQ zero op = <@ fun (left: 'a) (right: 'a) -> let result = (%op) left right @@ -231,42 +216,3 @@ module ArithmeticOperations = let floatMul = createPair 0.0 (*) <@ (*) @> let float32Mul = createPair 0.0f (*) <@ (*) @> - - // without zero - let intAddWithoutZero = <@ fun x y -> Some(x + y) @> - - let intMulWithoutZero = <@ fun x y -> Some(x * y) @> - - // other operations - let less<'a when 'a: comparison> = - <@ fun (x: 'a option) (y: 'a option) -> - match x, y with - | Some x, Some y -> if (x < y) then Some 1 else None - | Some x, None -> Some 1 - | _ -> None @> - - let minOption<'a when 'a: comparison> = - <@ fun (x: 'a option) (y: 'a option) -> - match x, y with - | Some x, Some y -> Some(min x y) - | Some x, None -> Some x - | None, Some y -> Some y - | _ -> None @> - - let min<'a when 'a: comparison> = - <@ fun (x: 'a) (y: 'a) -> Some(min x y) @> - - let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @> - - //PageRank specific - let squareOfDifference = - <@ fun (x: float32 option) (y: float32 option) -> - let mutable res = 0.0f - - match x, y with - | Some f, Some s -> res <- (f - s) * (f - s) - | Some f, None -> res <- f * f - | None, Some s -> res <- s * s - | None, None -> () - - if res = 0.0f then None else Some res @> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Map.fs b/src/GraphBLAS-sharp.Backend/Quotes/Map.fs index 9a518e40..2f74a7c5 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Map.fs @@ -28,11 +28,6 @@ module Map = | Some _ -> 1 | None -> 0 @> - let predicateBitmap<'a> (predicate: Expr<'a -> bool>) = - <@ fun (x: 'a) -> - let res = (%predicate) x - if res then 1 else 0 @> - let inc = <@ fun item -> item + 1 @> let subtraction = <@ fun first second -> first - second @> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs b/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs index 9b19b5b1..3a27b5d6 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs @@ -7,12 +7,6 @@ module Mask = | _, None -> left | _ -> right @> - let assignComplemented<'a when 'a: struct> = - <@ fun (left: 'a option) (right: 'a option) -> - match left, right with - | _, None -> right - | _ -> left @> - let op<'a, 'b when 'a: struct and 'b: struct> = <@ fun (left: 'a option) (right: 'b option) -> match right with diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs index 27687645..07660c28 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs @@ -130,32 +130,6 @@ module Search = /// Find lower position of item in array. /// let lowerPosition<'a when 'a: equality and 'a: comparison> = - <@ fun length sourceItem (keys: ClArray<'a>) -> - - let mutable leftEdge = 0 - let mutable rightEdge = length - 1 - let mutable resultPosition = None - - while leftEdge <= rightEdge do - let currentPosition = (leftEdge + rightEdge) / 2 - let currentKey = keys.[currentPosition] - - if sourceItem = currentKey then - // remember positions and move left - resultPosition <- Some currentPosition - - rightEdge <- currentPosition - 1 - elif sourceItem < currentKey then - rightEdge <- currentPosition - 1 - else - leftEdge <- currentPosition + 1 - - resultPosition @> - - /// - /// Find lower position of item in array. - /// - let lowerPositionLocal<'a when 'a: equality and 'a: comparison> = <@ fun length sourceItem (keys: 'a []) -> let mutable leftEdge = 0 diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 6b6a7629..a99cd8c4 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -3,7 +3,6 @@ namespace GraphBLAS.FSharp.Backend.Vector.Dense open Brahma.FSharp open Microsoft.FSharp.Quotations open GraphBLAS.FSharp -open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -16,7 +15,7 @@ module Vector = workGroupSize = - let map = Map.map op clContext workGroupSize + let map = ClArray.map op clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) -> @@ -29,7 +28,7 @@ module Vector = = let map2InPlace = - Map.map2InPlace opAdd clContext workGroupSize + ClArray.map2InPlace opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> @@ -41,7 +40,8 @@ module Vector = workGroupSize = - let map2 = Map.map2 opAdd clContext workGroupSize + let map2 = + ClArray.map2 opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> @@ -66,24 +66,20 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> + fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(leftVector.Length, workGroupSize) let kernel = kernel.GetKernel() - let valueCell = clContext.CreateClCell(value) - processor.Post( Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector valueCell resultVector) + (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector value resultVector) ) processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - valueCell.Free processor - let assignByMask<'a, 'b when 'a: struct and 'b: struct> (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) (clContext: ClContext) @@ -93,7 +89,7 @@ module Vector = let assignByMask = assignByMaskInPlace maskOp clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: ClCell<'a>) -> let resultVector = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftVector.Length) @@ -101,49 +97,6 @@ module Vector = resultVector - let assignBySparseMaskInPlace<'a, 'b when 'a: struct and 'b: struct> - (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) - (clContext: ClContext) - workGroupSize - = - - let fillSubVectorKernel = - <@ fun (ndRange: Range1D) resultLength (leftVector: ClArray<'a option>) (maskVectorIndices: ClArray) (maskVectorValues: ClArray<'b>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> - - let gid = ndRange.GlobalID0 - - if gid < resultLength then - let i = maskVectorIndices.[gid] - resultVector.[i] <- (%maskOp) leftVector.[i] (Some maskVectorValues.[gid]) value.Value @> - - let kernel = clContext.Compile(fillSubVectorKernel) - - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> - - let ndRange = - Range1D.CreateValid(maskVector.NNZ, workGroupSize) - - let kernel = kernel.GetKernel() - - let valueCell = clContext.CreateClCell(value) - - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - maskVector.NNZ - leftVector - maskVector.Indices - maskVector.Values - valueCell - resultVector) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - valueCell.Free processor - let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = let scatterValues = @@ -153,7 +106,7 @@ module Vector = Common.Scatter.lastOccurrence clContext workGroupSize let getBitmap = - Map.map (Map.option 1 0) clContext workGroupSize + ClArray.map (Map.option 1 0) clContext workGroupSize let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -162,7 +115,7 @@ module Vector = ClArray.init Map.id clContext workGroupSize let allValues = - Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize + ClArray.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (vector: ClArray<'a option>) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs index 8ad13044..07e6e5e7 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs @@ -3,7 +3,6 @@ namespace GraphBLAS.FSharp.Backend.Vector.Sparse open Brahma.FSharp open Microsoft.FSharp.Control open GraphBLAS.FSharp -open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions @@ -75,7 +74,7 @@ module internal Common = let concatIndices = ClArray.concat clContext workGroupSize let mapIndices = - Common.Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> + ClArray.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> fun (processor: MailboxProcessor<_>) allocationMode (vectors: Sparse<'a> seq) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs index f0a69a41..329e5484 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs @@ -95,7 +95,7 @@ module internal Map = queue.Post(Msg.CreateFreeMsg<_>(indices)) { Context = clContext - Indices = resultIndices + Indices = indices Values = resultValues Size = vector.Size } diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index fb91840f..feb6e484 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -4,11 +4,9 @@ open Brahma.FSharp open FSharp.Quotations open Microsoft.FSharp.Control open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Backend.Quotes -open Microsoft.FSharp.Core module internal Map2 = let private preparePositions<'a, 'b, 'c> opAdd (clContext: ClContext) workGroupSize = @@ -80,7 +78,7 @@ module internal Map2 = preparePositions<'a, 'b, 'c> op clContext workGroupSize let setPositions = - Common.setPositionsOption clContext workGroupSize + Common.setPositions clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> @@ -93,113 +91,17 @@ module internal Map2 = rightVector.Values rightVector.Indices - let result = - setPositions processor allocationMode allValues allIndices bitmap - |> Option.map - (fun (resultValues, resultIndices) -> - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = leftVector.Size }) - - allIndices.Free processor - allValues.Free processor - bitmap.Free processor - - result - - let private preparePositionsSparseDense<'a, 'b, 'c> (clContext: ClContext) workGroupSize opAdd = - - let preparePositions (op: Expr<'a option -> 'b option -> 'c option>) = - <@ fun (ndRange: Range1D) length (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) (resultBitmap: ClArray) (resultValues: ClArray<'c>) (resultIndices: ClArray) -> - - let gid = ndRange.GlobalID0 - - if gid < length then - - let i = leftIndices.[gid] - - let (leftValue: 'a option) = Some leftValues.[gid] - - let (rightValue: 'b option) = rightValues.[i] - - match (%op) leftValue rightValue with - | Some value -> - resultValues.[gid] <- value - resultIndices.[gid] <- i - - resultBitmap.[gid] <- 1 - | None -> resultBitmap.[gid] <- 0 @> - - let kernel = - clContext.Compile <| preparePositions opAdd - - fun (processor: MailboxProcessor<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> - - let resultBitmap = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) - - let resultIndices = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) - - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode<'c>(DeviceOnly, vectorLenght) - - let ndRange = - Range1D.CreateValid(vectorLenght, workGroupSize) - - let kernel = kernel.GetKernel() - - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - vectorLenght - leftValues - leftIndices - rightValues - resultBitmap - resultValues - resultIndices) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - resultBitmap, resultValues, resultIndices - - //TODO: unify with sparseXsparse - let runSparseDense<'a, 'b, 'c when 'a: struct and 'b: struct and 'c: struct> - op - (clContext: ClContext) - workGroupSize - = - - let prepare = - preparePositionsSparseDense<'a, 'b, 'c> clContext workGroupSize op - - let setPositions = - Common.setPositionsOption clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> - - let bitmap, allValues, allIndices = - prepare processor leftVector.NNZ leftVector.Values leftVector.Indices rightVector - - let result = + let resultValues, resultIndices = setPositions processor allocationMode allValues allIndices bitmap - |> Option.map - (fun (resultValues, resultIndices) -> - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = leftVector.Size }) - allIndices.Free processor - allValues.Free processor - bitmap.Free processor + processor.Post(Msg.CreateFreeMsg<_>(allIndices)) + processor.Post(Msg.CreateFreeMsg<_>(allValues)) + processor.Post(Msg.CreateFreeMsg<_>(bitmap)) - result + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = max leftVector.Size rightVector.Size } let private preparePositionsAssignByMask<'a, 'b when 'a: struct and 'b: struct> op @@ -281,9 +183,7 @@ module internal Map2 = let setPositions = Common.setPositions clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> - - let valueCell = clContext.CreateClCell(value) + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: ClCell<'a>) -> let bitmap, values, indices = prepare @@ -293,12 +193,11 @@ module internal Map2 = leftVector.Indices rightVector.Values rightVector.Indices - valueCell + value let resultValues, resultIndices = setPositions processor allocationMode values indices bitmap - processor.Post(Msg.CreateFreeMsg<_>(valueCell)) processor.Post(Msg.CreateFreeMsg<_>(indices)) processor.Post(Msg.CreateFreeMsg<_>(values)) processor.Post(Msg.CreateFreeMsg<_>(bitmap)) @@ -381,7 +280,7 @@ module internal Map2 = preparePositions<'a, 'b, 'c> op clContext workGroupSize let setPositions = - Common.setPositionsOption clContext workGroupSize + Common.setPositions clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> @@ -394,17 +293,14 @@ module internal Map2 = processor.Post(Msg.CreateFreeMsg<_>(rightValues)) processor.Post(Msg.CreateFreeMsg<_>(isLeft)) - let result = + let resultValues, resultIndices = setPositions processor allocationMode allValues allIndices positions - |> Option.map - (fun (resultValues, resultIndices) -> - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = max leftVector.Size rightVector.Size }) processor.Post(Msg.CreateFreeMsg<_>(allIndices)) processor.Post(Msg.CreateFreeMsg<_>(allValues)) processor.Post(Msg.CreateFreeMsg<_>(positions)) - result + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = max leftVector.Size rightVector.Size } diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index 1a7fb8f7..98aae51b 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -36,8 +36,6 @@ module Vector = let map2 = Map2.run - let map2SparseDense = Map2.runSparseDense - let map2AtLeastOne opAdd (clContext: ClContext) workGroupSize allocationMode = Map2.AtLeastOne.run (Convert.atLeastOneToOption opAdd) clContext workGroupSize allocationMode diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index 92ba3d1b..edf40fea 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -26,20 +26,6 @@ let testFixtures (testContext: TestContext) = context workGroupSize - let bfsSparse = - Algorithms.BFS.singleSourceSparse - ArithmeticOperations.intSumOption - ArithmeticOperations.intMulOption - context - workGroupSize - - let bfsPushPull = - Algorithms.BFS.singleSourcePushPull - ArithmeticOperations.intSumOption - ArithmeticOperations.intMulOption - context - workGroupSize - testPropertyWithConfig config testName <| fun (matrix: int [,]) -> @@ -60,34 +46,22 @@ let testFixtures (testContext: TestContext) = let matrix = matrixHost.ToDevice context - let res = bfs queue matrix source - - let resSparse = bfsSparse queue matrix source - - let resPushPull = bfsPushPull queue matrix source - - let resHost = res.ToHost queue - let resHostSparse = resSparse.ToHost queue - let resHostPushPull = resPushPull.ToHost queue - - matrix.Dispose queue - res.Dispose queue - resSparse.Dispose queue - resPushPull.Dispose queue + match matrix with + | ClMatrix.CSR mtx -> + let res = + bfs queue matrix source |> ClVector.Dense - match resHost, resHostSparse, resHostPushPull with - | Vector.Dense resHost, Vector.Dense resHostSparse, Vector.Dense resHostPushPull -> - let actual = resHost |> Utils.unwrapOptionArray 0 + let resHost = res.ToHost queue - let actualSparse = - resHostSparse |> Utils.unwrapOptionArray 0 + (mtx :> IDeviceMemObject).Dispose queue + res.Dispose queue - let actualPushPull = - resHostPushPull |> Utils.unwrapOptionArray 0 + match resHost with + | Vector.Dense resHost -> + let actual = resHost |> Utils.unwrapOptionArray 0 - Expect.sequenceEqual actual expected "Dense bfs is not as expected" - Expect.sequenceEqual actualSparse expected "Sparse bfs is not as expected" - Expect.sequenceEqual actualPushPull expected "Push-pull bfs is not as expected" + Expect.sequenceEqual actual expected "Sequences must be equal" + | _ -> failwith "Not implemented" | _ -> failwith "Not implemented" ] let tests = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs deleted file mode 100644 index 72f30025..00000000 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ /dev/null @@ -1,118 +0,0 @@ -module GraphBLAS.FSharp.Tests.Backend.Algorithms.PageRank - -open Expecto -open GraphBLAS.FSharp -open GraphBLAS.FSharp.Tests -open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp.Objects.ClVectorExtensions -open GraphBLAS.FSharp.Objects - -let private alpha = 0.85f -let private accuracy = 0.00001f - -let prepareNaive (matrix: float32 [,]) = - let result = Array2D.copy matrix - let rowCount = Array2D.length1 matrix - let outDegrees = Array.zeroCreate rowCount - - //Count degree - Array2D.iteri (fun r c v -> outDegrees.[r] <- outDegrees.[r] + (if v <> 0f then 1f else 0f)) matrix - - //Set value - Array2D.iteri - (fun r c v -> - result.[r, c] <- - if v <> 0f then - alpha / outDegrees.[r] - else - 0f) - matrix - - //Transpose - Array2D.iteri - (fun r c _ -> - if r > c then - let temp = result.[r, c] - result.[r, c] <- result.[c, r] - result.[c, r] <- temp) - matrix - - result - -let pageRankNaive (matrix: float32 [,]) = - let rowCount = Array2D.length1 matrix - let mutable result = Array.zeroCreate rowCount - - let mutable prev = - Array.create rowCount (1f / (float32 rowCount)) - - let mutable error = accuracy + 1f - let addConst = (1f - alpha) / (float32 rowCount) - - while (error > accuracy) do - for r in 0 .. rowCount - 1 do - result.[r] <- 0f - - for c in 0 .. rowCount - 1 do - result.[r] <- result.[r] + matrix.[r, c] * prev.[c] - - result.[r] <- result.[r] + addConst - - error <- - sqrt - <| Array.fold2 (fun e x1 x2 -> e + (x1 - x2) * (x1 - x2)) 0f result prev - - let temp = result - result <- prev - prev <- temp - - prev - -let testFixtures (testContext: TestContext) = - [ let config = Utils.undirectedAlgoConfig - let context = testContext.ClContext - let queue = testContext.Queue - let workGroupSize = Utils.defaultWorkGroupSize - - let testName = - sprintf "Test on %A" testContext.ClContext - - let pageRank = - Algorithms.PageRank.run context workGroupSize - - testPropertyWithConfig config testName - <| fun (matrix: float32 [,]) -> - let matrixHost = - Utils.createMatrixFromArray2D CSR matrix ((=) 0f) - - if matrixHost.NNZ > 0 then - let preparedMatrixExpected = prepareNaive matrix - - let expected = pageRankNaive preparedMatrixExpected - - let matrix = matrixHost.ToDevice context - - let preparedMatrix = - Algorithms.PageRank.prepareMatrix context workGroupSize queue matrix - - let res = pageRank queue preparedMatrix accuracy - - let resHost = res.ToHost queue - - preparedMatrix.Dispose queue - matrix.Dispose queue - res.Dispose queue - - match resHost with - | Vector.Dense resHost -> - let actual = resHost |> Utils.unwrapOptionArray 0f - - for i in 0 .. actual.Length - 1 do - Expect.isTrue - ((abs (actual.[i] - expected.[i])) < accuracy) - (sprintf "Values should be equal. Expected %A, actual %A" expected.[i] actual.[i]) - - | _ -> failwith "Not implemented" ] - -let tests = - TestCases.gpuTests "PageRank tests" testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs deleted file mode 100644 index 78feff8f..00000000 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ /dev/null @@ -1,63 +0,0 @@ -module GraphBLAS.FSharp.Tests.Backend.Algorithms.SSSP - -open Expecto -open GraphBLAS.FSharp.Backend -open GraphBLAS.FSharp.Backend.Common -open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Tests -open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms -open GraphBLAS.FSharp.Tests.Backend.QuickGraph.CreateGraph -open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Objects.ClVectorExtensions - -let testFixtures (testContext: TestContext) = - [ let config = Utils.undirectedAlgoConfig - let context = testContext.ClContext - let queue = testContext.Queue - let workGroupSize = Utils.defaultWorkGroupSize - - let testName = - sprintf "Test on %A" testContext.ClContext - - let ssspDense = - Algorithms.SSSP.run context workGroupSize - - testPropertyWithConfig config testName - <| fun (matrix: int [,]) -> - - let matrix = Array2D.map (fun x -> abs x) matrix - - let graph = undirectedFromArray2D matrix 0 - - let largestComponent = - ConnectedComponents.largestComponent graph - - if largestComponent.Length > 0 then - let source = largestComponent.[0] - - let expected = - SSSP.runUndirected matrix (directedFromArray2D matrix 0) source - |> Array.map (Option.map int) - - let matrixHost = - Utils.createMatrixFromArray2D CSR matrix ((=) 0) - - let matrix = matrixHost.ToDevice context - - let resDense = ssspDense queue matrix source - - let resHost = resDense.ToHost queue - - matrix.Dispose queue - resDense.Dispose queue - - match resHost with - | Vector.Dense resHost -> - let actual = resHost - - Expect.sequenceEqual actual expected "Sequences must be equal" - | _ -> failwith "Not implemented" ] - -let tests = - TestCases.gpuTests "SSSP tests" testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs index b87816ba..1cb85d29 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs @@ -4,7 +4,7 @@ open Expecto open Brahma.FSharp open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -44,7 +44,7 @@ let createTest<'a when 'a: equality> (testContext: TestContext) (zero: 'a) isEqu let context = testContext.ClContext let map = - Map.map (Map.optionToValueOrZero zero) context wgSize + ClArray.map (Map.optionToValueOrZero zero) context wgSize makeTest testContext map zero isEqual |> testPropertyWithConfig config $"Correctness on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs index 69b28dad..0b5ab49b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs @@ -4,7 +4,7 @@ open Expecto open Brahma.FSharp open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -43,7 +43,7 @@ let createTest<'a when 'a: equality> (testContext: TestContext) isEqual hostMapF let context = testContext.ClContext - let map = Map.map2 mapFunQ context wgSize + let map = ClArray.map2 mapFunQ context wgSize makeTest<'a> testContext map hostMapFun isEqual |> testPropertyWithConfig config $"Correctness on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs index 1ff419ef..0e58f323 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs @@ -430,7 +430,7 @@ let testOption<'a> isEqual reduceOp testFun (array: (int * 'a) []) = |> checkResultOption isEqual keys values reduceOp let createTestOption (isEqual: 'a -> 'a -> bool) (reduceOpQ, reduceOp) = - Common.Reduce.ByKey.Option.segmentSequentialByOffsets reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.Option.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize |> testOption<'a> isEqual reduceOp |> testPropertyWithConfig { config with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs index 44206379..9de0e054 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs @@ -16,13 +16,8 @@ let processor = Context.defaultContext.Queue let context = Context.defaultContext.ClContext -let checkResultByKeys (inputArray: (int * 'a) []) (actualKeys: int []) (actualValues: 'a []) = - let expected = Seq.sortBy fst inputArray - let expectedKeys = expected |> Seq.map fst - let expectedValues = expected |> Seq.map snd - - "Keys must be the same" - |> Expect.sequenceEqual expectedKeys actualKeys +let checkResultByKeys (inputArray: (int * 'a) []) (actualValues: 'a []) = + let expectedValues = Seq.sortBy fst inputArray |> Seq.map snd "Values must be the same" |> Expect.sequenceEqual expectedValues actualValues @@ -36,13 +31,12 @@ let makeTestByKeys<'a when 'a: equality> sortFun (array: (int * 'a) []) = let clKeys = keys.ToDevice context let clValues = values.ToDevice context - let clActualKeys, clActualValues: ClArray * ClArray<'a> = + let clActualValues: ClArray<'a> = sortFun processor HostInterop clKeys clValues - let actualKeys = clActualKeys.ToHostAndFree processor let actualValues = clActualValues.ToHostAndFree processor - checkResultByKeys array actualKeys actualValues + checkResultByKeys array actualValues let createTestByKeys<'a when 'a: equality and 'a: struct> = let sort = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs deleted file mode 100644 index ba4f3328..00000000 --- a/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs +++ /dev/null @@ -1,37 +0,0 @@ -namespace GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms - -open QuikGraph -open QuikGraph.Algorithms.ShortestPath -open QuikGraph.Algorithms.Observers - -module SSSP = - let runUndirected (matrix: int [,]) (graph: AdjacencyGraph>) source = - let weight = - fun (e: Edge) -> float matrix.[e.Source, e.Target] - - let dijkstra = - DijkstraShortestPathAlgorithm>(graph, weight) - - // Attach a distance observer to give us the shortest path distances - let distObserver = - VertexDistanceRecorderObserver>(weight) - - distObserver.Attach(dijkstra) |> ignore - - // Attach a Vertex Predecessor Recorder Observer to give us the paths - let predecessorObserver = - VertexPredecessorRecorderObserver>() - - predecessorObserver.Attach(dijkstra) |> ignore - - // Run the algorithm with A set to be the source - dijkstra.Compute(source) - - let res: array = - Array.zeroCreate (Array2D.length1 matrix) - - for kvp in distObserver.Distances do - res.[kvp.Key] <- Some kvp.Value - - res.[source] <- Some 0.0 - res diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs index 3c0fb675..737c5831 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs @@ -51,7 +51,7 @@ let checkResult isZero isComplemented (actual: Vector<'a>) (vector: 'a []) (mask let makeTest<'a when 'a: struct and 'a: equality> (isZero: 'a -> bool) (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) + (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClCell<'a> -> ClVector<'a>) isComplemented case (vector: 'a [], mask: 'a [], value: 'a) @@ -72,9 +72,10 @@ let makeTest<'a when 'a: struct and 'a: equality> let clMaskVector = maskVector.ToDevice context try + let clValue = context.CreateClCell<'a> value let clActual = - fillVector q HostInterop clLeftVector clMaskVector value + fillVector q HostInterop clLeftVector clMaskVector clValue let cooClActual = toDense q HostInterop clActual diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs index 771798c7..aac15b20 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs @@ -44,7 +44,7 @@ let correctnessGenericTest isEqual zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) + (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a>) (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) case (leftArray: 'a [], rightArray: 'a []) @@ -71,20 +71,17 @@ let correctnessGenericTest let res = addFun q HostInterop firstVector secondVector - match res with - | Some res -> - let denseActual = toDense q HostInterop res + firstVector.Dispose q + secondVector.Dispose q - let actual = denseActual.ToHost q + let denseActual = toDense q HostInterop res - res.Dispose q - denseActual.Dispose q + let actual = denseActual.ToHost q - checkResult isEqual zero op actual leftArray rightArray - | _ -> () + res.Dispose q + denseActual.Dispose q - firstVector.Dispose q - secondVector.Dispose q + checkResult isEqual zero op actual leftArray rightArray with | ex when ex.Message = "InvalidBufferSize" -> () | ex -> raise ex diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs deleted file mode 100644 index c554b25e..00000000 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ /dev/null @@ -1,165 +0,0 @@ -module GraphBLAS.FSharp.Tests.Backend.Vector.SpMSpV - -open GraphBLAS.FSharp -open GraphBLAS.FSharp.Objects.ArraysExtensions -open Expecto -open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Tests -open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp.Tests.TestCases -open Microsoft.FSharp.Collections -open Microsoft.FSharp.Core -open GraphBLAS.FSharp.Objects - -let config = Utils.defaultConfig - -let wgSize = Utils.defaultWorkGroupSize - -let checkResult - sumOp - mulOp - (zero: 'a) - (baseMtx: 'a [,]) - (baseVtr: 'a []) - (actualIndices: int []) - (actualValues: 'a []) - = - let rows = Array2D.length1 baseMtx - let columns = Array2D.length2 baseMtx - - let expectedV = Array.create columns zero - let mutable expectedIndices = List.Empty - let mutable expectedValues = List.Empty - - for c in 0 .. columns - 1 do - let mutable sum = zero - - for r in 0 .. rows - 1 do - sum <- sumOp sum (mulOp baseMtx.[r, c] baseVtr.[r]) - - expectedV.[c] <- sum - - for i in 0 .. columns - 1 do - if expectedV.[i] <> zero then - expectedIndices <- List.append expectedIndices [ i ] - expectedValues <- List.append expectedValues [ expectedV.[i] ] - - Expect.sequenceEqual - actualIndices - expectedIndices - $"Values should be the same. Actual is {actualIndices}, expected {expectedIndices}." - - Expect.sequenceEqual - actualValues - expectedValues - $"Values should be the same. Actual is {actualValues}, expected {expectedValues}." - -let correctnessGenericTest - (zero: 'a) - some - sumOp - mulOp - (spMV: MailboxProcessor<_> -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) - (isEqual: 'a -> 'a -> bool) - q - (testContext: TestContext) - (vector: 'a [], matrix: 'a [,], _: bool []) - = - - if (Array2D.length1 matrix > 0 && vector.Length > 0) then - //Ensure that result is not empty - vector.[0] <- some - matrix.[0, 0] <- some - - let mtx = - Utils.createMatrixFromArray2D CSR matrix (isEqual zero) - - let vtr = - Utils.createVectorFromArray Sparse vector (isEqual zero) - - if mtx.NNZ > 0 && vtr.Size > 0 then - try - let m = mtx.ToDevice testContext.ClContext - - let v = vtr.ToDevice testContext.ClContext - - match spMV testContext.Queue m v with - | Some (ClVector.Sparse res) -> - m.Dispose q - v.Dispose q - let hostResIndices = res.Indices.ToHost q - let hostResValues = res.Values.ToHost q - res.Dispose q - - checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues - | _ -> failwith "Result should not be empty while standard operations are tested" - with - | ex when ex.Message = "InvalidBufferSize" -> () - | ex -> raise ex - -let createTest spmspv testContext (zero: 'a) some isEqual add mul addQ mulQ = - let context = testContext.ClContext - let q = testContext.Queue - - let getCorrectnessTestName datatype = - $"Correctness on %s{datatype}, %A{testContext.ClContext}" - - let spMSpV = spmspv addQ mulQ context wgSize - - testContext - |> correctnessGenericTest zero some add mul spMSpV isEqual q - |> testPropertyWithConfig config (getCorrectnessTestName $"{typeof<'a>}") - - -let testFixturesSpMSpV (testContext: TestContext) = - [ let context = testContext.ClContext - let q = testContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) - - createTest - Operations.SpMSpVBool - testContext - false - true - (=) - (||) - (&&) - ArithmeticOperations.boolSumOption - ArithmeticOperations.boolMulOption - - createTest - Operations.SpMSpV - testContext - 0 - 1 - (=) - (+) - (*) - ArithmeticOperations.intSumOption - ArithmeticOperations.intMulOption - - createTest - Operations.SpMSpV - testContext - 0.0f - 1f - (=) - (+) - (*) - ArithmeticOperations.float32SumOption - ArithmeticOperations.float32MulOption - - if Utils.isFloat64Available context.ClDevice then - createTest - Operations.SpMSpV - testContext - 0.0 - 1 - (=) - (+) - (*) - ArithmeticOperations.floatSumOption - ArithmeticOperations.floatMulOption ] - -let tests = - gpuTests "Backend.Vector.SpMSpV tests" testFixturesSpMSpV diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index 45ab8054..aed7ea50 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -51,7 +51,7 @@ let correctnessGenericTest zero sumOp mulOp - (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) + (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix.CSR<'a> -> ClArray<'a option> -> ClArray<'a option>) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -68,15 +68,14 @@ let correctnessGenericTest try let m = mtx.ToDevice testContext.ClContext - let v = vtr.ToDevice testContext.ClContext + match vtr, m with + | Vector.Dense vtr, ClMatrix.CSR m -> + let v = vtr.ToDevice testContext.ClContext - let res = spMV testContext.Queue HostInterop m v + let res = spMV testContext.Queue HostInterop m v - m.Dispose q - v.Dispose q - - match res with - | ClVector.Dense res -> + (ClMatrix.CSR m).Dispose q + v.Free q let hostRes = res.ToHostAndFree q checkResult isEqual sumOp mulOp zero matrix vector hostRes diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Create.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs similarity index 81% rename from tests/GraphBLAS-sharp.Tests/Backend/Vector/Create.fs rename to tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs index 145731d5..79c1e4d9 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Create.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs @@ -35,23 +35,19 @@ let correctnessGenericTest<'a when 'a: struct and 'a: equality> (vectorSize: int) = - try - let vectorSize = abs vectorSize + let vectorSize = abs vectorSize - if vectorSize > 0 then - let q = case.TestContext.Queue + if vectorSize > 0 then + let q = case.TestContext.Queue - let clVector = - zeroCreate q HostInterop vectorSize case.Format + let clVector = + zeroCreate q HostInterop vectorSize case.Format - let hostVector = clVector.ToHost q + let hostVector = clVector.ToHost q - clVector.Dispose q + clVector.Dispose q - checkResult vectorSize hostVector - with - | ex when ex.Message = "Attempting to create full sparse vector" -> () - | ex -> raise ex + checkResult vectorSize hostVector let createTest<'a> case = let getCorrectnessTestName dataType = diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index 945ac0a3..232d332f 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -15,7 +15,6 @@ - @@ -67,9 +66,8 @@ - + - From d6373cc1ec0255ebaf1eb6292f176528840576c5 Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Sat, 25 Nov 2023 15:06:11 +0300 Subject: [PATCH 068/102] revert: kirill's changes comming with pagerank pr --- .../Algorithms/BFS.fs | 42 ++- .../GraphBLAS-sharp.Benchmarks.fsproj | 3 +- .../Matrix/Map2/Map2.fs | 2 +- .../Matrix/SpGeMM/Expand.fs | 21 +- .../Matrix/SpGeMM/Masked.fs | 2 +- .../GraphBLAS-sharp.Benchmarks/Program.fs | 4 +- .../GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 14 +- paket.lock | 168 +++++----- .../Algorithms/Algorithms.fs | 5 - src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 217 +++++++++++-- .../Algorithms/MSBFS.fs | 13 - .../Algorithms/SSSP.fs | 6 +- src/GraphBLAS-sharp.Backend/Common/Bitmap.fs | 99 ++++++ src/GraphBLAS-sharp.Backend/Common/Common.fs | 35 +- .../Common/Sort/Radix.fs | 18 +- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 148 ++++++++- .../GraphBLAS-sharp.Backend.fsproj | 10 +- .../Matrix/CSR/Matrix.fs | 2 +- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 1 - src/GraphBLAS-sharp.Backend/Objects/Vector.fs | 1 - .../Operations/Operations.fs | 83 ++++- .../Operations/SpGeMM/Expand.fs | 10 +- .../Operations/SpMSpV.fs | 305 ++++++++++++++++++ .../Quotes/Arithmetic.fs | 43 ++- src/GraphBLAS-sharp.Backend/Quotes/Map.fs | 5 + src/GraphBLAS-sharp.Backend/Quotes/Mask.fs | 6 + src/GraphBLAS-sharp.Backend/Quotes/Search.fs | 26 ++ .../Vector/Dense/Vector.fs | 65 +++- .../Vector/Sparse/Common.fs | 3 +- .../Vector/Sparse/Map.fs | 2 +- .../Vector/Sparse/Map2.fs | 138 +++++++- .../Vector/Sparse/Vector.fs | 2 + src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 75 +++-- .../Backend/Algorithms/BFS.fs | 55 +++- .../Backend/Algorithms/SSSP.fs | 64 ++++ .../Backend/Common/ClArray/Map.fs | 4 +- .../Backend/Common/ClArray/Map2.fs | 4 +- .../Backend/Common/Reduce/ReduceByKey.fs | 2 +- .../Backend/Common/Sort/Radix.fs | 14 +- .../Backend/QuickGraph/Algorithms/SSSP.fs | 37 +++ .../Backend/Vector/AssignByMask.fs | 5 +- .../Backend/Vector/Map2.fs | 19 +- .../Backend/Vector/SpMSpV.fs | 165 ++++++++++ .../Backend/Vector/SpMV.fs | 15 +- .../GraphBLAS-sharp.Tests.fsproj | 5 +- 45 files changed, 1678 insertions(+), 285 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Common/Bitmap.fs create mode 100644 src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 7a3c1cf6..a0c10cb6 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -12,8 +12,8 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend.Quotes [] -[] -[] +[] +[] [)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( let mutable matrix = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> - member val ResultLevels = Unchecked.defaultof> with get,set + member val ResultLevels = Unchecked.defaultof> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -71,7 +71,10 @@ type Benchmarks<'elem when 'elem : struct>( member this.ClearInputMatrix() = matrix.Dispose this.Processor - member this.ClearResult() = this.ResultLevels.FreeAndWait this.Processor + member this.ClearResult() = + match this.ResultLevels with + | ClVector.Dense result -> result.FreeAndWait this.Processor + | _ -> failwith "Impossible" member this.ReadMatrix() = let converter = @@ -136,6 +139,30 @@ type BFSWithoutTransferBenchmarkInt32() = static member InputMatrixProvider = Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt" +type BFSPushPullWithoutTransferBenchmarkInt32() = + + inherit WithoutTransferBenchmark( + (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( + 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, @@ -167,8 +194,11 @@ type WithTransferBenchmark<'elem when 'elem : struct>( override this.Benchmark() = this.LoadMatrixToGPU() this.BFS() - this.ResultLevels.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe + match this.ResultLevels with + | ClVector.Dense result -> + result.ToHost this.Processor |> ignore + this.Processor.PostAndReply Msg.MsgNotifyMe + | _ -> failwith "Impossible" type BFSWithTransferBenchmarkInt32() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index 6e8486b0..75ddfc15 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -25,6 +25,7 @@ + diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index 975e8a72..ab54db75 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -46,7 +46,7 @@ type Benchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem : st static member AvailableContexts = Utils.availableContexts static member InputMatricesProviderBuilder pathToConfig = - let datasetFolder = "EWiseAdd" + let datasetFolder = "" pathToConfig |> Utils.getMatricesFilenames |> Seq.map diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index 0eb398cd..e8a75071 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -13,7 +13,7 @@ open GraphBLAS.FSharp.Benchmarks [] [] [] -[)>] +[)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, converter: string -> 'elem, @@ -22,11 +22,9 @@ type Benchmarks<'elem when 'elem : struct>( let mutable funToBenchmark = None - let mutable firstMatrix = Unchecked.defaultof> - let mutable secondMatrix = Unchecked.defaultof> + let mutable matrix = Unchecked.defaultof> - let mutable firstMatrixHost = Unchecked.defaultof<_> - let mutable secondMatrixHost = Unchecked.defaultof<_> + let mutable matrixHost = Unchecked.defaultof<_> member val ResultMatrix = Unchecked.defaultof option> with get, set @@ -36,7 +34,7 @@ type Benchmarks<'elem when 'elem : struct>( [] member val InputMatrixReader = Unchecked.defaultof with get, set - member this.OclContext:ClContext = (fst this.OclContextInfo).ClContext + member this.OclContext: ClContext = (fst this.OclContextInfo).ClContext member this.WorkGroupSize = snd this.OclContextInfo member this.Processor = @@ -76,11 +74,10 @@ type Benchmarks<'elem when 'elem : struct>( reader.ReadMatrix converter member this.Mxm() = - this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly firstMatrix secondMatrix + this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly matrix matrix member this.ClearInputMatrices() = - firstMatrix.Dispose this.Processor - secondMatrix.Dispose this.Processor + matrix.Dispose this.Processor member this.ClearResult() = match this.ResultMatrix with @@ -88,12 +85,10 @@ type Benchmarks<'elem when 'elem : struct>( | None -> () member this.ReadMatrices() = - firstMatrixHost <- this.ReadMatrix this.InputMatrixReader - secondMatrixHost <- this.ReadMatrix this.InputMatrixReader + matrixHost <- this.ReadMatrix this.InputMatrixReader member this.LoadMatricesToGPU () = - firstMatrix <- buildMatrix this.OclContext firstMatrixHost - secondMatrix <- buildMatrix this.OclContext secondMatrixHost + matrix <- buildMatrix this.OclContext matrixHost abstract member GlobalSetup : unit -> unit diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index 69f0c399..ff0495bf 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -51,7 +51,7 @@ type Masked<'elem when 'elem : struct>( static member AvaliableContexts = Utils.availableContexts static member InputMatrixProviderBuilder pathToConfig = - let datasetFolder = "Mxm" + let datasetFolder = "" pathToConfig |> Utils.getMatricesFilenames |> Seq.map diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 5a3ccf37..0655cd45 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,7 +4,9 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof |] + BenchmarkSwitcher [| typeof + typeof + typeof |] benchmarks.Run argv |> ignore 0 diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index d4e0078c..5c4871e2 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( member val HostVectorPair = Unchecked.defaultof * Vector<'elem>> with get, set - member val ResultVector = Unchecked.defaultof> with get,set + member val ResultVector = Unchecked.defaultof option> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -67,7 +67,9 @@ type Benchmarks<'elem when 'elem : struct>( secondVector.Dispose this.Processor member this.ClearResult() = - this.ResultVector.Dispose this.Processor + match this.ResultVector with + | Some v -> v.Dispose this.Processor + | None -> () member this.CreateVectors() = this.HostVectorPair <- List.last (Gen.sample this.Size 1 generator) @@ -162,8 +164,12 @@ module WithTransfer = override this.Benchmark () = this.LoadVectorsToGPU() this.Map2() - this.ResultVector.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe + match this.ResultVector with + | Some v -> + v.ToHost this.Processor |> ignore + this.Processor.PostAndReply Msg.MsgNotifyMe + | None -> () + [] override this.IterationCleanup () = diff --git a/paket.lock b/paket.lock index f2bbb161..7cae92f5 100644 --- a/paket.lock +++ b/paket.lock @@ -2,8 +2,8 @@ STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 altcover (7.6.812) - BenchmarkDotNet (0.13.6) - BenchmarkDotNet.Annotations (>= 0.13.6) - restriction: >= netstandard2.0 + BenchmarkDotNet (0.13.9) + BenchmarkDotNet.Annotations (>= 0.13.9) - restriction: >= netstandard2.0 CommandLineParser (>= 2.9.1) - restriction: >= netstandard2.0 Gee.External.Capstone (>= 2.3) - restriction: >= netstandard2.0 Iced (>= 1.17) - restriction: >= netstandard2.0 @@ -18,7 +18,7 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - BenchmarkDotNet.Annotations (0.13.6) - restriction: >= netstandard2.0 + BenchmarkDotNet.Annotations (0.13.9) - restriction: >= netstandard2.0 Brahma.FSharp (2.0.5) Brahma.FSharp.OpenCL.Printer (>= 2.0.5) - restriction: >= net7.0 Brahma.FSharp.OpenCL.Shared (>= 2.0.5) - restriction: >= net7.0 @@ -83,27 +83,27 @@ NUGET System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 7.0) - restriction: >= netstandard2.0 + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.6) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.6) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.6.3) - restriction: || (>= net45) (>= netcoreapp2.1) + Microsoft.CodeAnalysis.CSharp (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.7.2) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.430602) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.447801) - restriction: >= netstandard2.0 Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 6.0) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Diagnostics.Runtime (2.4.416101) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.NETCore.Client (>= 0.2.251802) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.1.3) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (3.0.442202) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.5) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) @@ -145,11 +145,11 @@ NUGET Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.6.3) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.ObjectModel (17.7.2) - restriction: >= netcoreapp3.1 NuGet.Frameworks (>= 6.5) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.6.3) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.6.3) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.7.2) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.7.2) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -214,7 +214,7 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.6.1) - restriction: >= netcoreapp3.1 + NuGet.Frameworks (6.7) - restriction: >= netcoreapp3.1 Perfolizer (0.2.1) - restriction: >= netstandard2.0 System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 QuikGraph (2.5) @@ -656,7 +656,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (7.0) - restriction: >= netstandard2.0 + System.Text.Encoding.CodePages (7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) @@ -762,20 +762,20 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.12) - restriction: >= net5.0 - FSharp.Compiler.Service (>= 43.7.200) - restriction: >= net6.0 - FSharp.Core (>= 7.0.200) - restriction: >= net6.0 + FSharp.Analyzers.SDK (0.14.1) - restriction: >= net5.0 + FSharp.Compiler.Service (>= 43.7.400) - restriction: >= net6.0 + FSharp.Core (>= 7.0.400) - restriction: >= net6.0 McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 - FSharp.Compiler.Service (43.7.300) - restriction: >= net6.0 - FSharp.Core (7.0.300) - restriction: >= netstandard2.0 + FSharp.Compiler.Service (43.7.400) - restriction: >= net6.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 - System.Diagnostics.DiagnosticSource (>= 6.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 6.0.1) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.300) - restriction: >= net5.0 + FSharp.Core (7.0.400) - restriction: >= net5.0 McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 @@ -932,17 +932,18 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.300) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -955,12 +956,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) @@ -968,25 +969,24 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.844) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.6.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Configuration (6.6.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (6.6.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.6.1) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (6.6.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 Octokit (0.48) System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 @@ -999,10 +999,9 @@ NUGET System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 System.Drawing.Common (7.0) - restriction: >= net6.0 Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1012,7 +1011,7 @@ NUGET System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) - System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.Runtime (4.3.1) - restriction: && (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) 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)) 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)) System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) @@ -1020,22 +1019,14 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) - System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) System.Security.Permissions (7.0) - restriction: >= netstandard2.0 @@ -1083,7 +1074,7 @@ NUGET Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (4.0) - restriction: >= netstandard2.0 + Fable.Core (4.1) - restriction: >= netstandard2.0 Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 @@ -1176,22 +1167,23 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.300) + FSharp.Core (7.0.400) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= net472 + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.6.3) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 @@ -1204,12 +1196,12 @@ NUGET Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.6.3) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.6.2115) - restriction: || (>= net472) (>= net7.0) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1221,25 +1213,24 @@ NUGET System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.844) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.6.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Configuration (6.6.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.6.1) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (6.6.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.6.1) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.6.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.6.1) - restriction: >= netstandard2.0 - NuGet.Versioning (6.6.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1343,7 +1334,7 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Drawing.Common (7.0) - restriction: >= net6.0 Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1432,7 +1423,7 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (< net461) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: && (< net461) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1447,10 +1438,9 @@ NUGET System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) System.Text.Encoding (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< net6.0) (>= netstandard2.1)) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index 180b72b6..bc7de55d 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -19,8 +19,3 @@ module Algorithms = module SSSP = let run = SSSP.run - - module PageRank = - let run = PageRank.run - - let prepareMatrix = PageRank.prepareMatrix diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index de7f0cc8..29384a87 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -5,9 +5,8 @@ open FSharp.Quotations open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp.Backend.Vector.Dense -open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions module internal BFS = @@ -18,54 +17,218 @@ module internal BFS = workGroupSize = - let spMVTo = - Operations.SpMVInplace add mul clContext workGroupSize + let spMVInPlace = + Operations.SpMVInPlace add mul clContext workGroupSize let zeroCreate = - ClArray.zeroCreate clContext workGroupSize + Vector.zeroCreate clContext workGroupSize let ofList = Vector.ofList clContext workGroupSize - let maskComplementedTo = + let maskComplementedInPlace = Vector.map2InPlace Mask.complementedOp clContext workGroupSize let fillSubVectorTo = - Vector.assignByMaskInPlace (Convert.assignToOption Mask.assign) clContext workGroupSize + Vector.assignByMaskInPlace Mask.assign clContext workGroupSize let containsNonZero = - ClArray.exists Predicates.isSome clContext workGroupSize + Vector.exists Predicates.isSome clContext workGroupSize fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> let vertexCount = matrix.RowCount - let levels = zeroCreate queue HostInterop vertexCount + let levels = + zeroCreate queue DeviceOnly vertexCount Dense - let frontier = + let front = ofList queue DeviceOnly Dense vertexCount [ source, 1 ] - match frontier with - | ClVector.Dense front -> + let mutable level = 0 + let mutable stop = false + + while not stop do + level <- level + 1 + + //Assigning new level values + fillSubVectorTo queue levels front level - let mutable level = 0 - let mutable stop = false + //Getting new frontier + spMVInPlace queue matrix front front - while not stop do - level <- level + 1 + maskComplementedInPlace queue front levels - //Assigning new level values - fillSubVectorTo queue levels front (clContext.CreateClCell level) levels + //Checking if front is empty + stop <- + not + <| (containsNonZero queue front).ToHostAndFree queue + + front.Dispose queue + + levels + + let singleSourceSparse + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let spMSpV = + Operations.SpMSpVBool add mul clContext workGroupSize + + let zeroCreate = + Vector.zeroCreate clContext workGroupSize + + let ofList = Vector.ofList clContext workGroupSize + let maskComplemented = + Vector.map2Sparse Mask.complementedOp clContext workGroupSize + + let fillSubVectorTo = + Vector.assignByMaskInPlace Mask.assign clContext workGroupSize + + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + let vertexCount = matrix.RowCount + + let levels = + zeroCreate queue DeviceOnly vertexCount Dense + + let mutable front = + ofList queue DeviceOnly Sparse vertexCount [ source, true ] + + let mutable level = 0 + let mutable stop = false + + while not stop do + level <- level + 1 + + //Assigning new level values + fillSubVectorTo queue levels front level + + //Getting new frontier + match spMSpV queue matrix front with + | None -> + front.Dispose queue + stop <- true + | Some newFrontier -> + front.Dispose queue + //Filtering visited vertices + match maskComplemented queue DeviceOnly newFrontier levels with + | None -> + stop <- true + newFrontier.Dispose queue + | Some f -> + front <- f + newFrontier.Dispose queue + + levels + + + let singleSourcePushPull + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let spMVInPlace = + Operations.SpMVInPlace add mul clContext workGroupSize + + let spMSpV = + Operations.SpMSpVBool add mul clContext workGroupSize + + let zeroCreate = + Vector.zeroCreate clContext workGroupSize + + let ofList = Vector.ofList clContext workGroupSize + + let maskComplementedInPlace = + Vector.map2InPlace Mask.complementedOp clContext workGroupSize + + let maskComplemented = + Vector.map2Sparse Mask.complementedOp clContext workGroupSize + + let fillSubVectorInPlace = + Vector.assignByMaskInPlace (Mask.assign) clContext workGroupSize + + let toSparse = Vector.toSparse clContext workGroupSize + + let toDense = Vector.toDense clContext workGroupSize + + let countNNZ = + ClArray.count Predicates.isSome clContext workGroupSize + + //Push or pull functions + let getNNZ (queue: MailboxProcessor) (v: ClVector) = + match v with + | ClVector.Sparse v -> v.NNZ + | ClVector.Dense v -> countNNZ queue v + + let SPARSITY = 0.001f + + let push nnz size = + (float32 nnz) / (float32 size) <= SPARSITY + + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + let vertexCount = matrix.RowCount + + let levels = + zeroCreate queue DeviceOnly vertexCount Dense + + let mutable frontier = + ofList queue DeviceOnly Sparse vertexCount [ source, true ] + + let mutable level = 0 + let mutable stop = false + + while not stop do + level <- level + 1 + + //Assigning new level values + fillSubVectorInPlace queue levels frontier level + + match frontier with + | ClVector.Sparse _ -> + //Getting new frontier + match spMSpV queue matrix frontier with + | None -> + frontier.Dispose queue + stop <- true + | Some newFrontier -> + frontier.Dispose queue + //Filtering visited vertices + match maskComplemented queue DeviceOnly newFrontier levels with + | None -> + stop <- true + newFrontier.Dispose queue + | Some newMaskedFrontier -> + newFrontier.Dispose queue + + //Push/pull + let NNZ = getNNZ queue newMaskedFrontier + + if (push NNZ newMaskedFrontier.Size) then + frontier <- newMaskedFrontier + else + frontier <- toDense queue DeviceOnly newMaskedFrontier + newMaskedFrontier.Dispose queue + | ClVector.Dense oldFrontier -> //Getting new frontier - spMVTo queue matrix frontier frontier + spMVInPlace queue matrix frontier frontier + + maskComplementedInPlace queue frontier levels - maskComplementedTo queue front levels front + //Emptiness check + let NNZ = getNNZ queue frontier - //Checking if front is empty - stop <- - not - <| (containsNonZero queue front).ToHostAndFree queue + stop <- NNZ = 0 - front.Free queue + //Push/pull + if not stop then + if (push NNZ frontier.Size) then + frontier <- toSparse queue DeviceOnly frontier + oldFrontier.Free queue + else + frontier.Dispose queue - levels - | _ -> failwith "Not implemented" + levels diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 30b40b6d..b7c82e6a 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -161,19 +161,6 @@ module internal MSBFS = ClMatrix.COO levels - let runSingleSourceMultipleTimes<'a when 'a: struct> - (add: Expr int option -> int option>) - (mul: Expr<'a option -> int option -> int option>) - (clContext: ClContext) - workGroupSize - = - - let SSBFS = - BFS.singleSourceSparse add mul clContext workGroupSize - - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> - source |> List.map (SSBFS queue matrix) - module Parents = let private updateFrontAndParents (clContext: ClContext) workGroupSize = let frontExclude = frontExclude clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 489a796c..dc4499e9 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -7,7 +7,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions -module internal SSSP = +module SSSP = let run (clContext: ClContext) workGroupSize = let less = ArithmeticOperations.less @@ -76,4 +76,6 @@ module internal SSSP = front1.Dispose queue front2.Dispose queue - distance + match distance with + | ClVector.Dense dist -> dist + | _ -> failwith "not implemented" diff --git a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs new file mode 100644 index 00000000..889cd43f --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs @@ -0,0 +1,99 @@ +namespace GraphBLAS.FSharp.Backend.Common + +open Brahma.FSharp +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Backend.Common.Map + +module Bitmap = + let private getUniqueBitmapGeneral predicate (clContext: ClContext) workGroupSize = + + let getUniqueBitmap = + <@ fun (ndRange: Range1D) (inputArray: ClArray<'a>) inputLength (isUniqueBitmap: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < inputLength then + let isUnique = (%predicate) gid inputLength inputArray // brahma error + + if isUnique then + isUniqueBitmap.[gid] <- 1 + else + isUniqueBitmap.[gid] <- 0 @> + + let kernel = clContext.Compile(getUniqueBitmap) + + fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> + + let inputLength = inputArray.Length + + let ndRange = + Range1D.CreateValid(inputLength, workGroupSize) + + let bitmap = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputLength) + + let kernel = kernel.GetKernel() + + processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray inputLength bitmap)) + + processor.Post(Msg.CreateRunMsg<_, _> kernel) + + bitmap + + /// + /// Gets the bitmap that indicates the first elements of the sequences of consecutive identical elements + /// + /// OpenCL context. + let firstOccurrence clContext = + getUniqueBitmapGeneral + <| Predicates.firstOccurrence () + <| clContext + + /// + /// Gets the bitmap that indicates the last elements of the sequences of consecutive identical elements + /// + /// OpenCL context. + let lastOccurrence clContext = + getUniqueBitmapGeneral + <| Predicates.lastOccurrence () + <| clContext + + let private getUniqueBitmap2General<'a when 'a: equality> getUniqueBitmap (clContext: ClContext) workGroupSize = + + let map = + map2 <@ fun x y -> x ||| y @> clContext workGroupSize + + let firstGetBitmap = getUniqueBitmap clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> + let firstBitmap = + firstGetBitmap processor DeviceOnly firstArray + + let secondBitmap = + firstGetBitmap processor DeviceOnly secondArray + + let result = + map processor allocationMode firstBitmap secondBitmap + + firstBitmap.Free processor + secondBitmap.Free processor + + result + + /// + /// Gets the bitmap that indicates the first elements of the sequences + /// of consecutive identical elements from either first array or second array. + /// + /// OpenCL context. + let firstOccurrence2 clContext = + getUniqueBitmap2General firstOccurrence clContext + + /// + /// Gets the bitmap that indicates the last elements of the sequences + /// of consecutive identical elements from either first array or second array. + /// + /// OpenCL context. + let lastOccurrence2 clContext = + getUniqueBitmap2General lastOccurrence clContext diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index 53777d33..ae9839f2 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -43,6 +43,20 @@ module Common = /// let runByKeysStandard = Sort.Radix.runByKeysStandard + /// + /// Sorts stable input array of values by given integer keys and return only values. + /// + /// + /// + /// let keys = [| 0; 4; 3; 1; 2; 6; 5 |] + /// let values = [| 1.9; 2.8; 3.7; 4.6; 5.5; 6.4; 7.3; |] + /// runByKeysStandard clContext 32 processor keys values + /// ... + /// > val values = [| 1.9; 4.6; 5.5; 3.7; 2.8; 7.3; 6.4 |] + /// + /// + let runByKeysStandardValuesOnly = Sort.Radix.runByKeysStandardValuesOnly + /// /// Sorts stable input array of integer keys. /// @@ -371,8 +385,27 @@ module Common = /// /// The length of the result must be calculated in advance. /// - let segmentSequential<'a> (reduceOp: Expr<'a -> 'a -> 'a option>) (clContext: ClContext) workGroupSize = + let segmentSequential<'a> + (reduceOp: Expr<'a option -> 'a option -> 'a option>) + (clContext: ClContext) + workGroupSize + = Reduce.ByKey.Option.segmentSequential reduceOp clContext workGroupSize + /// + /// Reduces values by key. Each segment is reduced by one work item. + /// + /// ClContext. + /// Work group size. + /// Operation for reducing values. + /// + /// The length of the result and offsets for each segment must be calculated in advance. + /// + let segmentSequentialByOffsets<'a> + (reduceOp: Expr<'a -> 'a -> 'a option>) + (clContext: ClContext) + workGroupSize + = + Reduce.ByKey.Option.segmentSequentialByOffsets reduceOp clContext workGroupSize module ByKey2D = /// diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 03ad4ed0..b7db92d0 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -269,7 +269,7 @@ module internal Radix = failwith "Mismatch of key lengths and value. Lengths must be the same" if values.Length <= 1 then - dataCopy processor allocationMode values + copy processor DeviceOnly keys, dataCopy processor DeviceOnly values else let firstKeys = copy processor DeviceOnly keys @@ -319,14 +319,26 @@ module internal Radix = keysPair <- swap keysPair valuesPair <- swap valuesPair + globalOffset.Free processor localOffset.Free processor shift.Free processor - (fst keysPair).Free processor (snd keysPair).Free processor (snd valuesPair).Free processor - (fst valuesPair) + (fst keysPair, fst valuesPair) + + let runByKeysStandardValuesOnly clContext workGroupSize = + let runByKeys = + runByKeys clContext workGroupSize defaultBitCount + + fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> + let keys, values = + runByKeys processor allocationMode keys values + + keys.Free processor + + values let runByKeysStandard clContext workGroupSize = runByKeys clContext workGroupSize defaultBitCount diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 8f3fe936..94a745c2 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -428,7 +428,7 @@ module Reduce = let itemKeyId = lid + 1 let startKeyIndex = - (%Search.Bin.lowerPosition) length itemKeyId localBitmap + (%Search.Bin.lowerPositionLocal) length itemKeyId localBitmap match startKeyIndex with | Some startPosition -> @@ -473,6 +473,135 @@ module Reduce = reducedValues, reducedKeys module Option = + /// + /// Reduces values by key. Each segment is reduced by one work item. + /// + /// ClContext. + /// Work group size. + /// Operation for reducing values. + let segmentSequential<'a> + (reduceOp: Expr<'a option -> 'a option -> 'a option>) + (clContext: ClContext) + workGroupSize + = + + let kernel = + <@ fun (ndRange: Range1D) uniqueKeyCount keysLength (offsets: ClArray) (keys: ClArray) (values: ClArray<'a option>) (reducedValues: ClArray<'a>) (firstReducedKeys: ClArray) (resultPositions: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < uniqueKeyCount then + let startPosition = + (%Search.Bin.lowerPosition) keysLength gid offsets + + match startPosition with + | Some startPosition -> + let firstSourceKey = keys.[startPosition] + + let mutable sum = None + + let mutable currentPosition = startPosition + + while currentPosition < keysLength + && firstSourceKey = keys.[currentPosition] do + let result = (%reduceOp) sum values.[currentPosition] // brahma error + sum <- result + currentPosition <- currentPosition + 1 + + match sum with + | Some value -> + reducedValues.[gid] <- value + resultPositions.[gid] <- 1 + | None -> resultPositions.[gid] <- 0 + + firstReducedKeys.[gid] <- firstSourceKey + | None -> () @> // not possible if done correctly + + let kernel = clContext.Compile kernel + + let getUniqueBitmap = + Bitmap.lastOccurrence clContext workGroupSize + + let scatterData = + Scatter.lastOccurrence clContext workGroupSize + + let scatterIndices = + Scatter.lastOccurrence clContext workGroupSize + + let prefixSum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> + + let offsets = + getUniqueBitmap processor DeviceOnly keys + + let uniqueKeysCount = + (prefixSum processor offsets) + .ToHostAndFree processor + + let reducedValues = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + let reducedKeys = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + let resultPositions = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) + + let ndRange = + Range1D.CreateValid(uniqueKeysCount, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + uniqueKeysCount + keys.Length + offsets + keys + values + reducedValues + reducedKeys + resultPositions) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + offsets.Free processor + + let resultLength = + (prefixSum processor resultPositions) + .ToHostAndFree processor + + if resultLength = 0 then + reducedValues.Free processor + reducedKeys.Free processor + resultPositions.Free processor + None + else + // write values + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + scatterData processor resultPositions reducedValues resultValues + + reducedValues.Free processor + + // write keys + let resultKeys = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + scatterIndices processor resultPositions reducedKeys resultKeys + + reducedKeys.Free processor + resultPositions.Free processor + + Some(resultValues, resultKeys) + /// /// Reduces values by key. Each segment is reduced by one work item. /// @@ -480,9 +609,13 @@ module Reduce = /// Work group size. /// Operation for reducing values. /// - /// The length of the result must be calculated in advance. + /// The length of the result and offsets for each segment must be calculated in advance. /// - let segmentSequential<'a> (reduceOp: Expr<'a -> 'a -> 'a option>) (clContext: ClContext) workGroupSize = + let segmentSequentialByOffsets<'a> + (reduceOp: Expr<'a -> 'a -> 'a option>) + (clContext: ClContext) + workGroupSize + = let kernel = <@ fun (ndRange: Range1D) uniqueKeyCount keysLength (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) (reducedValues: ClArray<'a>) (firstReducedKeys: ClArray) (resultPositions: ClArray) -> @@ -568,6 +701,10 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + reducedKeys.Free processor + resultPositions.Free processor + None else // write values @@ -848,6 +985,11 @@ module Reduce = .ToHostAndFree processor if resultLength = 0 then + reducedValues.Free processor + firstReducedKeys.Free processor + secondReducedKeys.Free processor + resultPositions.Free processor + None else // write value diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index 4198cbe0..54f8c64d 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -1,4 +1,4 @@ - + @@ -33,10 +33,13 @@ + + + @@ -58,17 +61,16 @@ - - + + - diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 8f305001..0bea32dd 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -405,7 +405,7 @@ module Matrix = let pairwise = ClArray.pairwise clContext workGroupSize let subtract = - ClArray.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize + Backend.Common.Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> let pointerPairs = diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 2ae2678b..766925aa 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -23,7 +23,6 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Columns)) q.Post(Msg.CreateFreeMsg<_>(this.RowPointers)) - q.PostAndReply(Msg.MsgNotifyMe) member this.Dispose q = (this :> IDeviceMemObject).Dispose q diff --git a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs index 82e25d8d..e7a221f1 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs @@ -18,7 +18,6 @@ module ClVector = member this.Dispose(q) = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Indices)) - q.PostAndReply(Msg.MsgNotifyMe) member this.Dispose(q) = (this :> IDeviceMemObject).Dispose(q) diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index 5f43bc74..2e99b7dc 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -1,6 +1,7 @@ namespace GraphBLAS.FSharp open Brahma.FSharp +open Microsoft.FSharp.Core open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -60,11 +61,11 @@ module Operations = fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> - ClVector.Dense - <| map2Dense processor allocationMode left right + map2Dense processor allocationMode left right + |> ClVector.Dense + |> Some | ClVector.Sparse left, ClVector.Sparse right -> - ClVector.Sparse - <| map2Sparse processor allocationMode left right + Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) | _ -> failwith "Vector formats are not matching." /// @@ -90,11 +91,11 @@ module Operations = fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> - ClVector.Sparse - <| map2Sparse processor allocationMode left right + Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) | ClVector.Dense left, ClVector.Dense right -> - ClVector.Dense - <| map2Dense processor allocationMode left right + map2Dense processor allocationMode left right + |> ClVector.Dense + |> Some | _ -> failwith "Vector formats are not matching." /// @@ -293,7 +294,7 @@ module Operations = /// Type of binary function to combine entries. /// OpenCL context. /// Should be a power of 2 and greater than 1. - let SpMVInplace + let SpMVInPlace (add: Expr<'c option -> 'c option -> 'c option>) (mul: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) @@ -309,9 +310,69 @@ module Operations = | _ -> failwith "Not implemented yet" /// - /// Matrix-vector multiplication. + /// CSR Matrix - dense vector multiplication. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMV + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let run = SpMV.run add mul clContext workGroupSize + + fun (queue: MailboxProcessor<_>) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + match matrix, vector with + | ClMatrix.CSR m, ClVector.Dense v -> run queue allocationFlag m v |> ClVector.Dense + | _ -> failwith "Not implemented yet" + + /// + /// CSR Matrix - sparse vector multiplication. Optimized for bool OR and AND operations. /// - let SpMV = SpMV.run + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMSpVBool + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpMSpV.runBoolStandard add mul clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix) (vector: ClVector) -> + match matrix, vector with + | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) + | _ -> failwith "Not implemented yet" + + /// + /// CSR Matrix - sparse vector multiplication. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMSpV + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpMSpV.run add mul clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + match matrix, vector with + | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) + | _ -> failwith "Not implemented yet" /// /// Kronecker product for matrices. diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs index 7c9229a1..45ff0df0 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -1,4 +1,4 @@ -namespace GraphBLAS.FSharp.Backend.Operations.SpGeMM +namespace GraphBLAS.FSharp.Backend.Operations.SpGeMM open Brahma.FSharp open FSharp.Quotations @@ -37,7 +37,7 @@ module internal Expand = let multiply (predicate: Expr<'a -> 'b -> 'c option>) (clContext: ClContext) workGroupSize = let getBitmap = - ClArray.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize + Backend.Common.Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -174,10 +174,10 @@ module internal Expand = let sortByColumnsAndRows (clContext: ClContext) workGroupSize = let sortByKeyIndices = - Common.Sort.Radix.runByKeysStandard clContext workGroupSize + Common.Sort.Radix.runByKeysStandardValuesOnly clContext workGroupSize let sortByKeyValues = - Common.Sort.Radix.runByKeysStandard clContext workGroupSize + Common.Sort.Radix.runByKeysStandardValuesOnly clContext workGroupSize let sortKeys = Common.Sort.Radix.standardRunKeysOnly clContext workGroupSize @@ -213,7 +213,7 @@ module internal Expand = Common.Reduce.ByKey2D.Option.segmentSequential opAdd clContext workGroupSize let getUniqueBitmap = - ClArray.Bitmap.lastOccurrence2 clContext workGroupSize + Backend.Common.Bitmap.lastOccurrence2 clContext workGroupSize let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs new file mode 100644 index 00000000..bca119a1 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -0,0 +1,305 @@ +namespace GraphBLAS.FSharp.Backend.Operations + +open Brahma.FSharp +open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp.Backend.Quotes +open Microsoft.FSharp.Quotations +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClVector +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions + +module SpMSpV = + + //For v in vectorIndices collect R[v] and R[v + 1] + let private collectRows (clContext: ClContext) workGroupSize = + + let collectRows = + <@ fun (ndRange: Range1D) inputSize (vectorIndices: ClArray) (rowOffsets: ClArray) (resultArray: ClArray) -> + + let i = ndRange.GlobalID0 + + //resultArray is twice vector size + if i < (inputSize * 2) then + let columnIndex = vectorIndices.[i / 2] + + if i % 2 = 0 then + resultArray.[i] <- rowOffsets.[columnIndex] + else + resultArray.[i] <- rowOffsets.[columnIndex + 1] + elif i = inputSize * 2 then + resultArray.[i] <- 0 @> + + let collectRows = clContext.Compile collectRows + + fun (queue: MailboxProcessor<_>) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> + + let ndRange = + Range1D.CreateValid(size * 2 + 1, workGroupSize) + + // Last element will contain length of array for gather + let resultRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, size * 2 + 1) + + let collectRows = collectRows.GetKernel() + + queue.Post( + Msg.MsgSetArguments(fun () -> collectRows.KernelFunc ndRange size vectorIndices rowOffsets resultRows) + ) + + queue.Post(Msg.CreateRunMsg<_, _>(collectRows)) + + resultRows + + //For above array compute result offsets + let private computeOffsetsInplace (clContext: ClContext) workGroupSize = + + let prepareOffsets = + <@ fun (ndRange: Range1D) inputSize (inputArray: ClArray) -> + + let i = ndRange.GlobalID0 + + if i < inputSize && i % 2 = 0 then + inputArray.[i + 1] <- inputArray.[i + 1] - inputArray.[i] + inputArray.[i] <- 0 @> + + let sum = + PrefixSum.standardExcludeInPlace clContext workGroupSize + + let prepareOffsets = clContext.Compile prepareOffsets + + fun (queue: MailboxProcessor<_>) size (input: ClArray) -> + + let ndRange = Range1D.CreateValid(size, workGroupSize) + + let prepareOffsets = prepareOffsets.GetKernel() + + queue.Post(Msg.MsgSetArguments(fun () -> prepareOffsets.KernelFunc ndRange size input)) + + queue.Post(Msg.CreateRunMsg<_, _>(prepareOffsets)) + + let resSize = (sum queue input).ToHostAndFree queue + + resSize + + //Gather rows from the matrix that will be used in multiplication + let private gather (clContext: ClContext) workGroupSize = + + let gather = + <@ fun (ndRange: Range1D) vectorNNZ (rowOffsets: ClArray) (matrixRowPointers: ClArray) (matrixColumns: ClArray) (matrixValues: ClArray<'a>) (vectorIndices: ClArray) (resultRowsArray: ClArray) (resultIndicesArray: ClArray) (resultValuesArray: ClArray<'a>) -> + + //Serial number of row to gather + let row = ndRange.GlobalID0 + + if row < vectorNNZ then + let offsetIndex = row * 2 + 1 + let rowOffset = rowOffsets.[offsetIndex] + + //vectorIndices.[row] --- actual number of row in matrix + let actualRow = vectorIndices.[row] + let matrixIndexOffset = matrixRowPointers.[actualRow] + + if rowOffset <> rowOffsets.[offsetIndex + 1] then + let rowSize = rowOffsets.[offsetIndex + 1] - rowOffset + + for i in 0 .. rowSize - 1 do + resultRowsArray.[i + rowOffset] <- actualRow + resultIndicesArray.[i + rowOffset] <- matrixColumns.[matrixIndexOffset + i] + resultValuesArray.[i + rowOffset] <- matrixValues.[matrixIndexOffset + i] @> + + let collectRows = collectRows clContext workGroupSize + + let computeOffsetsInplace = + computeOffsetsInplace clContext workGroupSize + + let gather = clContext.Compile gather + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + + //Collect R[v] and R[v + 1] for each v in vector + let collectedRows = + collectRows queue vector.NNZ vector.Indices matrix.RowPointers + + //Place R[v + 1] - R[v] in previous array and do prefix sum, computing offsets for gather array + let gatherArraySize = + computeOffsetsInplace queue (vector.NNZ * 2 + 1) collectedRows + + if gatherArraySize = 0 then + collectedRows.Free queue + None + else + let ndRange = + Range1D.CreateValid(vector.NNZ, workGroupSize) + + let gather = gather.GetKernel() + + let resultRows = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, gatherArraySize) + + let resultIndices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, gatherArraySize) + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, gatherArraySize) + + if gatherArraySize > 0 then + queue.Post( + Msg.MsgSetArguments + (fun () -> + gather.KernelFunc + ndRange + vector.NNZ + collectedRows + matrix.RowPointers + matrix.Columns + matrix.Values + vector.Indices + resultRows + resultIndices + resultValues) + ) + + queue.Post(Msg.CreateRunMsg<_, _>(gather)) + + collectedRows.Free queue + + Some(resultRows, resultIndices, resultValues) + + + let private multiplyScalar (clContext: ClContext) (mul: Expr<'a option -> 'b option -> 'c option>) workGroupSize = + + let multiply = + <@ fun (ndRange: Range1D) resultLength vectorLength (rowIndices: ClArray) (matrixValues: ClArray<'a>) (vectorIndices: ClArray) (vectorValues: ClArray<'b>) (resultValues: ClArray<'c option>) -> + let i = ndRange.GlobalID0 + + if i < resultLength then + let index = rowIndices.[i] + let matrixValue = matrixValues.[i] + + let vectorValue = + (%Search.Bin.byKey) vectorLength index vectorIndices vectorValues + + let res = (%mul) (Some matrixValue) vectorValue + resultValues.[i] <- res @> + + let multiply = clContext.Compile multiply + + fun (queue: MailboxProcessor<_>) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> + + let resultLength = columnIndices.Length + + let result = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + + let ndRange = + Range1D.CreateValid(resultLength, workGroupSize) + + let multiply = multiply.GetKernel() + + queue.Post( + Msg.MsgSetArguments + (fun () -> + multiply.KernelFunc + ndRange + resultLength + vector.NNZ + columnIndices + matrixValues + vector.Indices + vector.Values + result) + ) + + queue.Post(Msg.CreateRunMsg<_, _>(multiply)) + + result + + let run + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + //TODO: Common.Gather? + let gather = gather clContext workGroupSize + + //TODO: Radix sort + let sort = + Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + + let multiplyScalar = + multiplyScalar clContext mul workGroupSize + + let segReduce = + Reduce.ByKey.Option.segmentSequential add clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + gather queue matrix vector + |> Option.map + (fun (gatherRows, gatherIndices, gatherValues) -> + sort queue gatherIndices gatherRows gatherValues + + let sortedRows, sortedIndices, sortedValues = gatherRows, gatherIndices, gatherValues + + let multipliedValues = + multiplyScalar queue sortedRows sortedValues vector + + sortedValues.Free queue + sortedRows.Free queue + + let result = + segReduce queue DeviceOnly sortedIndices multipliedValues + |> Option.map + (fun (reducedValues, reducedKeys) -> + + { Context = clContext + Indices = reducedKeys + Values = reducedValues + Size = matrix.ColumnCount }) + + multipliedValues.Free queue + sortedIndices.Free queue + + result) + |> Option.bind id + + + let runBoolStandard + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let gather = gather clContext workGroupSize + + let sort = + Sort.Radix.standardRunKeysOnly clContext workGroupSize + + let removeDuplicates = + GraphBLAS.FSharp.ClArray.removeDuplications clContext workGroupSize + + let create = + GraphBLAS.FSharp.ClArray.create clContext workGroupSize + + fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + + gather queue matrix vector + |> Option.map + (fun (gatherRows, gatherIndices, gatherValues) -> + gatherRows.Free queue + gatherValues.Free queue + + let sortedIndices = sort queue gatherIndices + + let resultIndices = removeDuplicates queue sortedIndices + + gatherIndices.Free queue + sortedIndices.Free queue + + { Context = clContext + Indices = resultIndices + Values = create queue DeviceOnly resultIndices.Length true + Size = matrix.ColumnCount }) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index f79a2193..d66b15e5 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -1,6 +1,7 @@ -namespace GraphBLAS.FSharp.Backend.Quotes +namespace GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects +open Microsoft.FSharp.Quotations module ArithmeticOperations = let inline private mkUnaryOp zero unaryOp = @@ -36,6 +37,16 @@ module ArithmeticOperations = if res = zero then None else Some res @> + let inline private mkNumericSumAsMul zero = + <@ fun (x: 't option) (y: 't option) -> + let mutable res = None + + match x, y with + | Some f, Some s -> res <- Some(f + s) + | _ -> () + + res @> + let inline private mkNumericMul zero = <@ fun (x: 't option) (y: 't option) -> let mutable res = zero @@ -173,12 +184,16 @@ module ArithmeticOperations = let floatMulAtLeastOne = mkNumericMulAtLeastOne 0.0 let float32MulAtLeastOne = mkNumericMulAtLeastOne 0f + let intSumAsMul = mkNumericSumAsMul System.Int32.MaxValue + let notOption = <@ fun x -> match x with | Some true -> None | _ -> Some true @> + let intNotQ = <@ fun x -> if x = 0 then 1 else 0 @> + let inline private binOpQ zero op = <@ fun (left: 'a) (right: 'a) -> let result = (%op) left right @@ -216,3 +231,29 @@ module ArithmeticOperations = let floatMul = createPair 0.0 (*) <@ (*) @> let float32Mul = createPair 0.0f (*) <@ (*) @> + + // without zero + let intAddWithoutZero = <@ fun x y -> Some(x + y) @> + + let intMulWithoutZero = <@ fun x y -> Some(x * y) @> + + // other operations + let less<'a when 'a: comparison> = + <@ fun (x: 'a option) (y: 'a option) -> + match x, y with + | Some x, Some y -> if (x < y) then Some 1 else None + | Some x, None -> Some 1 + | _ -> None @> + + let minOption<'a when 'a: comparison> = + <@ fun (x: 'a option) (y: 'a option) -> + match x, y with + | Some x, Some y -> Some(min x y) + | Some x, None -> Some x + | None, Some y -> Some y + | _ -> None @> + + let min<'a when 'a: comparison> = + <@ fun (x: 'a) (y: 'a) -> Some(min x y) @> + + let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Map.fs b/src/GraphBLAS-sharp.Backend/Quotes/Map.fs index 2f74a7c5..9a518e40 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Map.fs @@ -28,6 +28,11 @@ module Map = | Some _ -> 1 | None -> 0 @> + let predicateBitmap<'a> (predicate: Expr<'a -> bool>) = + <@ fun (x: 'a) -> + let res = (%predicate) x + if res then 1 else 0 @> + let inc = <@ fun item -> item + 1 @> let subtraction = <@ fun first second -> first - second @> diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs b/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs index 3a27b5d6..9b19b5b1 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Mask.fs @@ -7,6 +7,12 @@ module Mask = | _, None -> left | _ -> right @> + let assignComplemented<'a when 'a: struct> = + <@ fun (left: 'a option) (right: 'a option) -> + match left, right with + | _, None -> right + | _ -> left @> + let op<'a, 'b when 'a: struct and 'b: struct> = <@ fun (left: 'a option) (right: 'b option) -> match right with diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs index 07660c28..27687645 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Search.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Search.fs @@ -130,6 +130,32 @@ module Search = /// Find lower position of item in array. /// let lowerPosition<'a when 'a: equality and 'a: comparison> = + <@ fun length sourceItem (keys: ClArray<'a>) -> + + let mutable leftEdge = 0 + let mutable rightEdge = length - 1 + let mutable resultPosition = None + + while leftEdge <= rightEdge do + let currentPosition = (leftEdge + rightEdge) / 2 + let currentKey = keys.[currentPosition] + + if sourceItem = currentKey then + // remember positions and move left + resultPosition <- Some currentPosition + + rightEdge <- currentPosition - 1 + elif sourceItem < currentKey then + rightEdge <- currentPosition - 1 + else + leftEdge <- currentPosition + 1 + + resultPosition @> + + /// + /// Find lower position of item in array. + /// + let lowerPositionLocal<'a when 'a: equality and 'a: comparison> = <@ fun length sourceItem (keys: 'a []) -> let mutable leftEdge = 0 diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index a99cd8c4..6b6a7629 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend.Vector.Dense open Brahma.FSharp open Microsoft.FSharp.Quotations open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -15,7 +16,7 @@ module Vector = workGroupSize = - let map = ClArray.map op clContext workGroupSize + let map = Map.map op clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) -> @@ -28,7 +29,7 @@ module Vector = = let map2InPlace = - ClArray.map2InPlace opAdd clContext workGroupSize + Map.map2InPlace opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> @@ -40,8 +41,7 @@ module Vector = workGroupSize = - let map2 = - ClArray.map2 opAdd clContext workGroupSize + let map2 = Map.map2 opAdd clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> @@ -66,20 +66,24 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> + fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(leftVector.Length, workGroupSize) let kernel = kernel.GetKernel() + let valueCell = clContext.CreateClCell(value) + processor.Post( Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector value resultVector) + (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector valueCell resultVector) ) processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + valueCell.Free processor + let assignByMask<'a, 'b when 'a: struct and 'b: struct> (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) (clContext: ClContext) @@ -89,7 +93,7 @@ module Vector = let assignByMask = assignByMaskInPlace maskOp clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: ClCell<'a>) -> + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> let resultVector = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftVector.Length) @@ -97,6 +101,49 @@ module Vector = resultVector + let assignBySparseMaskInPlace<'a, 'b when 'a: struct and 'b: struct> + (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) + (clContext: ClContext) + workGroupSize + = + + let fillSubVectorKernel = + <@ fun (ndRange: Range1D) resultLength (leftVector: ClArray<'a option>) (maskVectorIndices: ClArray) (maskVectorValues: ClArray<'b>) (value: ClCell<'a>) (resultVector: ClArray<'a option>) -> + + let gid = ndRange.GlobalID0 + + if gid < resultLength then + let i = maskVectorIndices.[gid] + resultVector.[i] <- (%maskOp) leftVector.[i] (Some maskVectorValues.[gid]) value.Value @> + + let kernel = clContext.Compile(fillSubVectorKernel) + + fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> + + let ndRange = + Range1D.CreateValid(maskVector.NNZ, workGroupSize) + + let kernel = kernel.GetKernel() + + let valueCell = clContext.CreateClCell(value) + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + maskVector.NNZ + leftVector + maskVector.Indices + maskVector.Values + valueCell + resultVector) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + valueCell.Free processor + let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = let scatterValues = @@ -106,7 +153,7 @@ module Vector = Common.Scatter.lastOccurrence clContext workGroupSize let getBitmap = - ClArray.map (Map.option 1 0) clContext workGroupSize + Map.map (Map.option 1 0) clContext workGroupSize let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize @@ -115,7 +162,7 @@ module Vector = ClArray.init Map.id clContext workGroupSize let allValues = - ClArray.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize + Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (vector: ClArray<'a option>) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs index 07e6e5e7..8ad13044 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs @@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend.Vector.Sparse open Brahma.FSharp open Microsoft.FSharp.Control open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions @@ -74,7 +75,7 @@ module internal Common = let concatIndices = ClArray.concat clContext workGroupSize let mapIndices = - ClArray.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> + Common.Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> fun (processor: MailboxProcessor<_>) allocationMode (vectors: Sparse<'a> seq) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs index 329e5484..f0a69a41 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs @@ -95,7 +95,7 @@ module internal Map = queue.Post(Msg.CreateFreeMsg<_>(indices)) { Context = clContext - Indices = indices + Indices = resultIndices Values = resultValues Size = vector.Size } diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index feb6e484..fb91840f 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -4,9 +4,11 @@ open Brahma.FSharp open FSharp.Quotations open Microsoft.FSharp.Control open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Backend.Quotes +open Microsoft.FSharp.Core module internal Map2 = let private preparePositions<'a, 'b, 'c> opAdd (clContext: ClContext) workGroupSize = @@ -78,7 +80,7 @@ module internal Map2 = preparePositions<'a, 'b, 'c> op clContext workGroupSize let setPositions = - Common.setPositions clContext workGroupSize + Common.setPositionsOption clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> @@ -91,17 +93,113 @@ module internal Map2 = rightVector.Values rightVector.Indices - let resultValues, resultIndices = + let result = setPositions processor allocationMode allValues allIndices bitmap + |> Option.map + (fun (resultValues, resultIndices) -> + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = leftVector.Size }) - processor.Post(Msg.CreateFreeMsg<_>(allIndices)) - processor.Post(Msg.CreateFreeMsg<_>(allValues)) - processor.Post(Msg.CreateFreeMsg<_>(bitmap)) + allIndices.Free processor + allValues.Free processor + bitmap.Free processor - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = max leftVector.Size rightVector.Size } + result + + let private preparePositionsSparseDense<'a, 'b, 'c> (clContext: ClContext) workGroupSize opAdd = + + let preparePositions (op: Expr<'a option -> 'b option -> 'c option>) = + <@ fun (ndRange: Range1D) length (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) (resultBitmap: ClArray) (resultValues: ClArray<'c>) (resultIndices: ClArray) -> + + let gid = ndRange.GlobalID0 + + if gid < length then + + let i = leftIndices.[gid] + + let (leftValue: 'a option) = Some leftValues.[gid] + + let (rightValue: 'b option) = rightValues.[i] + + match (%op) leftValue rightValue with + | Some value -> + resultValues.[gid] <- value + resultIndices.[gid] <- i + + resultBitmap.[gid] <- 1 + | None -> resultBitmap.[gid] <- 0 @> + + let kernel = + clContext.Compile <| preparePositions opAdd + + fun (processor: MailboxProcessor<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> + + let resultBitmap = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) + + let resultIndices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) + + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode<'c>(DeviceOnly, vectorLenght) + + let ndRange = + Range1D.CreateValid(vectorLenght, workGroupSize) + + let kernel = kernel.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> + kernel.KernelFunc + ndRange + vectorLenght + leftValues + leftIndices + rightValues + resultBitmap + resultValues + resultIndices) + ) + + processor.Post(Msg.CreateRunMsg<_, _> kernel) + + resultBitmap, resultValues, resultIndices + + //TODO: unify with sparseXsparse + let runSparseDense<'a, 'b, 'c when 'a: struct and 'b: struct and 'c: struct> + op + (clContext: ClContext) + workGroupSize + = + + let prepare = + preparePositionsSparseDense<'a, 'b, 'c> clContext workGroupSize op + + let setPositions = + Common.setPositionsOption clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> + + let bitmap, allValues, allIndices = + prepare processor leftVector.NNZ leftVector.Values leftVector.Indices rightVector + + let result = + setPositions processor allocationMode allValues allIndices bitmap + |> Option.map + (fun (resultValues, resultIndices) -> + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = leftVector.Size }) + + allIndices.Free processor + allValues.Free processor + bitmap.Free processor + + result let private preparePositionsAssignByMask<'a, 'b when 'a: struct and 'b: struct> op @@ -183,7 +281,9 @@ module internal Map2 = let setPositions = Common.setPositions clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: ClCell<'a>) -> + fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> + + let valueCell = clContext.CreateClCell(value) let bitmap, values, indices = prepare @@ -193,11 +293,12 @@ module internal Map2 = leftVector.Indices rightVector.Values rightVector.Indices - value + valueCell let resultValues, resultIndices = setPositions processor allocationMode values indices bitmap + processor.Post(Msg.CreateFreeMsg<_>(valueCell)) processor.Post(Msg.CreateFreeMsg<_>(indices)) processor.Post(Msg.CreateFreeMsg<_>(values)) processor.Post(Msg.CreateFreeMsg<_>(bitmap)) @@ -280,7 +381,7 @@ module internal Map2 = preparePositions<'a, 'b, 'c> op clContext workGroupSize let setPositions = - Common.setPositions clContext workGroupSize + Common.setPositionsOption clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> @@ -293,14 +394,17 @@ module internal Map2 = processor.Post(Msg.CreateFreeMsg<_>(rightValues)) processor.Post(Msg.CreateFreeMsg<_>(isLeft)) - let resultValues, resultIndices = + let result = setPositions processor allocationMode allValues allIndices positions + |> Option.map + (fun (resultValues, resultIndices) -> + { Context = clContext + Values = resultValues + Indices = resultIndices + Size = max leftVector.Size rightVector.Size }) processor.Post(Msg.CreateFreeMsg<_>(allIndices)) processor.Post(Msg.CreateFreeMsg<_>(allValues)) processor.Post(Msg.CreateFreeMsg<_>(positions)) - { Context = clContext - Values = resultValues - Indices = resultIndices - Size = max leftVector.Size rightVector.Size } + result diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index 98aae51b..1a7fb8f7 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -36,6 +36,8 @@ module Vector = let map2 = Map2.run + let map2SparseDense = Map2.runSparseDense + let map2AtLeastOne opAdd (clContext: ClContext) workGroupSize allocationMode = Map2.AtLeastOne.run (Convert.atLeastOneToOption opAdd) clContext workGroupSize allocationMode diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index 9494990e..f02798d6 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -14,31 +14,30 @@ open GraphBLAS.FSharp.Backend.Vector [] module Vector = - /// - /// Builds vector of given format with fixed size and fills it with the given value. - /// - /// OpenCL context. - /// Should be a power of 2 and greater than 1. - let create (clContext: ClContext) workGroupSize = - let create = ClArray.create clContext workGroupSize - - fun (processor: MailboxProcessor<_>) allocationMode size format value -> - match format with - | Sparse -> failwith "Attempting to create full sparse vector" - | Dense -> - ClVector.Dense - <| create processor allocationMode size value - /// /// Builds vector of given format with fixed size and fills it with the default values of desired type. /// /// OpenCL context. /// Should be a power of 2 and greater than 1. let zeroCreate (clContext: ClContext) workGroupSize = - let create = create clContext workGroupSize + let zeroCreate = + ClArray.zeroCreate clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode size format -> - create processor allocationMode size format None + match format with + | Sparse -> + ClVector.Sparse + { Context = clContext + Indices = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, [| 0 |]) + Values = + clContext.CreateClArrayWithSpecificAllocationMode( + allocationMode, + [| Unchecked.defaultof<'a> |] + ) // TODO empty vector + Size = size } + | Dense -> + ClVector.Dense + <| zeroCreate processor allocationMode size /// /// Builds vector of given format with fixed size and fills it with the values from the given list. @@ -46,17 +45,49 @@ module Vector = /// OpenCL context. /// Should be a power of 2 and greater than 1. let ofList (clContext: ClContext) workGroupSize = - let denseOfList = - Dense.Vector.ofList clContext workGroupSize + let scatter = + Common.Scatter.lastOccurrence clContext workGroupSize + + let zeroCreate = + ClArray.zeroCreate clContext workGroupSize + + let map = + Common.Map.map <@ Some @> clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode format size (elements: (int * 'a) list) -> match format with | Sparse -> - Sparse.Vector.ofList clContext allocationMode size elements + let indices, values = + elements + |> Array.ofList + |> Array.sortBy fst + |> Array.unzip + + { Context = clContext + Indices = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, indices) + Values = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, values) + Size = size } |> ClVector.Sparse | Dense -> - denseOfList processor allocationMode size elements - |> ClVector.Dense + let indices, values = elements |> Array.ofList |> Array.unzip + + let values = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, values) + + let indices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, indices) + + let mappedValues = map processor DeviceOnly values + + let result = zeroCreate processor allocationMode size + + scatter processor indices mappedValues result + + processor.Post(Msg.CreateFreeMsg(mappedValues)) + processor.Post(Msg.CreateFreeMsg(indices)) + processor.Post(Msg.CreateFreeMsg(values)) + + ClVector.Dense result /// /// Creates new vector with the values from the given one. diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index edf40fea..110dddec 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -26,6 +26,20 @@ let testFixtures (testContext: TestContext) = context workGroupSize + let bfsSparse = + Algorithms.BFS.singleSourceSparse + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption + context + workGroupSize + + let bfsPushPull = + Algorithms.BFS.singleSourcePushPull + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption + context + workGroupSize + testPropertyWithConfig config testName <| fun (matrix: int [,]) -> @@ -44,24 +58,41 @@ let testFixtures (testContext: TestContext) = let matrixHost = Utils.createMatrixFromArray2D CSR matrix ((=) 0) + let matrixHostBool = + Utils.createMatrixFromArray2D CSR (Array2D.map (fun x -> x <> 0) matrix) ((=) false) + let matrix = matrixHost.ToDevice context + let matrixBool = matrixHostBool.ToDevice context + + let res = bfs queue matrix source + + let resSparse = bfsSparse queue matrixBool source + + let resPushPull = bfsPushPull queue matrixBool source + + let resHost = res.ToHost queue + let resHostSparse = resSparse.ToHost queue + let resHostPushPull = resPushPull.ToHost queue - match matrix with - | ClMatrix.CSR mtx -> - let res = - bfs queue matrix source |> ClVector.Dense + matrix.Dispose queue + matrixBool.Dispose queue + res.Dispose queue + resSparse.Dispose queue + resPushPull.Dispose queue - let resHost = res.ToHost queue + match resHost, resHostSparse, resHostPushPull with + | Vector.Dense resHost, Vector.Dense resHostSparse, Vector.Dense resHostPushPull -> + let actual = resHost |> Utils.unwrapOptionArray 0 - (mtx :> IDeviceMemObject).Dispose queue - res.Dispose queue + let actualSparse = + resHostSparse |> Utils.unwrapOptionArray 0 - match resHost with - | Vector.Dense resHost -> - let actual = resHost |> Utils.unwrapOptionArray 0 + let actualPushPull = + resHostPushPull |> Utils.unwrapOptionArray 0 - Expect.sequenceEqual actual expected "Sequences must be equal" - | _ -> failwith "Not implemented" + Expect.sequenceEqual actual expected "Dense bfs is not as expected" + Expect.sequenceEqual actualSparse expected "Sparse bfs is not as expected" + Expect.sequenceEqual actualPushPull expected "Push-pull bfs is not as expected" | _ -> failwith "Not implemented" ] let tests = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs new file mode 100644 index 00000000..fa9cdff7 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -0,0 +1,64 @@ +module GraphBLAS.FSharp.Tests.Backend.Algorithms.SSSP + +open Expecto +open GraphBLAS.FSharp.Backend +open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms +open GraphBLAS.FSharp.Tests.Backend.QuickGraph.CreateGraph +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ClVectorExtensions + +let testFixtures (testContext: TestContext) = + [ let config = Utils.undirectedAlgoConfig + let context = testContext.ClContext + let queue = testContext.Queue + let workGroupSize = Utils.defaultWorkGroupSize + + let testName = + sprintf "Test on %A" testContext.ClContext + + let ssspDense = + Algorithms.SSSP.run context workGroupSize + + testPropertyWithConfig config testName + <| fun (matrix: int [,]) -> + + let matrix = Array2D.map (fun x -> abs x) matrix + + let graph = undirectedFromArray2D matrix 0 + + let largestComponent = + ConnectedComponents.largestComponent graph + + if largestComponent.Length > 0 then + let source = largestComponent.[0] + + let expected = + SSSP.runUndirected matrix (directedFromArray2D matrix 0) source + |> Array.map (Option.map int) + + let matrixHost = + Utils.createMatrixFromArray2D CSR matrix ((=) 0) + + let matrix = matrixHost.ToDevice context + + let resDense = + ssspDense queue matrix source |> ClVector.Dense + + let resHost = resDense.ToHost queue + + matrix.Dispose queue + resDense.Dispose queue + + match resHost with + | Vector.Dense resHost -> + let actual = resHost + + Expect.sequenceEqual actual expected "Sequences must be equal" + | _ -> failwith "Not implemented" ] + +let tests = + TestCases.gpuTests "SSSP tests" testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs index 1cb85d29..b87816ba 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs @@ -4,7 +4,7 @@ open Expecto open Brahma.FSharp open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -44,7 +44,7 @@ let createTest<'a when 'a: equality> (testContext: TestContext) (zero: 'a) isEqu let context = testContext.ClContext let map = - ClArray.map (Map.optionToValueOrZero zero) context wgSize + Map.map (Map.optionToValueOrZero zero) context wgSize makeTest testContext map zero isEqual |> testPropertyWithConfig config $"Correctness on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs index 0b5ab49b..69b28dad 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs @@ -4,7 +4,7 @@ open Expecto open Brahma.FSharp open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context -open GraphBLAS.FSharp +open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Objects.ClContextExtensions @@ -43,7 +43,7 @@ let createTest<'a when 'a: equality> (testContext: TestContext) isEqual hostMapF let context = testContext.ClContext - let map = ClArray.map2 mapFunQ context wgSize + let map = Map.map2 mapFunQ context wgSize makeTest<'a> testContext map hostMapFun isEqual |> testPropertyWithConfig config $"Correctness on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs index 0e58f323..1ff419ef 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs @@ -430,7 +430,7 @@ let testOption<'a> isEqual reduceOp testFun (array: (int * 'a) []) = |> checkResultOption isEqual keys values reduceOp let createTestOption (isEqual: 'a -> 'a -> bool) (reduceOpQ, reduceOp) = - Common.Reduce.ByKey.Option.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.Option.segmentSequentialByOffsets reduceOpQ context Utils.defaultWorkGroupSize |> testOption<'a> isEqual reduceOp |> testPropertyWithConfig { config with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs index 9de0e054..44206379 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs @@ -16,8 +16,13 @@ let processor = Context.defaultContext.Queue let context = Context.defaultContext.ClContext -let checkResultByKeys (inputArray: (int * 'a) []) (actualValues: 'a []) = - let expectedValues = Seq.sortBy fst inputArray |> Seq.map snd +let checkResultByKeys (inputArray: (int * 'a) []) (actualKeys: int []) (actualValues: 'a []) = + let expected = Seq.sortBy fst inputArray + let expectedKeys = expected |> Seq.map fst + let expectedValues = expected |> Seq.map snd + + "Keys must be the same" + |> Expect.sequenceEqual expectedKeys actualKeys "Values must be the same" |> Expect.sequenceEqual expectedValues actualValues @@ -31,12 +36,13 @@ let makeTestByKeys<'a when 'a: equality> sortFun (array: (int * 'a) []) = let clKeys = keys.ToDevice context let clValues = values.ToDevice context - let clActualValues: ClArray<'a> = + let clActualKeys, clActualValues: ClArray * ClArray<'a> = sortFun processor HostInterop clKeys clValues + let actualKeys = clActualKeys.ToHostAndFree processor let actualValues = clActualValues.ToHostAndFree processor - checkResultByKeys array actualValues + checkResultByKeys array actualKeys actualValues let createTestByKeys<'a when 'a: equality and 'a: struct> = let sort = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs new file mode 100644 index 00000000..ba4f3328 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/QuickGraph/Algorithms/SSSP.fs @@ -0,0 +1,37 @@ +namespace GraphBLAS.FSharp.Tests.Backend.QuickGraph.Algorithms + +open QuikGraph +open QuikGraph.Algorithms.ShortestPath +open QuikGraph.Algorithms.Observers + +module SSSP = + let runUndirected (matrix: int [,]) (graph: AdjacencyGraph>) source = + let weight = + fun (e: Edge) -> float matrix.[e.Source, e.Target] + + let dijkstra = + DijkstraShortestPathAlgorithm>(graph, weight) + + // Attach a distance observer to give us the shortest path distances + let distObserver = + VertexDistanceRecorderObserver>(weight) + + distObserver.Attach(dijkstra) |> ignore + + // Attach a Vertex Predecessor Recorder Observer to give us the paths + let predecessorObserver = + VertexPredecessorRecorderObserver>() + + predecessorObserver.Attach(dijkstra) |> ignore + + // Run the algorithm with A set to be the source + dijkstra.Compute(source) + + let res: array = + Array.zeroCreate (Array2D.length1 matrix) + + for kvp in distObserver.Distances do + res.[kvp.Key] <- Some kvp.Value + + res.[source] <- Some 0.0 + res diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs index 737c5831..3c0fb675 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs @@ -51,7 +51,7 @@ let checkResult isZero isComplemented (actual: Vector<'a>) (vector: 'a []) (mask let makeTest<'a when 'a: struct and 'a: equality> (isZero: 'a -> bool) (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClCell<'a> -> ClVector<'a>) + (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) isComplemented case (vector: 'a [], mask: 'a [], value: 'a) @@ -72,10 +72,9 @@ let makeTest<'a when 'a: struct and 'a: equality> let clMaskVector = maskVector.ToDevice context try - let clValue = context.CreateClCell<'a> value let clActual = - fillVector q HostInterop clLeftVector clMaskVector clValue + fillVector q HostInterop clLeftVector clMaskVector value let cooClActual = toDense q HostInterop clActual diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs index aac15b20..771798c7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs @@ -44,7 +44,7 @@ let correctnessGenericTest isEqual zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a>) + (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) case (leftArray: 'a [], rightArray: 'a []) @@ -71,17 +71,20 @@ let correctnessGenericTest let res = addFun q HostInterop firstVector secondVector - firstVector.Dispose q - secondVector.Dispose q + match res with + | Some res -> + let denseActual = toDense q HostInterop res - let denseActual = toDense q HostInterop res + let actual = denseActual.ToHost q - let actual = denseActual.ToHost q + res.Dispose q + denseActual.Dispose q - res.Dispose q - denseActual.Dispose q + checkResult isEqual zero op actual leftArray rightArray + | _ -> () - checkResult isEqual zero op actual leftArray rightArray + firstVector.Dispose q + secondVector.Dispose q with | ex when ex.Message = "InvalidBufferSize" -> () | ex -> raise ex diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs new file mode 100644 index 00000000..c554b25e --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -0,0 +1,165 @@ +module GraphBLAS.FSharp.Tests.Backend.Vector.SpMSpV + +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Objects.ArraysExtensions +open Expecto +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Tests.TestCases +open Microsoft.FSharp.Collections +open Microsoft.FSharp.Core +open GraphBLAS.FSharp.Objects + +let config = Utils.defaultConfig + +let wgSize = Utils.defaultWorkGroupSize + +let checkResult + sumOp + mulOp + (zero: 'a) + (baseMtx: 'a [,]) + (baseVtr: 'a []) + (actualIndices: int []) + (actualValues: 'a []) + = + let rows = Array2D.length1 baseMtx + let columns = Array2D.length2 baseMtx + + let expectedV = Array.create columns zero + let mutable expectedIndices = List.Empty + let mutable expectedValues = List.Empty + + for c in 0 .. columns - 1 do + let mutable sum = zero + + for r in 0 .. rows - 1 do + sum <- sumOp sum (mulOp baseMtx.[r, c] baseVtr.[r]) + + expectedV.[c] <- sum + + for i in 0 .. columns - 1 do + if expectedV.[i] <> zero then + expectedIndices <- List.append expectedIndices [ i ] + expectedValues <- List.append expectedValues [ expectedV.[i] ] + + Expect.sequenceEqual + actualIndices + expectedIndices + $"Values should be the same. Actual is {actualIndices}, expected {expectedIndices}." + + Expect.sequenceEqual + actualValues + expectedValues + $"Values should be the same. Actual is {actualValues}, expected {expectedValues}." + +let correctnessGenericTest + (zero: 'a) + some + sumOp + mulOp + (spMV: MailboxProcessor<_> -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) + (isEqual: 'a -> 'a -> bool) + q + (testContext: TestContext) + (vector: 'a [], matrix: 'a [,], _: bool []) + = + + if (Array2D.length1 matrix > 0 && vector.Length > 0) then + //Ensure that result is not empty + vector.[0] <- some + matrix.[0, 0] <- some + + let mtx = + Utils.createMatrixFromArray2D CSR matrix (isEqual zero) + + let vtr = + Utils.createVectorFromArray Sparse vector (isEqual zero) + + if mtx.NNZ > 0 && vtr.Size > 0 then + try + let m = mtx.ToDevice testContext.ClContext + + let v = vtr.ToDevice testContext.ClContext + + match spMV testContext.Queue m v with + | Some (ClVector.Sparse res) -> + m.Dispose q + v.Dispose q + let hostResIndices = res.Indices.ToHost q + let hostResValues = res.Values.ToHost q + res.Dispose q + + checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues + | _ -> failwith "Result should not be empty while standard operations are tested" + with + | ex when ex.Message = "InvalidBufferSize" -> () + | ex -> raise ex + +let createTest spmspv testContext (zero: 'a) some isEqual add mul addQ mulQ = + let context = testContext.ClContext + let q = testContext.Queue + + let getCorrectnessTestName datatype = + $"Correctness on %s{datatype}, %A{testContext.ClContext}" + + let spMSpV = spmspv addQ mulQ context wgSize + + testContext + |> correctnessGenericTest zero some add mul spMSpV isEqual q + |> testPropertyWithConfig config (getCorrectnessTestName $"{typeof<'a>}") + + +let testFixturesSpMSpV (testContext: TestContext) = + [ let context = testContext.ClContext + let q = testContext.Queue + q.Error.Add(fun e -> failwithf "%A" e) + + createTest + Operations.SpMSpVBool + testContext + false + true + (=) + (||) + (&&) + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption + + createTest + Operations.SpMSpV + testContext + 0 + 1 + (=) + (+) + (*) + ArithmeticOperations.intSumOption + ArithmeticOperations.intMulOption + + createTest + Operations.SpMSpV + testContext + 0.0f + 1f + (=) + (+) + (*) + ArithmeticOperations.float32SumOption + ArithmeticOperations.float32MulOption + + if Utils.isFloat64Available context.ClDevice then + createTest + Operations.SpMSpV + testContext + 0.0 + 1 + (=) + (+) + (*) + ArithmeticOperations.floatSumOption + ArithmeticOperations.floatMulOption ] + +let tests = + gpuTests "Backend.Vector.SpMSpV tests" testFixturesSpMSpV diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index aed7ea50..45ab8054 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -51,7 +51,7 @@ let correctnessGenericTest zero sumOp mulOp - (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix.CSR<'a> -> ClArray<'a option> -> ClArray<'a option>) + (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -68,14 +68,15 @@ let correctnessGenericTest try let m = mtx.ToDevice testContext.ClContext - match vtr, m with - | Vector.Dense vtr, ClMatrix.CSR m -> - let v = vtr.ToDevice testContext.ClContext + let v = vtr.ToDevice testContext.ClContext - let res = spMV testContext.Queue HostInterop m v + let res = spMV testContext.Queue HostInterop m v - (ClMatrix.CSR m).Dispose q - v.Free q + m.Dispose q + v.Dispose q + + match res with + | ClVector.Dense res -> let hostRes = res.ToHostAndFree q checkResult isEqual sumOp mulOp zero matrix vector hostRes diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index 232d332f..d4913a3d 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -15,10 +15,10 @@ + - @@ -68,6 +68,7 @@ + From 9a9b7f93cb63ac4c64f9365e82604ce7433ad80f Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Sat, 25 Nov 2023 15:14:24 +0300 Subject: [PATCH 069/102] revert: benchmarks changes --- .../Algorithms/BFS.fs | 29 ++----------------- .../GraphBLAS-sharp.Benchmarks.fsproj | 1 - .../GraphBLAS-sharp.Benchmarks/Program.fs | 4 +-- 3 files changed, 3 insertions(+), 31 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index a0c10cb6..d8af762f 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -12,8 +12,8 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend.Quotes [] -[] -[] +[] +[] [)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, @@ -139,30 +139,6 @@ type BFSWithoutTransferBenchmarkInt32() = static member InputMatrixProvider = Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt" -type BFSPushPullWithoutTransferBenchmarkInt32() = - - inherit WithoutTransferBenchmark( - (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( - 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, @@ -211,4 +187,3 @@ type BFSWithTransferBenchmarkInt32() = static member InputMatrixProvider = Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt" - diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index 75ddfc15..2dd0c406 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -25,7 +25,6 @@ - diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 0655cd45..5a3ccf37 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,9 +4,7 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof - typeof - typeof |] + BenchmarkSwitcher [| typeof |] benchmarks.Run argv |> ignore 0 From a94fd07e5ec89552061d2da27c7e305a5d12898d Mon Sep 17 00:00:00 2001 From: artemiipatov Date: Sat, 25 Nov 2023 15:38:07 +0300 Subject: [PATCH 070/102] revert: benchmarks configs --- .../GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt index d71735c7..708032bc 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/WorkflowTargets.txt @@ -1 +1 @@ -BFSWithoutTransferBenchmark +BFSWithoutTransfer From faf242c5b61bae28be7bc18801aefb9d69c4ac9a Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sat, 2 Dec 2023 18:41:44 +0300 Subject: [PATCH 071/102] PageRankMatrix type --- .../Algorithms/PageRank.fs | 2 +- .../Algorithms/PageRank.fs | 4 +-- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 33 +++++++++++++++++++ tests/GraphBLAS-sharp.Tests/Program.fs | 3 +- 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index 70273357..9e6a3f38 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -23,7 +23,7 @@ type Benchmarks( let mutable funToBenchmark = None let mutable matrix = Unchecked.defaultof> - let mutable matrixPrepared = Unchecked.defaultof> + let mutable matrixPrepared = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> let accuracy = 0.00000001f diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index d806b4fe..d089d945 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -131,6 +131,7 @@ module internal PageRank = transposeInPlace queue DeviceOnly newMatrix |> ClMatrix.CSR + |> PageRankMatrix | _ -> failwith "Not implemented" let run (clContext: ClContext) workGroupSize = @@ -154,8 +155,7 @@ module internal PageRank = let create = GraphBLAS.FSharp.Vector.create clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix) accuracy -> - + fun (queue: MailboxProcessor) (PageRankMatrix matrix) accuracy -> let vertexCount = matrix.RowCount //None is 0 diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 81771bd0..b17dbb2b 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -173,3 +173,36 @@ type ClMatrix<'a when 'a: struct> = | ClMatrix.COO matrix -> matrix.NNZ | ClMatrix.CSC matrix -> matrix.NNZ | ClMatrix.LIL matrix -> matrix.NNZ + +/// +/// Represents an abstraction over matrix, which is converted to correct format for PageRank algorithm +/// +type PageRankMatrix<'a when 'a: struct> = + | PageRankMatrix of ClMatrix<'a> + /// + /// Gets the number of rows in matrix. + /// + member this.RowCount = + match this with + | PageRankMatrix matrix -> matrix.RowCount + + /// + /// Gets the number of columns in matrix. + /// + member this.ColumnCount = + match this with + | PageRankMatrix matrix -> matrix.ColumnCount + + /// + /// Release device resources allocated for the matrix. + /// + member this.Dispose q = + match this with + | PageRankMatrix matrix -> matrix.Dispose q + + /// + /// Gets the number of non-zero elements in matrix. + /// + member this.NNZ = + match this with + | PageRankMatrix matrix -> matrix.NNZ diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 5b7b7908..b3e11bc4 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -92,7 +92,8 @@ let algorithmsTests = testList "Algorithms tests" [ Algorithms.BFS.tests - Algorithms.SSSP.tests ] + Algorithms.SSSP.tests + Algorithms.PageRank.tests ] |> testSequenced let deviceTests = From b278b7a4e9a97182b743cd32ba867c36cfa97a96 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Dec 2023 16:45:29 +0300 Subject: [PATCH 072/102] BFS on bool --- .../Algorithms/BFS.fs | 32 +++++++++---------- .../GraphBLAS-sharp.Benchmarks/Program.fs | 4 +-- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 26 +++++++-------- .../Backend/Algorithms/BFS.fs | 16 ++++++---- 4 files changed, 40 insertions(+), 38 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index a0c10cb6..db82d111 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -27,7 +27,7 @@ type Benchmarks<'elem when 'elem : struct>( let mutable matrix = Unchecked.defaultof> let mutable matrixHost = Unchecked.defaultof<_> - member val ResultLevels = Unchecked.defaultof> with get,set + member val ResultLevels = Unchecked.defaultof> with get,set [] member val OclContextInfo = Unchecked.defaultof with get, set @@ -127,24 +127,24 @@ type WithoutTransferBenchmark<'elem when 'elem : struct>( this.BFS() this.Processor.PostAndReply Msg.MsgNotifyMe -type BFSWithoutTransferBenchmarkInt32() = +type BFSWithoutTransferBenchmarkBool() = - inherit WithoutTransferBenchmark( - (Algorithms.BFS.singleSource ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption), - int32, - (fun _ -> Utils.nextInt (System.Random())), + inherit WithoutTransferBenchmark( + (Algorithms.BFS.singleSource ArithmeticOperations.boolSumOption ArithmeticOperations.boolMulOption), + (fun _ -> true), + (fun _ -> true), 0, (fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context)) static member InputMatrixProvider = Benchmarks<_>.InputMatrixProviderBuilder "BFSBenchmarks.txt" -type BFSPushPullWithoutTransferBenchmarkInt32() = +type BFSPushPullWithoutTransferBenchmarkBool() = - inherit WithoutTransferBenchmark( - (Algorithms.BFS.singleSourcePushPull ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption), - int32, - (fun _ -> Utils.nextInt (System.Random())), + inherit WithoutTransferBenchmark( + (Algorithms.BFS.singleSourcePushPull ArithmeticOperations.boolSumOption ArithmeticOperations.boolMulOption), + (fun _ -> true), + (fun _ -> true), 0, (fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context)) @@ -200,12 +200,12 @@ type WithTransferBenchmark<'elem when 'elem : struct>( this.Processor.PostAndReply Msg.MsgNotifyMe | _ -> failwith "Impossible" -type BFSWithTransferBenchmarkInt32() = +type BFSWithTransferBenchmarkBool() = - inherit WithTransferBenchmark( - (Algorithms.BFS.singleSource ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption), - int32, - (fun _ -> Utils.nextInt (System.Random())), + inherit WithTransferBenchmark( + (Algorithms.BFS.singleSource ArithmeticOperations.boolSumOption ArithmeticOperations.boolMulOption), + (fun _ -> true), + (fun _ -> true), 0, (fun context matrix -> ClMatrix.CSR <| matrix.ToCSR.ToDevice context)) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 0655cd45..5e173915 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,8 +4,8 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof - typeof + BenchmarkSwitcher [| typeof + typeof typeof |] benchmarks.Run argv |> ignore diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 830c0bad..0fd2f783 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -11,8 +11,8 @@ open GraphBLAS.FSharp.Objects.ClCellExtensions module internal BFS = let singleSource - (add: Expr int option -> int option>) - (mul: Expr<'a option -> int option -> int option>) + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) (clContext: ClContext) workGroupSize = @@ -41,7 +41,7 @@ module internal BFS = zeroCreate queue DeviceOnly vertexCount Dense let front = - ofList queue DeviceOnly Dense vertexCount [ source, 1 ] + ofList queue DeviceOnly Dense vertexCount [ source, true ] let mutable level = 0 let mutable stop = false @@ -67,14 +67,14 @@ module internal BFS = levels let singleSourceSparse - (add: Expr int option -> int option>) - (mul: Expr<'a option -> int option -> int option>) + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) (clContext: ClContext) workGroupSize = let spMSpV = - Operations.SpMSpV add mul clContext workGroupSize + Operations.SpMSpVBool add mul clContext workGroupSize let zeroCreate = Vector.zeroCreate clContext workGroupSize @@ -94,7 +94,7 @@ module internal BFS = zeroCreate queue DeviceOnly vertexCount Dense let mutable front = - ofList queue DeviceOnly Sparse vertexCount [ source, 1 ] + ofList queue DeviceOnly Sparse vertexCount [ source, true ] let mutable level = 0 let mutable stop = false @@ -125,8 +125,8 @@ module internal BFS = let singleSourcePushPull - (add: Expr int option -> int option>) - (mul: Expr<'a option -> int option -> int option>) + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) (clContext: ClContext) workGroupSize = @@ -135,7 +135,7 @@ module internal BFS = Operations.SpMVInPlace add mul clContext workGroupSize let spMSpV = - Operations.SpMSpV add mul clContext workGroupSize + Operations.SpMSpVBool add mul clContext workGroupSize let zeroCreate = Vector.zeroCreate clContext workGroupSize @@ -159,7 +159,7 @@ module internal BFS = ClArray.count Predicates.isSome clContext workGroupSize //Push or pull functions - let getNNZ (queue: MailboxProcessor) (v: ClVector) = + let getNNZ (queue: MailboxProcessor) (v: ClVector) = match v with | ClVector.Sparse v -> v.NNZ | ClVector.Dense v -> countNNZ queue v @@ -169,14 +169,14 @@ module internal BFS = let push nnz size = (float32 nnz) / (float32 size) <= SPARSITY - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = zeroCreate queue DeviceOnly vertexCount Dense let mutable frontier = - ofList queue DeviceOnly Sparse vertexCount [ source, 1 ] + ofList queue DeviceOnly Sparse vertexCount [ source, true ] let mutable level = 0 let mutable stop = false diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index 92ba3d1b..6d83eb91 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -21,28 +21,30 @@ let testFixtures (testContext: TestContext) = let bfs = Algorithms.BFS.singleSource - ArithmeticOperations.intSumOption - ArithmeticOperations.intMulOption + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption context workGroupSize let bfsSparse = Algorithms.BFS.singleSourceSparse - ArithmeticOperations.intSumOption - ArithmeticOperations.intMulOption + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption context workGroupSize let bfsPushPull = Algorithms.BFS.singleSourcePushPull - ArithmeticOperations.intSumOption - ArithmeticOperations.intMulOption + ArithmeticOperations.boolSumOption + ArithmeticOperations.boolMulOption context workGroupSize testPropertyWithConfig config testName <| fun (matrix: int [,]) -> + let matrixBool = Array2D.map (fun x -> x <> 0) matrix + let graph = undirectedFromArray2D matrix 0 let largestComponent = @@ -56,7 +58,7 @@ let testFixtures (testContext: TestContext) = |> Utils.createArrayFromDictionary (Array2D.length1 matrix) 0 let matrixHost = - Utils.createMatrixFromArray2D CSR matrix ((=) 0) + Utils.createMatrixFromArray2D CSR matrixBool ((=) false) let matrix = matrixHost.ToDevice context From 6f3819b9101ee6731918c7743047386a66cf95f9 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Dec 2023 17:20:06 +0300 Subject: [PATCH 073/102] Fix merge --- .../GraphBLAS-sharp.Benchmarks.fsproj | 3 +- .../GraphBLAS-sharp.Benchmarks/Program.fs | 2 +- .../Algorithms/Algorithms.fs | 5 + src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 2 +- .../Algorithms/SSSP.fs | 4 +- .../GraphBLAS-sharp.Backend.fsproj | 1 + .../Quotes/Arithmetic.fs | 13 ++ src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 33 ++--- .../Backend/Algorithms/MSBFS.fs | 4 +- .../Backend/Algorithms/PageRank.fs | 118 ++++++++++++++++++ .../Backend/Algorithms/SSSP.fs | 3 +- .../GraphBLAS-sharp.Tests.fsproj | 1 + tests/GraphBLAS-sharp.Tests/Program.fs | 2 +- 13 files changed, 164 insertions(+), 27 deletions(-) create mode 100644 tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index 2dd0c406..1ab92795 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -25,8 +25,9 @@ + - \ No newline at end of file + diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 88152c72..40bbb73a 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,7 +4,7 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof + BenchmarkSwitcher [| typeof |] benchmarks.Run argv |> ignore 0 diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index bc7de55d..180b72b6 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -19,3 +19,8 @@ module Algorithms = module SSSP = let run = SSSP.run + + module PageRank = + let run = PageRank.run + + let prepareMatrix = PageRank.prepareMatrix diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 9a5881eb..3215f298 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -34,7 +34,7 @@ module internal BFS = let containsNonZero = Vector.exists Predicates.isSome clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int) -> + fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index dc4499e9..05e14f33 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -76,6 +76,4 @@ module SSSP = front1.Dispose queue front2.Dispose queue - match distance with - | ClVector.Dense dist -> dist - | _ -> failwith "not implemented" + distance diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index 54f8c64d..785f5258 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -71,6 +71,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index d66b15e5..8dc37dec 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -257,3 +257,16 @@ module ArithmeticOperations = <@ fun (x: 'a) (y: 'a) -> Some(min x y) @> let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @> + + //PageRank specific + let squareOfDifference = + <@ fun (x: float32 option) (y: float32 option) -> + let mutable res = 0.0f + + match x, y with + | Some f, Some s -> res <- (f - s) * (f - s) + | Some f, None -> res <- f * f + | None, Some s -> res <- s * s + | None, None -> () + + if res = 0.0f then None else Some res @> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index f02798d6..bbba4404 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -15,29 +15,30 @@ open GraphBLAS.FSharp.Backend.Vector [] module Vector = /// - /// Builds vector of given format with fixed size and fills it with the default values of desired type. + /// Builds vector of given format with fixed size and fills it with the given value. /// /// OpenCL context. /// Should be a power of 2 and greater than 1. - let zeroCreate (clContext: ClContext) workGroupSize = - let zeroCreate = - ClArray.zeroCreate clContext workGroupSize + let create (clContext: ClContext) workGroupSize = + let create = ClArray.create clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode size format -> + fun (processor: MailboxProcessor<_>) allocationMode size format value -> match format with - | Sparse -> - ClVector.Sparse - { Context = clContext - Indices = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, [| 0 |]) - Values = - clContext.CreateClArrayWithSpecificAllocationMode( - allocationMode, - [| Unchecked.defaultof<'a> |] - ) // TODO empty vector - Size = size } + | Sparse -> failwith "Attempting to create full sparse vector" | Dense -> ClVector.Dense - <| zeroCreate processor allocationMode size + <| create processor allocationMode size value + + /// + /// Builds vector of given format with fixed size and fills it with the default values of desired type. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let zeroCreate (clContext: ClContext) workGroupSize = + let create = create clContext workGroupSize + + fun (processor: MailboxProcessor<_>) allocationMode size format -> + create processor allocationMode size format None /// /// Builds vector of given format with fixed size and fills it with the values from the given list. diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index 205e1218..7a4c754d 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -60,7 +60,7 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = let createLevelsTest<'a> context queue testFun = testFun |> makeLevelsTest context queue - |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + |> testPropertyWithConfig config $"test on %A{typeof<'a>}, %A{context}" let levelsTestFixtures (testContext: TestContext) = [ let context = testContext.ClContext @@ -112,7 +112,7 @@ let makeParentsTest context queue bfs (matrix: int [,]) = let createParentsTest<'a> context queue testFun = testFun |> makeParentsTest context queue - |> testPropertyWithConfig config $"test on %A{typeof<'a>}" + |> testPropertyWithConfig config $"test on %A{typeof<'a>}, %A{context}" let parentsTestFixtures (testContext: TestContext) = [ let context = testContext.ClContext diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs new file mode 100644 index 00000000..72f30025 --- /dev/null +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -0,0 +1,118 @@ +module GraphBLAS.FSharp.Tests.Backend.Algorithms.PageRank + +open Expecto +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Tests.Context +open GraphBLAS.FSharp.Objects.ClVectorExtensions +open GraphBLAS.FSharp.Objects + +let private alpha = 0.85f +let private accuracy = 0.00001f + +let prepareNaive (matrix: float32 [,]) = + let result = Array2D.copy matrix + let rowCount = Array2D.length1 matrix + let outDegrees = Array.zeroCreate rowCount + + //Count degree + Array2D.iteri (fun r c v -> outDegrees.[r] <- outDegrees.[r] + (if v <> 0f then 1f else 0f)) matrix + + //Set value + Array2D.iteri + (fun r c v -> + result.[r, c] <- + if v <> 0f then + alpha / outDegrees.[r] + else + 0f) + matrix + + //Transpose + Array2D.iteri + (fun r c _ -> + if r > c then + let temp = result.[r, c] + result.[r, c] <- result.[c, r] + result.[c, r] <- temp) + matrix + + result + +let pageRankNaive (matrix: float32 [,]) = + let rowCount = Array2D.length1 matrix + let mutable result = Array.zeroCreate rowCount + + let mutable prev = + Array.create rowCount (1f / (float32 rowCount)) + + let mutable error = accuracy + 1f + let addConst = (1f - alpha) / (float32 rowCount) + + while (error > accuracy) do + for r in 0 .. rowCount - 1 do + result.[r] <- 0f + + for c in 0 .. rowCount - 1 do + result.[r] <- result.[r] + matrix.[r, c] * prev.[c] + + result.[r] <- result.[r] + addConst + + error <- + sqrt + <| Array.fold2 (fun e x1 x2 -> e + (x1 - x2) * (x1 - x2)) 0f result prev + + let temp = result + result <- prev + prev <- temp + + prev + +let testFixtures (testContext: TestContext) = + [ let config = Utils.undirectedAlgoConfig + let context = testContext.ClContext + let queue = testContext.Queue + let workGroupSize = Utils.defaultWorkGroupSize + + let testName = + sprintf "Test on %A" testContext.ClContext + + let pageRank = + Algorithms.PageRank.run context workGroupSize + + testPropertyWithConfig config testName + <| fun (matrix: float32 [,]) -> + let matrixHost = + Utils.createMatrixFromArray2D CSR matrix ((=) 0f) + + if matrixHost.NNZ > 0 then + let preparedMatrixExpected = prepareNaive matrix + + let expected = pageRankNaive preparedMatrixExpected + + let matrix = matrixHost.ToDevice context + + let preparedMatrix = + Algorithms.PageRank.prepareMatrix context workGroupSize queue matrix + + let res = pageRank queue preparedMatrix accuracy + + let resHost = res.ToHost queue + + preparedMatrix.Dispose queue + matrix.Dispose queue + res.Dispose queue + + match resHost with + | Vector.Dense resHost -> + let actual = resHost |> Utils.unwrapOptionArray 0f + + for i in 0 .. actual.Length - 1 do + Expect.isTrue + ((abs (actual.[i] - expected.[i])) < accuracy) + (sprintf "Values should be equal. Expected %A, actual %A" expected.[i] actual.[i]) + + | _ -> failwith "Not implemented" ] + +let tests = + TestCases.gpuTests "PageRank tests" testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index fa9cdff7..78feff8f 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -45,8 +45,7 @@ let testFixtures (testContext: TestContext) = let matrix = matrixHost.ToDevice context - let resDense = - ssspDense queue matrix source |> ClVector.Dense + let resDense = ssspDense queue matrix source let resHost = resDense.ToHost queue diff --git a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj index d4913a3d..78952059 100644 --- a/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj +++ b/tests/GraphBLAS-sharp.Tests/GraphBLAS-sharp.Tests.fsproj @@ -20,6 +20,7 @@ + diff --git a/tests/GraphBLAS-sharp.Tests/Program.fs b/tests/GraphBLAS-sharp.Tests/Program.fs index 837f2613..e2b1045b 100644 --- a/tests/GraphBLAS-sharp.Tests/Program.fs +++ b/tests/GraphBLAS-sharp.Tests/Program.fs @@ -94,7 +94,7 @@ let algorithmsTests = "Algorithms tests" [ Algorithms.BFS.tests Algorithms.SSSP.tests - Algorithms.PageRank.tests ] + Algorithms.PageRank.tests Algorithms.MSBFS.levelsTests Algorithms.MSBFS.parentsTests ] |> testSequenced From 1ed601cbc48e6a7edc6d71e3068b48bf18aeecee Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 10 Dec 2023 18:17:47 +0300 Subject: [PATCH 074/102] Fix ZeroCreate test --- .../Backend/Vector/ZeroCreate.fs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs index 79c1e4d9..ea738e61 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs @@ -38,16 +38,20 @@ let correctnessGenericTest<'a when 'a: struct and 'a: equality> let vectorSize = abs vectorSize if vectorSize > 0 then - let q = case.TestContext.Queue + try + let q = case.TestContext.Queue - let clVector = - zeroCreate q HostInterop vectorSize case.Format + let clVector = + zeroCreate q DeviceOnly vectorSize case.Format - let hostVector = clVector.ToHost q + let hostVector = clVector.ToHost q - clVector.Dispose q + clVector.Dispose q - checkResult vectorSize hostVector + checkResult vectorSize hostVector + with + | ex when ex.Message = "Attempting to create full sparse vector" -> () + | ex -> raise ex let createTest<'a> case = let getCorrectnessTestName dataType = From 858cd8290dfbcaa32161f94bf3ba682a0af1c9f7 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 17 Dec 2023 19:23:59 +0300 Subject: [PATCH 075/102] Constants for test --- .../Backend/Algorithms/PageRank.fs | 12 +++++++----- tests/GraphBLAS-sharp.Tests/Helpers.fs | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs index 72f30025..83b7d9af 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -7,8 +7,7 @@ open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects -let private alpha = 0.85f -let private accuracy = 0.00001f +let private accuracy = float32 Accuracy.low.absolute let prepareNaive (matrix: float32 [,]) = let result = Array2D.copy matrix @@ -23,7 +22,7 @@ let prepareNaive (matrix: float32 [,]) = (fun r c v -> result.[r, c] <- if v <> 0f then - alpha / outDegrees.[r] + Backend.Algorithms.PageRank.alpha / outDegrees.[r] else 0f) matrix @@ -47,7 +46,10 @@ let pageRankNaive (matrix: float32 [,]) = Array.create rowCount (1f / (float32 rowCount)) let mutable error = accuracy + 1f - let addConst = (1f - alpha) / (float32 rowCount) + + let addConst = + (1f - Backend.Algorithms.PageRank.alpha) + / (float32 rowCount) while (error > accuracy) do for r in 0 .. rowCount - 1 do @@ -109,7 +111,7 @@ let testFixtures (testContext: TestContext) = for i in 0 .. actual.Length - 1 do Expect.isTrue - ((abs (actual.[i] - expected.[i])) < accuracy) + (Utils.float32IsEqualLowAccuracy actual.[i] expected.[i]) (sprintf "Values should be equal. Expected %A, actual %A" expected.[i] actual.[i]) | _ -> failwith "Not implemented" ] diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index e9d2e86a..38ce1ff2 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -38,6 +38,10 @@ module Utils = float (abs (x - y)) < Accuracy.medium.absolute || x.Equals y + let inline float32IsEqualLowAccuracy x y = + float (abs (x - y)) < Accuracy.low.absolute + || x.Equals y + let vectorToDenseVector = function | Vector.Dense vector -> vector From 082656281c1397217916574ccfbf53899eeff778 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 17 Dec 2023 19:24:12 +0300 Subject: [PATCH 076/102] Docs for PageRank --- .../Algorithms/Algorithms.fs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index 180b72b6..18bb4dd1 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -21,6 +21,22 @@ module Algorithms = let run = SSSP.run module PageRank = + /// + /// Computes PageRank of the given matrix. + /// Matrix should be prepared in advance using "PageRank.prepareMatrix" method. + /// Accepts accuracy as a parameter which determines how many iterations will be performed. + /// Values of accuracy lower than 1e-06 are not recommended since the process may never stop. + /// + /// + /// + /// let preparedMatrix = PageRank.prepareMatrix clContext workGroupSize queue matrix + /// let accuracy = 1e-05 + /// let pageRank = PageRank.run clContext workGroupSize queue preparedMatrix accuracy + /// + /// let run = PageRank.run + /// + /// Converts matrix representing a graph to a format suitable for PageRank algorithm. + /// let prepareMatrix = PageRank.prepareMatrix From b82fe6887e01d3d0e22da5e87d31d16f29bd92c8 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 17 Dec 2023 19:30:22 +0300 Subject: [PATCH 077/102] Block after setup and cleanup in benchmarks --- benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs | 4 ++++ benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs | 2 ++ benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs | 2 ++ benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs | 2 ++ benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs | 4 ++++ benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 3 +++ 6 files changed, 17 insertions(+) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 773cece7..9cb5ab3d 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -113,10 +113,12 @@ type WithoutTransferBenchmark<'elem when 'elem : struct>( override this.GlobalSetup() = this.ReadMatrix() this.LoadMatrixToGPU() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.IterationCleanup() = this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = @@ -180,6 +182,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( [] override this.GlobalSetup() = this.ReadMatrix() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = @@ -189,6 +192,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( override this.IterationCleanup() = this.ClearInputMatrix() this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.Benchmark() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index 9e6a3f38..d60415b8 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -117,10 +117,12 @@ type PageRankWithoutTransferBenchmarkFloat32() = this.Processor.PostAndReply(Msg.MsgNotifyMe) this.PrepareMatrix() this.ClearInputMatrix() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.IterationCleanup() = this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index ab54db75..bcd04eb8 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -251,6 +251,7 @@ module WithTransfer = [] override this.GlobalSetup() = this.ReadMatrices() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = () @@ -259,6 +260,7 @@ module WithTransfer = override this.IterationCleanup() = this.ClearInputMatrices() this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.Benchmark() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index e8a75071..88e91cb6 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -115,6 +115,7 @@ module WithoutTransfer = override this.GlobalSetup() = this.ReadMatrices() this.LoadMatricesToGPU() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.Benchmark() = @@ -124,6 +125,7 @@ module WithoutTransfer = [] override this.IterationCleanup () = this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup () = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index ff0495bf..fcbd13f8 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -152,6 +152,7 @@ type MxmBenchmarksMultiplicationOnly<'elem when 'elem : struct>( this.ReadMatrices () this.LoadMatricesToGPU () this.ConvertSecondMatrixToCSC() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.Benchmark () = @@ -161,6 +162,7 @@ type MxmBenchmarksMultiplicationOnly<'elem when 'elem : struct>( [] override this.IterationCleanup () = this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup () = @@ -182,6 +184,7 @@ type MxmBenchmarksWithTransposing<'elem when 'elem : struct>( override this.GlobalSetup() = this.ReadMatrices() this.LoadMatricesToGPU () + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.Benchmark() = @@ -194,6 +197,7 @@ type MxmBenchmarksWithTransposing<'elem when 'elem : struct>( override this.IterationCleanup() = this.ClearResult() this.ConvertSecondMatrixToCSR() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index 5c4871e2..c3e566eb 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -115,6 +115,7 @@ module WithoutTransfer = override this.IterationCleanup() = this.ClearResult() this.ClearInputVectors() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = () @@ -159,6 +160,7 @@ module WithTransfer = [] override this.IterationSetup() = this.CreateVectors() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.Benchmark () = @@ -175,6 +177,7 @@ module WithTransfer = override this.IterationCleanup () = this.ClearInputVectors() this.ClearResult() + this.Processor.PostAndReply(Msg.MsgNotifyMe) [] override this.GlobalCleanup() = () From c8f3042193835133f67ced69052cc7907d6bc384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Fri, 22 Dec 2023 01:30:57 +0300 Subject: [PATCH 078/102] Constants module and signature for PageRank module --- .../Algorithms/PageRank.fs | 6 ++-- .../Algorithms/Algorithms.fs | 4 ++- .../Algorithms/PageRank.fs | 31 ++++++++++++----- .../Algorithms/PageRank.fsi | 13 ++++++++ src/GraphBLAS-sharp.Backend/Common/Utils.fs | 1 - .../Constants/Constants.fs | 18 ++++++++++ .../GraphBLAS-sharp.Backend.fsproj | 16 ++++----- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 33 ------------------- .../Backend/Algorithms/BFS.fs | 2 +- .../Backend/Algorithms/MSBFS.fs | 2 +- .../Backend/Algorithms/PageRank.fs | 19 ++++++----- .../Backend/Algorithms/SSSP.fs | 4 ++- .../Backend/Common/ClArray/Blit.fs | 2 +- .../Backend/Common/ClArray/Choose.fs | 4 +-- .../Backend/Common/ClArray/ChunkBySize.fs | 6 ++-- .../Backend/Common/ClArray/Concat.fs | 2 +- .../Backend/Common/ClArray/Copy.fs | 2 +- .../Backend/Common/ClArray/ExcludeElements.fs | 2 +- .../Backend/Common/ClArray/Exists.fs | 2 +- .../Backend/Common/ClArray/Fill.fs | 2 +- .../Backend/Common/ClArray/Item.fs | 2 +- .../Backend/Common/ClArray/Map.fs | 3 +- .../Backend/Common/ClArray/Map2.fs | 3 +- .../Backend/Common/ClArray/Pairwise.fs | 2 +- .../Backend/Common/ClArray/Replicate.fs | 2 +- .../Backend/Common/ClArray/Set.fs | 2 +- .../Backend/Common/ClArray/UpperBound.fs | 2 +- .../Backend/Common/Gather.fs | 4 +-- .../Backend/Common/Reduce/Reduce.fs | 2 +- .../Backend/Common/Reduce/ReduceByKey.fs | 16 ++++----- .../Backend/Common/Scan/ByKey.fs | 2 +- .../Backend/Common/Scatter.fs | 4 +-- .../Backend/Common/Sort/Bitonic.fs | 3 +- .../Backend/Common/Sort/Radix.fs | 3 +- .../Backend/Matrix/ByRows.fs | 2 +- .../Backend/Matrix/Convert.fs | 4 +-- .../Backend/Matrix/ExpandRows.fs | 2 +- .../Backend/Matrix/Intersect.fs | 2 +- .../Backend/Matrix/Kronecker.fs | 2 +- .../Backend/Matrix/Map.fs | 2 +- .../Backend/Matrix/Map2.fs | 2 +- .../Backend/Matrix/Merge.fs | 6 ++-- .../Backend/Matrix/RowsLengths.fs | 2 +- .../Backend/Matrix/SpGeMM/Expand.fs | 6 ++-- .../Backend/Matrix/SpGeMM/ExpandCOO.fs | 2 +- .../Backend/Matrix/SpGeMM/Masked.fs | 2 +- .../Backend/Matrix/SubRows.fs | 2 +- .../Backend/Matrix/Transpose.fs | 2 +- .../Backend/Vector/AssignByMask.fs | 2 +- .../Backend/Vector/Convert.fs | 2 +- .../Backend/Vector/Copy.fs | 2 +- .../Backend/Vector/Map.fs | 2 +- .../Backend/Vector/Map2.fs | 2 +- .../Backend/Vector/Merge.fs | 2 +- .../Backend/Vector/OfList.fs | 2 +- .../Backend/Vector/Reduce.fs | 2 +- .../Backend/Vector/SpMSpV.fs | 2 +- .../Backend/Vector/SpMV.fs | 2 +- .../Backend/Vector/ZeroCreate.fs | 2 +- tests/GraphBLAS-sharp.Tests/Helpers.fs | 1 - 60 files changed, 147 insertions(+), 135 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi create mode 100644 src/GraphBLAS-sharp.Backend/Constants/Constants.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index d60415b8..16cfacb5 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -23,11 +23,9 @@ type Benchmarks( let mutable funToBenchmark = None let mutable matrix = Unchecked.defaultof> - let mutable matrixPrepared = Unchecked.defaultof> + let mutable matrixPrepared = Unchecked.defaultof let mutable matrixHost = Unchecked.defaultof<_> - let accuracy = 0.00000001f - member val Result = Unchecked.defaultof> with get,set [] @@ -67,7 +65,7 @@ type Benchmarks( | Some x -> x member this.PageRank() = - this.Result <- this.FunToBenchmark this.Processor matrixPrepared accuracy + this.Result <- this.FunToBenchmark this.Processor matrixPrepared Constants.PageRank.accuracy member this.ClearInputMatrix() = matrix.Dispose this.Processor diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs index 18bb4dd1..66c49ccb 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/Algorithms.fs @@ -21,11 +21,13 @@ module Algorithms = let run = SSSP.run module PageRank = + type PageRankMatrix = PageRank.PageRankMatrix + /// /// Computes PageRank of the given matrix. /// Matrix should be prepared in advance using "PageRank.prepareMatrix" method. /// Accepts accuracy as a parameter which determines how many iterations will be performed. - /// Values of accuracy lower than 1e-06 are not recommended since the process may never stop. + /// Values of accuracy higher than 1e-06 are not recommended since the process may never stop. /// /// /// diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index d089d945..b82e08b5 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -11,8 +11,13 @@ open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions -module internal PageRank = - let alpha = 0.85f +module PageRank = + type PageRankMatrix = + | PreparedMatrix of ClMatrix + + member this.Dispose(processor: MailboxProcessor) = + match this with + | PreparedMatrix matrix -> matrix.Dispose processor let private countOutDegree (clContext: ClContext) workGroupSize = @@ -40,10 +45,10 @@ module internal PageRank = outDegree - let prepareMatrix (clContext: ClContext) workGroupSize = + let internal prepareMatrix (clContext: ClContext) workGroupSize = //Passing global variable to kernel in Brahma is not possible - let alpha = alpha + let alpha = Constants.PageRank.alpha let op = <@ fun (x: float32 option) y -> @@ -131,10 +136,10 @@ module internal PageRank = transposeInPlace queue DeviceOnly newMatrix |> ClMatrix.CSR - |> PageRankMatrix + |> PreparedMatrix | _ -> failwith "Not implemented" - let run (clContext: ClContext) workGroupSize = + let internal run (clContext: ClContext) workGroupSize = let squareOfDifference = ArithmeticOperations.squareOfDifference let plus = ArithmeticOperations.float32SumOption @@ -155,7 +160,7 @@ module internal PageRank = let create = GraphBLAS.FSharp.Vector.create clContext workGroupSize - fun (queue: MailboxProcessor) (PageRankMatrix matrix) accuracy -> + fun (queue: MailboxProcessor) (PreparedMatrix matrix) accuracy -> let vertexCount = matrix.RowCount //None is 0 @@ -169,7 +174,15 @@ module internal PageRank = create queue DeviceOnly vertexCount Dense None let addition = - create queue DeviceOnly vertexCount Dense (Some((1.0f - alpha) / (float32 vertexCount))) + create + queue + DeviceOnly + vertexCount + Dense + (Some( + (1.0f - Constants.PageRank.alpha) + / (float32 vertexCount) + )) let mutable error = accuracy + 0.1f @@ -178,7 +191,7 @@ module internal PageRank = while error > accuracy do i <- i + 1 - // rank = matrix*rank + (1 - alpha)/N + // rank = matrix*rank + (1 - ALPHA)/N spMVTo queue matrix prevRank rank addToResult queue rank addition diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi new file mode 100644 index 00000000..230cd28d --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi @@ -0,0 +1,13 @@ +namespace GraphBLAS.FSharp.Backend.Algorithms + +open Brahma.FSharp +open GraphBLAS.FSharp.Objects + +module PageRank = + [] + type PageRankMatrix = + member Dispose : MailboxProcessor -> unit + + val internal prepareMatrix : ClContext -> int -> (MailboxProcessor -> ClMatrix -> PageRankMatrix) + + val internal run : ClContext -> int -> (MailboxProcessor -> PageRankMatrix -> float32 -> ClVector) diff --git a/src/GraphBLAS-sharp.Backend/Common/Utils.fs b/src/GraphBLAS-sharp.Backend/Common/Utils.fs index 0e4ac564..3ef10555 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Utils.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Utils.fs @@ -1,7 +1,6 @@ namespace GraphBLAS.FSharp.Backend.Common module internal Utils = - let defaultWorkGroupSize = 32 let floorToPower2 = fun x -> x ||| (x >>> 1) diff --git a/src/GraphBLAS-sharp.Backend/Constants/Constants.fs b/src/GraphBLAS-sharp.Backend/Constants/Constants.fs new file mode 100644 index 00000000..5609de06 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Constants/Constants.fs @@ -0,0 +1,18 @@ +namespace GraphBLAS.FSharp + +[] +module Constants = + module PageRank = + /// + /// PageRank algorithms will finish then + /// difference of current and previous vectors + /// is less than accuracy + /// + let accuracy = 1e-6f + /// + /// Damping factor for PageRank algorithm + /// + let alpha = 0.85f + + module Common = + let defaultWorkGroupSize = 32 diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index 785f5258..c2e1e085 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -1,4 +1,4 @@ - + @@ -11,6 +11,7 @@ + @@ -18,7 +19,6 @@ - @@ -28,7 +28,6 @@ - @@ -39,9 +38,7 @@ - - @@ -61,19 +58,18 @@ - + - + - - + + - diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 86dd7976..766925aa 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -181,36 +181,3 @@ type ClMatrix<'a when 'a: struct> = | ClMatrix.COO matrix -> matrix.NNZ | ClMatrix.CSC matrix -> matrix.NNZ | ClMatrix.LIL matrix -> matrix.NNZ - -/// -/// Represents an abstraction over matrix, which is converted to correct format for PageRank algorithm -/// -type PageRankMatrix<'a when 'a: struct> = - | PageRankMatrix of ClMatrix<'a> - /// - /// Gets the number of rows in matrix. - /// - member this.RowCount = - match this with - | PageRankMatrix matrix -> matrix.RowCount - - /// - /// Gets the number of columns in matrix. - /// - member this.ColumnCount = - match this with - | PageRankMatrix matrix -> matrix.ColumnCount - - /// - /// Release device resources allocated for the matrix. - /// - member this.Dispose q = - match this with - | PageRankMatrix matrix -> matrix.Dispose q - - /// - /// Gets the number of non-zero elements in matrix. - /// - member this.NNZ = - match this with - | PageRankMatrix matrix -> matrix.NNZ diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index 1b6561b4..2a0453a8 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -14,7 +14,7 @@ let testFixtures (testContext: TestContext) = [ let config = Utils.undirectedAlgoConfig let context = testContext.ClContext let queue = testContext.Queue - let workGroupSize = Utils.defaultWorkGroupSize + let workGroupSize = Constants.Common.defaultWorkGroupSize let testName = sprintf "Test on %A" testContext.ClContext diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index 7a4c754d..3adad360 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -12,7 +12,7 @@ open GraphBLAS.FSharp.Objects.MatrixExtensions let config = Utils.undirectedAlgoConfig -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let makeLevelsTest context queue bfs (matrix: int [,]) = let graph = undirectedFromArray2D matrix 0 diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs index 83b7d9af..ebd3eab6 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -1,4 +1,4 @@ -module GraphBLAS.FSharp.Tests.Backend.Algorithms.PageRank +module GraphBLAS.FSharp.Tests.Backend.Algorithms.PageRank open Expecto open GraphBLAS.FSharp @@ -7,8 +7,6 @@ open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects -let private accuracy = float32 Accuracy.low.absolute - let prepareNaive (matrix: float32 [,]) = let result = Array2D.copy matrix let rowCount = Array2D.length1 matrix @@ -22,7 +20,7 @@ let prepareNaive (matrix: float32 [,]) = (fun r c v -> result.[r, c] <- if v <> 0f then - Backend.Algorithms.PageRank.alpha / outDegrees.[r] + Constants.PageRank.alpha / outDegrees.[r] else 0f) matrix @@ -45,13 +43,13 @@ let pageRankNaive (matrix: float32 [,]) = let mutable prev = Array.create rowCount (1f / (float32 rowCount)) - let mutable error = accuracy + 1f + let mutable error = Constants.PageRank.accuracy + 1f let addConst = - (1f - Backend.Algorithms.PageRank.alpha) + (1f - Constants.PageRank.alpha) / (float32 rowCount) - while (error > accuracy) do + while (error > Constants.PageRank.accuracy) do for r in 0 .. rowCount - 1 do result.[r] <- 0f @@ -74,7 +72,9 @@ let testFixtures (testContext: TestContext) = [ let config = Utils.undirectedAlgoConfig let context = testContext.ClContext let queue = testContext.Queue - let workGroupSize = Utils.defaultWorkGroupSize + + let workGroupSize = + GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize let testName = sprintf "Test on %A" testContext.ClContext @@ -97,7 +97,8 @@ let testFixtures (testContext: TestContext) = let preparedMatrix = Algorithms.PageRank.prepareMatrix context workGroupSize queue matrix - let res = pageRank queue preparedMatrix accuracy + let res = + pageRank queue preparedMatrix Constants.PageRank.accuracy let resHost = res.ToHost queue diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index 78feff8f..3cffbd7d 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -15,7 +15,9 @@ let testFixtures (testContext: TestContext) = [ let config = Utils.undirectedAlgoConfig let context = testContext.ClContext let queue = testContext.Queue - let workGroupSize = Utils.defaultWorkGroupSize + + let workGroupSize = + GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize let testName = sprintf "Test on %A" testContext.ClContext diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs index 8387bdcc..55df7a4a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs @@ -34,7 +34,7 @@ let makeTest<'a> isEqual testFun (source: 'a [], sourceIndex, target: 'a [], tar |> Utils.compareArrays isEqual actual target let createTest<'a when 'a: equality> isEqual = - ClArray.blit context Utils.defaultWorkGroupSize + ClArray.blit context Constants.Common.defaultWorkGroupSize |> makeTest<'a> isEqual |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs index 3fd89e84..4797b6fb 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs @@ -9,7 +9,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let config = Utils.defaultConfig @@ -80,7 +80,7 @@ let makeTest2 testContext isEqual opMap testFun (firstArray: 'a [], secondArray: |> Utils.compareArrays isEqual actual expected let createTest2 testsContext (isEqual: 'a -> 'a -> bool) (opMapQ, opMap) testFun = - testFun opMapQ testsContext.ClContext Utils.defaultWorkGroupSize + testFun opMapQ testsContext.ClContext Constants.Common.defaultWorkGroupSize |> makeTest2 testsContext isEqual opMap |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs index 2cc3133e..513984c4 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs @@ -32,7 +32,7 @@ let makeTestGetChunk<'a when 'a: equality> testFun (array: 'a [], startPosition, |> Expect.sequenceEqual actual (Array.sub array startPosition count) let creatTestSub<'a when 'a: equality> = - ClArray.sub context Utils.defaultWorkGroupSize + ClArray.sub context Constants.Common.defaultWorkGroupSize |> makeTestGetChunk<'a> |> testPropertyWithConfig config $"test on %A{typeof<'a>}" @@ -72,7 +72,7 @@ let chunkBySizeConfig = arbitrary = [ typeof ] } let creatTestChunkBySize<'a when 'a: equality> isEqual = - ClArray.chunkBySize context Utils.defaultWorkGroupSize + ClArray.chunkBySize context Constants.Common.defaultWorkGroupSize |> makeTestChunkBySize<'a> isEqual |> testPropertyWithConfig chunkBySizeConfig $"test on %A{typeof<'a>}" @@ -89,7 +89,7 @@ let chunkBySizeTests = let creatTestChunkBySizeLazy<'a when 'a: equality> isEqual = (fun processor allocationMode chunkSize array -> - ClArray.lazyChunkBySize context Utils.defaultWorkGroupSize processor allocationMode chunkSize array + ClArray.lazyChunkBySize context Constants.Common.defaultWorkGroupSize processor allocationMode chunkSize array |> Seq.map (fun lazyValue -> lazyValue.Value) |> Seq.toArray) |> makeTestChunkBySize<'a> isEqual diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs index 48dcb77c..1d704e0c 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs @@ -35,7 +35,7 @@ let makeTest<'a> isEqual testFun (arrays: 'a [] []) = |> Utils.compareArrays isEqual actual expected let createTest<'a> isEqual = - ClArray.concat context Utils.defaultWorkGroupSize + ClArray.concat context Constants.Common.defaultWorkGroupSize |> makeTest<'a> isEqual |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs index c36475a0..cd8f4a59 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs @@ -13,7 +13,7 @@ let logger = Log.create "ClArray.Copy.Tests" let context = Context.defaultContext.ClContext -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let q = Context.defaultContext.Queue diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs index 335cd665..33a94b92 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs @@ -48,7 +48,7 @@ let makeTest<'a> isEqual (zero: 'a) testFun ((array, bitmap): 'a array * int arr |> Expect.isEmpty expected let createTest<'a> (zero: 'a) isEqual = - ClArray.excludeElements context Utils.defaultWorkGroupSize + ClArray.excludeElements context Constants.Common.defaultWorkGroupSize |> makeTest<'a> isEqual zero |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Exists.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Exists.fs index ac991951..80c735da 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Exists.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Exists.fs @@ -19,7 +19,7 @@ let q = defaultContext.Queue let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let correctnessGenericTest<'a when 'a: struct and 'a: equality> isZero exists (array: 'a []) = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Fill.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Fill.fs index 8a285a2f..7ec14be2 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Fill.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Fill.fs @@ -33,7 +33,7 @@ let makeTest<'a> isEqual testFun (value: 'a, targetPosition, count, target: 'a [ |> Utils.compareArrays isEqual actual target let createTest<'a> isEqual = - ClArray.fill context Utils.defaultWorkGroupSize + ClArray.fill context Constants.Common.defaultWorkGroupSize |> makeTest<'a> isEqual |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs index a3786832..00e21cde 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs @@ -33,7 +33,7 @@ let makeTest<'a when 'a: equality> testFun (array: 'a [], position) = |> Expect.equal actual expected let createTest<'a when 'a: equality> = - ClArray.item context Utils.defaultWorkGroupSize + ClArray.item context Constants.Common.defaultWorkGroupSize |> makeTest<'a> |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs index b87816ba..2689de09 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs @@ -10,7 +10,8 @@ open GraphBLAS.FSharp.Objects.ClContextExtensions let context = defaultContext.Queue -let wgSize = Utils.defaultWorkGroupSize +let wgSize = + GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize let config = Utils.defaultConfig diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs index 69b28dad..a291858e 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs @@ -10,7 +10,8 @@ open GraphBLAS.FSharp.Objects.ClContextExtensions let context = defaultContext.Queue -let wgSize = Utils.defaultWorkGroupSize +let wgSize = + GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize let config = Utils.defaultConfig diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Pairwise.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Pairwise.fs index 12db7aa8..00a8daa2 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Pairwise.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Pairwise.fs @@ -34,7 +34,7 @@ let makeTest<'a> isEqual testFun (array: 'a []) = |> Expect.isTrue (array.Size <= 1) let createTest<'a> isEqual = - ClArray.pairwise context Utils.defaultWorkGroupSize + ClArray.pairwise context Constants.Common.defaultWorkGroupSize |> makeTest<'a> isEqual |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs index 2d6ecc6b..dd698189 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs @@ -15,7 +15,7 @@ let context = Context.defaultContext.ClContext let q = Context.defaultContext.Queue -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let config = Utils.defaultConfig diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Set.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Set.fs index cf1d09e5..c5a76404 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Set.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Set.fs @@ -30,7 +30,7 @@ let makeTest<'a when 'a: equality> testFun (array: 'a [], position, value: 'a) = |> Utils.compareArrays (=) actual array let createTest<'a when 'a: equality> = - ClArray.set context Utils.defaultWorkGroupSize + ClArray.set context Constants.Common.defaultWorkGroupSize |> makeTest<'a> |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/UpperBound.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/UpperBound.fs index 7f1f2c81..492e98b6 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/UpperBound.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/UpperBound.fs @@ -45,7 +45,7 @@ let makeTest testFun (array: 'a [], value: 'a) = |> Expect.equal actual expected let createTest<'a when 'a: equality and 'a: comparison> = - ClArray.upperBound<'a> context Utils.defaultWorkGroupSize + ClArray.upperBound<'a> context Constants.Common.defaultWorkGroupSize |> makeTest |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs index b82b65d6..094d8f44 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs @@ -49,7 +49,7 @@ let makeTest isEqual testFun (array: (uint * 'a * 'a) []) = let createTest<'a> (isEqual: 'a -> 'a -> bool) testFun = let testFun = - testFun context Utils.defaultWorkGroupSize + testFun context Constants.Common.defaultWorkGroupSize makeTest isEqual testFun |> testPropertyWithConfig Utils.defaultConfig $"test on %A{typeof<'a>}" @@ -90,7 +90,7 @@ let makeTestInit isEqual testFun indexMap (array: ('a * 'a) []) = let createTestInit<'a> (isEqual: 'a -> 'a -> bool) testFun indexMapQ indexMap = let testFun = - testFun indexMapQ context Utils.defaultWorkGroupSize + testFun indexMapQ context Constants.Common.defaultWorkGroupSize makeTestInit isEqual testFun indexMap |> testPropertyWithConfig Utils.defaultConfig $"test on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs index 54dfee30..439d24f6 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs @@ -15,7 +15,7 @@ let context = Context.defaultContext.ClContext let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let q = Context.defaultContext.Queue diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs index 1ff419ef..16a5f46b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs @@ -63,7 +63,7 @@ let makeTest isEqual reduce reduceOp (arrayAndKeys: (int * 'a) []) = let createTestSequential<'a> (isEqual: 'a -> 'a -> bool) reduceOp reduceOpQ = let reduce = - Common.Reduce.ByKey.sequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.sequential reduceOpQ context Constants.Common.defaultWorkGroupSize makeTest isEqual reduce reduceOp |> testPropertyWithConfig config $"test on {typeof<'a>}" @@ -97,12 +97,12 @@ let sequentialTest = let createTestOneWorkGroup<'a> (isEqual: 'a -> 'a -> bool) reduceOp reduceOpQ = let reduce = - Common.Reduce.ByKey.oneWorkGroupSegments reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.oneWorkGroupSegments reduceOpQ context Constants.Common.defaultWorkGroupSize makeTest isEqual reduce reduceOp |> testPropertyWithConfig { config with - endSize = Utils.defaultWorkGroupSize } + endSize = Constants.Common.defaultWorkGroupSize } $"test on {typeof<'a>}" let oneWorkGroupTest = @@ -166,7 +166,7 @@ let makeTestSequentialSegments isEqual reduce reduceOp (valuesAndKeys: (int * 'a let createTestSequentialSegments<'a> (isEqual: 'a -> 'a -> bool) reduceOp reduceOpQ = let reduce = - Common.Reduce.ByKey.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.segmentSequential reduceOpQ context Constants.Common.defaultWorkGroupSize makeTestSequentialSegments isEqual reduce reduceOp |> testPropertyWithConfig { config with startSize = 1000 } $"test on {typeof<'a>}" @@ -252,7 +252,7 @@ let makeTest2D isEqual reduce reduceOp (array: (int * int * 'a) []) = let createTestSequential2D<'a> (isEqual: 'a -> 'a -> bool) reduceOp reduceOpQ = let reduce = - Common.Reduce.ByKey2D.sequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey2D.sequential reduceOpQ context Constants.Common.defaultWorkGroupSize makeTest2D isEqual reduce reduceOp |> testPropertyWithConfig @@ -331,7 +331,7 @@ let makeTestSequentialSegments2D isEqual reduce reduceOp (array: (int * int * 'a let createTestSequentialSegments2D<'a> (isEqual: 'a -> 'a -> bool) reduceOp reduceOpQ = let reduce = - Common.Reduce.ByKey2D.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey2D.segmentSequential reduceOpQ context Constants.Common.defaultWorkGroupSize makeTestSequentialSegments2D isEqual reduce reduceOp |> testPropertyWithConfig @@ -430,7 +430,7 @@ let testOption<'a> isEqual reduceOp testFun (array: (int * 'a) []) = |> checkResultOption isEqual keys values reduceOp let createTestOption (isEqual: 'a -> 'a -> bool) (reduceOpQ, reduceOp) = - Common.Reduce.ByKey.Option.segmentSequentialByOffsets reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey.Option.segmentSequentialByOffsets reduceOpQ context Constants.Common.defaultWorkGroupSize |> testOption<'a> isEqual reduceOp |> testPropertyWithConfig { config with @@ -518,7 +518,7 @@ let test2DOption<'a> isEqual reduceOp reduce (array: (int * int * 'a) []) = |> checkResult2DOption isEqual firstKeys secondKeys values reduceOp let createTest2DOption (isEqual: 'a -> 'a -> bool) (reduceOpQ, reduceOp) = - Common.Reduce.ByKey2D.Option.segmentSequential reduceOpQ context Utils.defaultWorkGroupSize + Common.Reduce.ByKey2D.Option.segmentSequential reduceOpQ context Constants.Common.defaultWorkGroupSize |> test2DOption<'a> isEqual reduceOp |> testPropertyWithConfig { config with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs index 1cea79dd..d48efa75 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs @@ -53,7 +53,7 @@ let createTest (zero: 'a) opAddQ opAdd isEqual deviceScan hostScan = let hostScan = hostScan zero opAdd let deviceScan = - deviceScan opAddQ zero context Utils.defaultWorkGroupSize + deviceScan opAddQ zero context Constants.Common.defaultWorkGroupSize makeTestSequentialSegments isEqual hostScan deviceScan |> testPropertyWithConfig Utils.defaultConfig $"test on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs index c1d71dca..4923ed6f 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs @@ -15,7 +15,7 @@ let context = defaultContext.ClContext let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let q = defaultContext.Queue @@ -89,7 +89,7 @@ let makeTestInit<'a when 'a: equality> hostScatter valueMap scatter (positions: let createInitTest clScatter hostScatter name valuesMap valuesMapQ = let scatter = - clScatter valuesMapQ context Utils.defaultWorkGroupSize + clScatter valuesMapQ context Constants.Common.defaultWorkGroupSize makeTestInit<'a> hostScatter valuesMap scatter |> testPropertyWithConfig config name diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs index 6297fe13..d76053a8 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs @@ -17,7 +17,8 @@ module Bitonic = { Utils.defaultConfig with endSize = 1000000 } - let wgSize = Utils.defaultWorkGroupSize + let wgSize = + GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize let q = defaultContext.Queue diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs index 44206379..13f4e9fb 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Radix.fs @@ -10,7 +10,8 @@ let config = { Utils.defaultConfig with startSize = 1000000 } -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = + GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize let processor = Context.defaultContext.Queue diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ByRows.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ByRows.fs index caa86e58..8635f07e 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ByRows.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ByRows.fs @@ -45,7 +45,7 @@ let makeTest<'a when 'a: struct> isEqual zero testFun (array: 'a [,]) = |> Expect.isFalse (Array.exists ((<<) not <| isEqual zero) array.[index, *])) let createTest isEqual (zero: 'a) = - CSR.Matrix.byRows context Utils.defaultWorkGroupSize + CSR.Matrix.byRows context Constants.Common.defaultWorkGroupSize |> makeTest<'a> isEqual zero |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs index 8e88e216..537a66d8 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs @@ -15,7 +15,7 @@ let logger = Log.create "Convert.Tests" let config = Utils.defaultConfig -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let context = defaultContext.ClContext @@ -55,7 +55,7 @@ let makeTest context q formatFrom formatTo convertFun isZero (array: 'a [,]) = let createTest<'a when 'a: struct and 'a: equality> convertFun formatTo (isZero: 'a -> bool) = let convertFun = - convertFun context Utils.defaultWorkGroupSize + convertFun context Constants.Common.defaultWorkGroupSize Utils.listOfUnionCases |> List.map diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ExpandRows.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ExpandRows.fs index 63cd8bee..a85d0e46 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ExpandRows.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/ExpandRows.fs @@ -34,7 +34,7 @@ let makeTest isZero testFun (array: 'a [,]) = |> Expect.sequenceEqual actual expected let createTest (isZero: 'a -> bool) = - CSR.Matrix.expandRowPointers context Utils.defaultWorkGroupSize + CSR.Matrix.expandRowPointers context GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize |> makeTest isZero |> testPropertyWithConfig config $"test on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs index 15760ada..d1137e1b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs @@ -14,7 +14,7 @@ let config = { Utils.defaultConfig with arbitrary = [ typeof ] } -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let context = defaultContext.ClContext let processor = defaultContext.Queue diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs index 6d0f8d01..94470fc3 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs @@ -17,7 +17,7 @@ let config = let logger = Log.create "kronecker.Tests" -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let makeTest testContext zero isEqual op kroneckerFun (leftMatrix: 'a [,], rightMatrix: 'a [,]) = let context = testContext.ClContext diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs index e61d65bf..d84811a1 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs @@ -17,7 +17,7 @@ open GraphBLAS.FSharp.Objects.MatrixExtensions let logger = Log.create "Map.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let getCorrectnessTestName case datatype = $"Correctness on %s{datatype}, %A{case}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs index 9d746f11..112e230c 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs @@ -17,7 +17,7 @@ open GraphBLAS.FSharp.Objects.ClContextExtensions let logger = Log.create "Map2.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let getCorrectTestName case datatype = $"Correctness on %s{datatype}, %A{case}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs index af7a2700..c491034e 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs @@ -96,7 +96,7 @@ let makeTestCOO isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = checkResult isEqual zero actual leftArray rightArray let createTestCOO isEqual (zero: 'a) = - Matrix.COO.Merge.run context Utils.defaultWorkGroupSize + Matrix.COO.Merge.run context GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize |> makeTestCOO isEqual zero |> testPropertyWithConfig config $"test on {typeof<'a>}" @@ -150,7 +150,7 @@ let createTestCOODisjoint isEqual (zero: 'a) = { Utils.defaultConfig with arbitrary = [ typeof ] } - Matrix.COO.Merge.runDisjoint context Utils.defaultWorkGroupSize + Matrix.COO.Merge.runDisjoint context GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize |> makeTestCOODisjoint isEqual zero |> testPropertyWithConfig configDisjoint $"test on {typeof<'a>}" @@ -214,7 +214,7 @@ let makeTestCSR isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = checkResult isEqual zero actual leftArray rightArray let createTestCSR isEqual (zero: 'a) = - Matrix.CSR.Merge.run context Utils.defaultWorkGroupSize + Matrix.CSR.Merge.run context GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize |> makeTestCSR isEqual zero |> testPropertyWithConfig config $"test on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs index f690ca3e..5b75cdd0 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs @@ -50,7 +50,7 @@ let makeTest isZero testFun (array: 'a [,]) = |> Utils.compareArrays (=) actual expected let createTest<'a when 'a: struct> (isZero: 'a -> bool) = - CSR.Matrix.NNZInRows context Utils.defaultWorkGroupSize + CSR.Matrix.NNZInRows context GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize |> makeTest isZero |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs index 46b1d204..2daf91fd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs @@ -62,7 +62,7 @@ let makeTest isZero testFun (leftArray: 'a [,], rightArray: 'a [,]) = |> Expect.sequenceEqual actualPointers expectedPointers let createTest<'a when 'a: struct> (isZero: 'a -> bool) = - Expand.getSegmentPointers context Utils.defaultWorkGroupSize + Expand.getSegmentPointers context Constants.Common.defaultWorkGroupSize |> makeTest isZero |> testPropertyWithConfig config $"test on {typeof<'a>}" @@ -161,7 +161,7 @@ let makeExpandTest isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) |> Utils.compareArrays (=) actualRows expectedRows let createExpandTest isEqual (zero: 'a) testFun = - testFun context Utils.defaultWorkGroupSize + testFun context Constants.Common.defaultWorkGroupSize |> makeExpandTest isEqual zero |> testPropertyWithConfig config $"test on %A{typeof<'a>}" @@ -208,7 +208,7 @@ let makeGeneralTest zero isEqual opAdd opMul testFun (leftArray: 'a [,], rightAr |> Expect.isTrue (expected.NNZ = 0) let createGeneralTest (zero: 'a) isEqual (opAddQ, opAdd) (opMulQ, opMul) testFun = - testFun opAddQ opMulQ context Utils.defaultWorkGroupSize + testFun opAddQ opMulQ context Constants.Common.defaultWorkGroupSize |> makeGeneralTest zero isEqual opAdd opMul |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs index 43787eac..916c97a9 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs @@ -49,7 +49,7 @@ let makeGeneralTest zero isEqual opAdd opMul testFun (leftArray: 'a [,], rightAr |> Expect.isTrue (expected.NNZ = 0) let createGeneralTest (zero: 'a) isEqual (opAddQ, opAdd) (opMulQ, opMul) testFun = - testFun opAddQ opMulQ context Utils.defaultWorkGroupSize + testFun opAddQ opMulQ context Constants.Common.defaultWorkGroupSize |> makeGeneralTest zero isEqual opAdd opMul |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs index 18cc44c4..e5a1e826 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs @@ -12,7 +12,7 @@ open GraphBLAS.FSharp.Tests.Context let logger = Log.create "SpGeMM.Masked.Tests" let context = defaultContext.ClContext -let workGroupSize = Utils.defaultWorkGroupSize +let workGroupSize = Constants.Common.defaultWorkGroupSize let makeTest context q zero isEqual plus mul mxmFun (leftMatrix: 'a [,], rightMatrix: 'a [,], mask: bool [,]) = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SubRows.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SubRows.fs index 9a9ae54c..38898186 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SubRows.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SubRows.fs @@ -51,7 +51,7 @@ let makeTest isEqual zero testFun (array: 'a [,], sourceRow, count) = Utils.compareCOOMatrix isEqual actual expected let createTest isEqual (zero: 'a) = - CSR.Matrix.subRows context Utils.defaultWorkGroupSize + CSR.Matrix.subRows context GraphBLAS.FSharp.Constants.Common.defaultWorkGroupSize |> makeTest isEqual zero |> testPropertyWithConfig config $"test on {typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs index e7308335..d6b9cfe9 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs @@ -14,7 +14,7 @@ let logger = Log.create "Transpose.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let getCorrectnessTestName case datatype = $"Correctness on %s{datatype}, %A{case.Format}, %A{case.TestContext}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs index 3c0fb675..5d40ca00 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs @@ -16,7 +16,7 @@ let logger = Log.create "Vector.assignByMask.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let getCorrectnessTestName case datatype = $"Correctness on %s{datatype}, vector: %A{case.Format}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs index d184bc47..ac9073f9 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs @@ -16,7 +16,7 @@ let logger = let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let makeTest formatFrom diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs index a83a1f3f..3910ddcd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs @@ -14,7 +14,7 @@ let logger = Log.create "Vector.copy.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let checkResult (isEqual: 'a -> 'a -> bool) (actual: Vector<'a>) (expected: Vector<'a>) = Expect.equal actual.Size expected.Size "The size should be the same" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs index c3cfeab7..25fed6a3 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs @@ -18,7 +18,7 @@ open Mono.CompilerServices.SymbolWriter let logger = Log.create "Vector.Map.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let getCorrectnessTestName case datatype = $"Correctness on %s{datatype}, %A{case}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs index 771798c7..0ef5a5dc 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs @@ -15,7 +15,7 @@ let logger = Log.create "Vector.ElementWise.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let getCorrectnessTestName<'a> (case: OperationCase<'a>) dataType = $"Correctness on '{dataType} option -> '{dataType} option -> '{dataType} option, {case.Format}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs index ae363e78..a1afec05 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs @@ -76,7 +76,7 @@ let makeTest isEqual zero testFun (firstArray: 'a []) (secondArray: 'a []) = |> Utils.compareArrays (=) actualIndices expectedIndices let createTest<'a when 'a: struct> isEqual (zero: 'a) = - Vector.Sparse.Merge.run context Utils.defaultWorkGroupSize + Vector.Sparse.Merge.run context Constants.Common.defaultWorkGroupSize |> makeTest isEqual zero |> testPropertyWithConfig config $"test on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs index 9623073f..436aba91 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs @@ -15,7 +15,7 @@ let logger = Log.create "Vector.ofList.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let checkResult (isEqual: 'a -> 'a -> bool) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs index 7775d541..00e157bf 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs @@ -11,7 +11,7 @@ open GraphBLAS.FSharp.Objects.ClCellExtensions let logger = Log.create "Vector.reduce.Tests" -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let config = Utils.defaultConfig diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index c554b25e..f4195db7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -13,7 +13,7 @@ open GraphBLAS.FSharp.Objects let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let checkResult sumOp diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index 45ab8054..b4688fa4 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -15,7 +15,7 @@ open GraphBLAS.FSharp.Backend.Quotes let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let checkResult isEqual sumOp mulOp zero (baseMtx: 'a [,]) (baseVtr: 'a []) (actual: 'a option []) = let rows = Array2D.length1 baseMtx diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs index ea738e61..cccfa3d7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs @@ -15,7 +15,7 @@ let logger = Log.create "Vector.zeroCreate.Tests" let config = Utils.defaultConfig -let wgSize = Utils.defaultWorkGroupSize +let wgSize = Constants.Common.defaultWorkGroupSize let checkResult size (actual: Vector<'a>) = Expect.equal actual.Size size "The size should be the same" diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index 38ce1ff2..947287bc 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -11,7 +11,6 @@ open OpenCL.Net [] module Utils = - let defaultWorkGroupSize = 32 let defaultConfig = { FsCheckConfig.defaultConfig with From 0ab7361197e4acb2cfc2ed0b71484cb4d4d0619b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Fri, 22 Dec 2023 23:12:48 +0300 Subject: [PATCH 079/102] MailboxProcessor extensions --- .../GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs | 9 +++++---- .../Algorithms/PageRank.fs | 9 +++++---- .../GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs | 9 +++++---- .../Matrix/SpGeMM/Expand.fs | 7 ++++--- .../Matrix/SpGeMM/Masked.fs | 13 +++++++------ .../GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 7 ++++--- .../GraphBLAS-sharp.Backend.fsproj | 3 ++- .../Objects/ArraysExtentions.fs | 3 ++- .../Objects/MailboxProcessorExtensions.fs | 6 ++++++ src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 7 ++++--- 10 files changed, 44 insertions(+), 29 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index 9cb5ab3d..c8b6c21c 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -9,6 +9,7 @@ open GraphBLAS.FSharp.IO open GraphBLAS.FSharp.Benchmarks open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Backend.Quotes [] @@ -113,12 +114,12 @@ type WithoutTransferBenchmark<'elem when 'elem : struct>( override this.GlobalSetup() = this.ReadMatrix() this.LoadMatrixToGPU() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.IterationCleanup() = this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = @@ -182,7 +183,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( [] override this.GlobalSetup() = this.ReadMatrix() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = @@ -192,7 +193,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( override this.IterationCleanup() = this.ClearInputMatrix() this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index 16cfacb5..c00c5f70 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -7,6 +7,7 @@ open GraphBLAS.FSharp.IO open Brahma.FSharp open Microsoft.FSharp.Core open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Benchmarks open GraphBLAS.FSharp.Objects @@ -112,15 +113,15 @@ type PageRankWithoutTransferBenchmarkFloat32() = override this.GlobalSetup() = this.ReadMatrix() this.LoadMatrixToGPU() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor this.PrepareMatrix() this.ClearInputMatrix() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.IterationCleanup() = this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = @@ -129,4 +130,4 @@ type PageRankWithoutTransferBenchmarkFloat32() = [] override this.Benchmark() = this.PageRank() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index bcd04eb8..190369f5 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.IO open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.MatrixExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Benchmarks @@ -118,12 +119,12 @@ module WithoutTransfer = override this.GlobalSetup() = this.ReadMatrices () this.LoadMatricesToGPU () - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark () = this.EWiseAddition() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.IterationCleanup () = @@ -251,7 +252,7 @@ module WithTransfer = [] override this.GlobalSetup() = this.ReadMatrices() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = () @@ -260,7 +261,7 @@ module WithTransfer = override this.IterationCleanup() = this.ClearInputMatrices() this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index 88e91cb6..d379739c 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.IO open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Benchmarks [] @@ -115,17 +116,17 @@ module WithoutTransfer = override this.GlobalSetup() = this.ReadMatrices() this.LoadMatricesToGPU() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark() = this.Mxm() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.IterationCleanup () = this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup () = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index fcbd13f8..18ff0b22 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -8,6 +8,7 @@ open Brahma.FSharp open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Benchmarks [] @@ -152,17 +153,17 @@ type MxmBenchmarksMultiplicationOnly<'elem when 'elem : struct>( this.ReadMatrices () this.LoadMatricesToGPU () this.ConvertSecondMatrixToCSC() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark () = this.Mxm() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.IterationCleanup () = this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup () = @@ -184,20 +185,20 @@ type MxmBenchmarksWithTransposing<'elem when 'elem : struct>( override this.GlobalSetup() = this.ReadMatrices() this.LoadMatricesToGPU () - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark() = this.ConvertSecondMatrixToCSC() this.Mxm() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.IterationCleanup() = this.ClearResult() this.ConvertSecondMatrixToCSR() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index c3e566eb..9d78980b 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -10,6 +10,7 @@ open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions [] [] @@ -115,7 +116,7 @@ module WithoutTransfer = override this.IterationCleanup() = this.ClearResult() this.ClearInputVectors() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = () @@ -160,7 +161,7 @@ module WithTransfer = [] override this.IterationSetup() = this.CreateVectors() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.Benchmark () = @@ -177,7 +178,7 @@ module WithTransfer = override this.IterationCleanup () = this.ClearInputVectors() this.ClearResult() - this.Processor.PostAndReply(Msg.MsgNotifyMe) + finish this.Processor [] override this.GlobalCleanup() = () diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index c2e1e085..cac6456d 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -1,4 +1,4 @@ - + @@ -13,6 +13,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs b/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs index 5f5da3ae..c4176b66 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs @@ -1,12 +1,13 @@ namespace GraphBLAS.FSharp.Objects open Brahma.FSharp +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions module ArraysExtensions = type ClArray<'a> with member this.FreeAndWait(q: MailboxProcessor) = q.Post(Msg.CreateFreeMsg this) - q.PostAndReply(Msg.MsgNotifyMe) + finish q member this.ToHost(q: MailboxProcessor) = let dst = Array.zeroCreate this.Length diff --git a/src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs b/src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs new file mode 100644 index 00000000..fb56045c --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs @@ -0,0 +1,6 @@ +namespace GraphBLAS.FSharp.Objects + +open Brahma.FSharp + +module MailboxProcessorExtensions = + let finish (q: MailboxProcessor) = q.PostAndReply(Msg.MsgNotifyMe) diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 766925aa..901cb6c3 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -2,6 +2,7 @@ namespace GraphBLAS.FSharp.Objects open Brahma.FSharp open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions type MatrixFormat = | CSR @@ -49,7 +50,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Rows)) q.Post(Msg.CreateFreeMsg<_>(this.ColumnPointers)) - q.PostAndReply(Msg.MsgNotifyMe) + finish q member this.Dispose q = (this :> IDeviceMemObject).Dispose q @@ -76,7 +77,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Columns)) q.Post(Msg.CreateFreeMsg<_>(this.Rows)) - q.PostAndReply(Msg.MsgNotifyMe) + finish q member this.Dispose q = (this :> IDeviceMemObject).Dispose q @@ -114,7 +115,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.RowIndices)) q.Post(Msg.CreateFreeMsg<_>(this.ColumnIndices)) q.Post(Msg.CreateFreeMsg<_>(this.Values)) - q.PostAndReply(Msg.MsgNotifyMe) + finish q member this.Dispose q = (this :> IDeviceMemObject).Dispose q From 97b6db49639c5acc23566a5818c74f91e17281c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Fri, 22 Dec 2023 23:18:28 +0300 Subject: [PATCH 080/102] Module qualifiers --- src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs | 1 + src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi | 1 + src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index b82e08b5..fadd389e 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -11,6 +11,7 @@ open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions +[] module PageRank = type PageRankMatrix = | PreparedMatrix of ClMatrix diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi index 230cd28d..290f6a1f 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi @@ -3,6 +3,7 @@ namespace GraphBLAS.FSharp.Backend.Algorithms open Brahma.FSharp open GraphBLAS.FSharp.Objects +[] module PageRank = [] type PageRankMatrix = diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 05e14f33..489a796c 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -7,7 +7,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions -module SSSP = +module internal SSSP = let run (clContext: ClContext) workGroupSize = let less = ArithmeticOperations.less From f671a2e89ff4efedcf5aa620e3e56dbc86c6e6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 23 Dec 2023 21:20:02 +0300 Subject: [PATCH 081/102] Add pagerank link --- src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index fadd389e..eecff073 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -140,6 +140,7 @@ module PageRank = |> PreparedMatrix | _ -> failwith "Not implemented" + // PageRank algorithm explanation: pi.math.cornell.edu/~mec/Winter2009/RalucaRemus/Lecture3/lecture3 let internal run (clContext: ClContext) workGroupSize = let squareOfDifference = ArithmeticOperations.squareOfDifference From 6de410fcb81971567724d4b58cf22d79b542256f Mon Sep 17 00:00:00 2001 From: Kirill <71129570+kirillgarbar@users.noreply.github.com> Date: Sat, 24 Feb 2024 11:07:11 +0300 Subject: [PATCH 082/102] Restart CI attempt --- benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index c8b6c21c..c34492dc 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -13,8 +13,8 @@ open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Backend.Quotes [] -[] -[] +[] +[] [)>] type Benchmarks<'elem when 'elem : struct>( buildFunToBenchmark, From d82b6ac54071effdc82e43370422bf6b1049fc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Mon, 25 Mar 2024 01:19:36 +0300 Subject: [PATCH 083/102] New scan --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 10 +- src/GraphBLAS-sharp.Backend/Common/Common.fs | 19 +- .../Common/PrefixSum.fs | 3 +- src/GraphBLAS-sharp.Backend/Common/Scan.fs | 270 ++++++++++++++++++ .../Common/Sort/Radix.fs | 4 +- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 6 +- .../GraphBLAS-sharp.Backend.fsproj | 1 + .../Operations/SpMSpV.fs | 2 +- .../Backend/Common/Scan/PrefixSum.fs | 55 ++-- 9 files changed, 329 insertions(+), 41 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Common/Scan.fs diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index ad6b3caf..260a3728 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -202,7 +202,7 @@ module ClArray = Bitmap.lastOccurrence clContext workGroupSize let prefixSumExclude = - PrefixSum.runExcludeInPlace <@ (+) @> clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) -> @@ -210,7 +210,7 @@ module ClArray = getUniqueBitmap processor DeviceOnly inputArray let resultLength = - (prefixSumExclude processor bitmap 0) + (prefixSumExclude processor bitmap) .ToHostAndFree(processor) let outputArray = @@ -314,7 +314,7 @@ module ClArray = Map.map<'a, int> (Map.chooseBitmap predicate) clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let assignValues = assignOption predicate clContext workGroupSize @@ -410,7 +410,7 @@ module ClArray = Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let assignValues = assignOption2 predicate clContext workGroupSize @@ -878,7 +878,7 @@ module ClArray = mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let scatter = Scatter.lastOccurrence clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index ae9839f2..bd99652c 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -211,7 +211,7 @@ module Common = /// Should be a power of 2 and greater than 1. /// Associative binary operation. /// Zero element for binary operation. - let runExcludeInPlace plus = PrefixSum.runExcludeInPlace plus + let runExcludeInPlace plus = ScanInternal.runExcludeInPlace plus /// /// Include in-place prefix sum. @@ -231,7 +231,8 @@ module Common = /// ClContext. /// Should be a power of 2 and greater than 1. /// Zero element for binary operation. - let runIncludeInPlace plus = PrefixSum.runIncludeInPlace plus + let runIncludeInPlace plus = + PrefixSumInternal.runIncludeInPlace plus /// /// Exclude in-place prefix sum. Array is scanned starting from the end. @@ -241,7 +242,7 @@ module Common = /// Should be a power of 2 and greater than 1. /// Zero element for binary operation. let runBackwardsExcludeInPlace plus = - PrefixSum.runBackwardsExcludeInPlace plus + PrefixSumInternal.runBackwardsExcludeInPlace plus /// /// Include in-place prefix sum. Array is scanned starting from the end. @@ -251,7 +252,7 @@ module Common = /// Should be a power of 2 and greater than 1. /// Zero element for binary operation. let runBackwardsIncludeInPlace plus = - PrefixSum.runBackwardsIncludeInPlace plus + PrefixSumInternal.runBackwardsIncludeInPlace plus /// /// Exclude in-place prefix sum of integer array with addition operation and start value that is equal to 0. @@ -267,7 +268,7 @@ module Common = /// > val sum = [| 4 |] /// /// - let standardExcludeInPlace = PrefixSum.standardExcludeInPlace + let standardExcludeInPlace = ScanInternal.standardExcludeInPlace /// /// Include in-place prefix sum of integer array with addition operation and start value that is equal to 0. @@ -285,7 +286,7 @@ module Common = /// /// ClContext. /// Should be a power of 2 and greater than 1. - let standardIncludeInPlace = PrefixSum.standardIncludeInPlace + let standardIncludeInPlace = PrefixSumInternal.standardIncludeInPlace module ByKey = /// @@ -299,7 +300,8 @@ module Common = /// > val result = [| 0; 0; 1; 2; 0; 1 |] /// /// - let sequentialExclude op = PrefixSum.ByKey.sequentialExclude op + let sequentialExclude op = + PrefixSumInternal.ByKey.sequentialExclude op /// /// Include scan by key. @@ -312,7 +314,8 @@ module Common = /// > val result = [| 1; 1; 2; 3; 1; 2 |] /// /// - let sequentialInclude op = PrefixSum.ByKey.sequentialInclude op + let sequentialInclude op = + PrefixSumInternal.ByKey.sequentialInclude op module Reduce = /// diff --git a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs index a56af91f..1b4a745d 100644 --- a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs @@ -6,7 +6,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions -module PrefixSum = +module internal PrefixSumInternal = let private update (opAdd: Expr<'a -> 'a -> 'a>) (clContext: ClContext) workGroupSize = let update = @@ -209,6 +209,7 @@ module PrefixSum = let runBackwardsIncludeInPlace plus = runInPlace plus true scanInclusive /// + /// This method is deprecated due to bad perfomance. /// Exclude in-place prefix sum of integer array with addition operation and start value that is equal to 0. /// /// diff --git a/src/GraphBLAS-sharp.Backend/Common/Scan.fs b/src/GraphBLAS-sharp.Backend/Common/Scan.fs new file mode 100644 index 00000000..636d89c1 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Common/Scan.fs @@ -0,0 +1,270 @@ +namespace GraphBLAS.FSharp.Backend.Common + +open Brahma.FSharp +open FSharp.Quotations +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions + +module internal ScanInternal = + + let private preScan + (opAdd: Expr<'a -> 'a -> 'a>) + (zero: 'a) + (saveSum: bool) + (clContext: ClContext) + (workGroupSize: int) + = + + let blockSize = + min clContext.ClDevice.MaxWorkGroupSize 256 + + let valuesPerBlock = 2 * blockSize + let numberOfMemBanks = 32 + + let localArraySize = + valuesPerBlock + + (valuesPerBlock / numberOfMemBanks) + + let getIndex = + <@ fun index -> index + (index / numberOfMemBanks) @> + + let preScan = + <@ fun (ndRange: Range1D) (valuesLength: int) (valuesBuffer: ClArray<'a>) (carryBuffer: ClArray<'a>) (totalSumCell: ClCell<'a>) -> + let gid = ndRange.GlobalID0 / blockSize + let lid = ndRange.LocalID0 + let gstart = gid * blockSize * 2 + + let sumValues = localArray<'a> localArraySize + + //Load values + if (gstart + lid + blockSize * 0) < valuesLength then + sumValues.[(%getIndex) (lid + blockSize * 0)] <- valuesBuffer.[gstart + lid + blockSize * 0] + else + sumValues.[(%getIndex) (lid + blockSize * 0)] <- zero + + + if (gstart + lid + blockSize * 1) < valuesLength then + sumValues.[(%getIndex) (lid + blockSize * 1)] <- valuesBuffer.[gstart + lid + blockSize * 1] + else + sumValues.[(%getIndex) (lid + blockSize * 1)] <- zero + + //Sweep up + let mutable offset = 1 + let mutable d = blockSize + + while d > 0 do + barrierLocal () + + if lid < d then + let ai = (%getIndex) (offset * (2 * lid + 1) - 1) + let bi = (%getIndex) (offset * (2 * lid + 2) - 1) + sumValues.[bi] <- (%opAdd) sumValues.[bi] sumValues.[ai] + + offset <- offset * 2 + d <- d / 2 + + barrierLocal () + + if lid = 0 then + let ai = (%getIndex) (2 * blockSize - 1) + carryBuffer.[gid] <- sumValues.[ai] + sumValues.[ai] <- zero + + // This condition means this thread will rewrite last element in array + // Saving it here for totalSum + if saveSum + && (gstart + lid + blockSize * 1 = valuesLength - 1 + || gstart + lid + blockSize * 0 = valuesLength - 1) then + totalSumCell.Value <- valuesBuffer.[valuesLength - 1] + + //Sweep down + d <- 1 + + while d <= blockSize do + barrierLocal () + + offset <- offset / 2 + + if lid < d then + let ai = (%getIndex) (offset * (2 * lid + 1) - 1) + let bi = (%getIndex) (offset * (2 * lid + 2) - 1) + + let tmp = sumValues.[ai] + sumValues.[ai] <- sumValues.[bi] + sumValues.[bi] <- (%opAdd) sumValues.[bi] tmp + + d <- d * 2 + + barrierLocal () + + if (gstart + lid + blockSize * 0) < valuesLength then + valuesBuffer.[gstart + lid + blockSize * 0] <- sumValues.[(%getIndex) (lid + blockSize * 0)] + + if (gstart + lid + blockSize * 1) < valuesLength then + valuesBuffer.[gstart + lid + blockSize * 1] <- sumValues.[(%getIndex) (lid + blockSize * 1)] @> + + let preScan = clContext.Compile(preScan) + + fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) (totalSum: ClCell<'a>) -> + let numberOfGroups = + inputArray.Length / valuesPerBlock + + (if inputArray.Length % valuesPerBlock = 0 then + 0 + else + 1) + + let carry = + clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, numberOfGroups) + + let ndRangePreScan = + Range1D.CreateValid(numberOfGroups * blockSize, blockSize) + + let preScanKernel = preScan.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> preScanKernel.KernelFunc ndRangePreScan inputArray.Length inputArray carry totalSum) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(preScanKernel)) + + carry, numberOfGroups > 1 + + let private scan (opAdd: Expr<'a -> 'a -> 'a>) (saveSum: bool) (clContext: ClContext) (workGroupSize: int) = + + let blockSize = + min clContext.ClDevice.MaxWorkGroupSize 256 + + let valuesPerBlock = 2 * blockSize + + let scan = + <@ fun (ndRange: Range1D) (valuesLength: int) (valuesBuffer: ClArray<'a>) (carryBuffer: ClArray<'a>) (totalSumCell: ClCell<'a>) -> + let gid = ndRange.GlobalID0 + 2 * blockSize + let cid = gid / (2 * blockSize) + + if gid < valuesLength then + valuesBuffer.[gid] <- (%opAdd) valuesBuffer.[gid] carryBuffer.[cid] + + if saveSum && gid = valuesLength - 1 then + totalSumCell.Value <- (%opAdd) totalSumCell.Value valuesBuffer.[gid] @> + + let scan = clContext.Compile(scan) + + fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) (carry: ClArray<'a>) (totalSum: ClCell<'a>) -> + let numberOfGroups = + inputArray.Length / valuesPerBlock + + (if inputArray.Length % valuesPerBlock = 0 then + 0 + else + 1) + + let ndRangeScan = + Range1D.CreateValid((numberOfGroups - 1) * valuesPerBlock, blockSize) + + let scan = scan.GetKernel() + + processor.Post( + Msg.MsgSetArguments(fun () -> scan.KernelFunc ndRangeScan inputArray.Length inputArray carry totalSum) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(scan)) + + let runExcludeInPlace plus zero (clContext: ClContext) workGroupSize = + + let blockSize = + min clContext.ClDevice.MaxWorkGroupSize 256 + + let valuesPerBlock = 2 * blockSize + + let getTotalSum = + <@ fun (ndRange: Range1D) (valuesLength: int) (valuesBuffer: ClArray<'a>) (totalSumCell: ClCell<'a>) -> + totalSumCell.Value <- (%plus) valuesBuffer.[valuesLength - 1] totalSumCell.Value @> + + let preScanSaveSum = + preScan plus zero true clContext workGroupSize + + let preScan = + preScan plus zero false clContext workGroupSize + + let scanSaveSum = scan plus true clContext workGroupSize + let scan = scan plus false clContext workGroupSize + let getTotalSum = clContext.Compile(getTotalSum) + + fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) -> + + let totalSum = clContext.CreateClCell<'a>() + + let carry, needRecursion = + preScanSaveSum processor inputArray totalSum + + if not needRecursion then + carry.Free processor + + let ndRangeTotalSum = Range1D.CreateValid(1, 1) + let getTotalSum = getTotalSum.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> getTotalSum.KernelFunc ndRangeTotalSum inputArray.Length inputArray totalSum) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(getTotalSum)) + else + let mutable carryStack = [ carry; inputArray ] + let mutable stop = not needRecursion + + // Run preScan for carry until we get fully scanned carry + // If during preScan numberOfGroups = 1 means input is fully scanned + while not stop do + let input = carryStack.Head + let carry, needRecursion = preScan processor input totalSum + + if needRecursion then + carryStack <- carry :: carryStack + else + stop <- true + carry.Free processor + + stop <- false + + // Run scan for each not fully scanned carry until we get inputArray scanned + while not stop do + match carryStack with + | carry :: inputCarry :: tail -> + if tail.IsEmpty then + scanSaveSum processor inputCarry carry totalSum + stop <- true + else + scan processor inputCarry carry totalSum + + carry.Free processor + carryStack <- carryStack.Tail + | _ -> failwith "carryStack always has at least 2 elements" + + totalSum + + /// + /// Exclude in-place prefix sum of integer array with addition operation and start value that is equal to 0. + /// + /// + /// + /// let arr = [| 1; 1; 1; 1 |] + /// let sum = [| 0 |] + /// runExcludeInplace clContext workGroupSize processor arr sum (+) 0 + /// |> ignore + /// ... + /// > val arr = [| 0; 1; 2; 3 |] + /// > val sum = [| 4 |] + /// + /// + /// ClContext. + /// Should be a power of 2 and greater than 1. + /// Note that maximum possible workGroupSize is used for better perfomance + let standardExcludeInPlace (clContext: ClContext) workGroupSize = + + let scan = + runExcludeInPlace <@ (+) @> 0 clContext workGroupSize + + fun (processor: MailboxProcessor<_>) (inputArray: ClArray) -> + + scan processor inputArray diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index b7db92d0..4645c7c9 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -156,7 +156,7 @@ module internal Radix = let count = count clContext workGroupSize mask let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + PrefixSumInternal.standardExcludeInPlace clContext workGroupSize let scatter = scatter clContext workGroupSize mask @@ -259,7 +259,7 @@ module internal Radix = let count = count clContext workGroupSize mask let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + PrefixSumInternal.standardExcludeInPlace clContext workGroupSize let scatterByKey = scatterByKey clContext workGroupSize mask diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 94a745c2..51241f1d 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -529,7 +529,7 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + PrefixSumInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> @@ -661,7 +661,7 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + PrefixSumInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> @@ -940,7 +940,7 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + PrefixSumInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index cac6456d..4300c9ec 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -32,6 +32,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs index bca119a1..f60dd89d 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -65,7 +65,7 @@ module SpMSpV = inputArray.[i] <- 0 @> let sum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + PrefixSumInternal.standardExcludeInPlace clContext workGroupSize let prepareOffsets = clContext.Compile prepareOffsets diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs index f94b0564..3773eefd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs @@ -13,33 +13,51 @@ let logger = Log.create "ClArray.PrefixSum.Tests" let context = defaultContext.ClContext -let config = Tests.Utils.defaultConfig +let config = + { Tests.Utils.defaultConfig with + maxTest = 20 + startSize = 1 + endSize = 1000000 } let wgSize = 128 let q = defaultContext.Queue -let makeTest plus zero isEqual scan (array: 'a []) = +let makeTest plus zero isEqual scanInclude scanExclude (array: 'a []) = if array.Length > 0 then + // Exclude + let actual, actualSum = + let clArray = context.CreateClArray array + let (total: ClCell<_>) = scanExclude q clArray + + let actual = clArray.ToHostAndFree q + let actualSum = total.ToHostAndFree q - logger.debug ( - eventX $"Array is %A{array}\n" - >> setField "array" (sprintf "%A" array) - ) + actual, actualSum + let expected, expectedSum = + array + |> Array.mapFold + (fun s t -> + let a = plus s t + s, a) + zero + + "Arrays for exclude should be the same" + |> Tests.Utils.compareArrays isEqual actual expected + + "Total sums for exclude should be equal" + |> Expect.equal actualSum expectedSum + + // Include let actual, actualSum = let clArray = context.CreateClArray array - let (total: ClCell<_>) = scan q clArray zero + let (total: ClCell<_>) = scanInclude q clArray zero let actual = clArray.ToHostAndFree q let actualSum = total.ToHostAndFree q actual, actualSum - logger.debug ( - eventX "Actual is {actual}\n" - >> setField "actual" (sprintf "%A" actual) - ) - let expected, expectedSum = array |> Array.mapFold @@ -48,20 +66,15 @@ let makeTest plus zero isEqual scan (array: 'a []) = a, a) zero - logger.debug ( - eventX "Expected is {expected}\n" - >> setField "expected" (sprintf "%A" expected) - ) - - "Total sums should be equal" + "Total sums for include should be equal" |> Expect.equal actualSum expectedSum - "Arrays should be the same" + "Arrays for include should be the same" |> Tests.Utils.compareArrays isEqual actual expected let testFixtures plus plusQ zero isEqual name = - Common.PrefixSum.runIncludeInPlace plusQ context wgSize - |> makeTest plus zero isEqual + (PrefixSum.runIncludeInPlace plusQ context wgSize, PrefixSum.runExcludeInPlace plusQ zero context wgSize) + ||> makeTest plus zero isEqual |> testPropertyWithConfig config $"Correctness on %s{name}" let tests = From b37dfe2e9044bbe8eda71247df105d18b2a3f0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Mon, 25 Mar 2024 01:38:06 +0300 Subject: [PATCH 084/102] Disable windows build docs --- .github/workflows/build-docs.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 2e06ec69..2201457a 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -6,27 +6,6 @@ on: workflow_dispatch: jobs: - win-build: - name: Windows Build Docs - runs-on: windows-latest - defaults: - run: - shell: cmd - steps: - - name: System Info - run: systeminfo - - - uses: actions/checkout@v3 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Build - run: ./build.cmd BuildDocs - env: - CI: true - linux-build: name: Linux Build Docs runs-on: ubuntu-latest From 7852c2d24d9c42f86648fb8b5919a9dd3e26218d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sun, 24 Mar 2024 22:00:43 +0300 Subject: [PATCH 085/102] Reworked bitonic sort --- src/GraphBLAS-sharp.Backend/Common/Common.fs | 3 +- .../Common/Sort/Bitonic.fs | 418 ++++++++---------- .../Quotes/Arithmetic.fs | 9 + .../Backend/Common/Sort/Bitonic.fs | 41 +- 4 files changed, 225 insertions(+), 246 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index ae9839f2..afa9f871 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -24,8 +24,7 @@ module Common = /// > val values = [| 1.9; 2.8; 6.4; 5.5; 4.6; 3.7; 7.3 |] /// /// - let sortKeyValuesInplace<'n, 'a when 'n: comparison> = - Sort.Bitonic.sortKeyValuesInplace<'n, 'a> + let sortKeyValuesInplace<'a> = Sort.Bitonic.sortKeyValuesInplace<'a> module Radix = /// diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs index f51e94ce..5aba906b 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs @@ -1,317 +1,255 @@ namespace GraphBLAS.FSharp.Backend.Common.Sort open Brahma.FSharp -open GraphBLAS.FSharp.Backend.Common +open GraphBLAS.FSharp.Backend module Bitonic = - let private localBegin (clContext: ClContext) workGroupSize = - let processedSize = workGroupSize * 2 + let sortKeyValuesInplace<'a> (clContext: ClContext) (workGroupSize: int) = - let localBegin = - <@ fun (range: Range1D) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) (length: int) -> + let localSize = + Common.Utils.floorToPower2 ( + int (clContext.ClDevice.LocalMemSize) + / (sizeof + sizeof<'a>) + ) + + let maxThreadsPerBlock = + min (clContext.ClDevice.MaxWorkGroupSize) (localSize / 2) - let lid = range.LocalID0 - let gid = range.GlobalID0 + let waveSize = 32 + let maxWorkGroupSize = clContext.ClDevice.MaxWorkGroupSize + + let localStep = + <@ fun (ndRange: Range1D) (rows: ClArray) (cols: ClArray) (vals: ClArray<'a>) (length: int) -> + let gid = ndRange.GlobalID0 + let lid = ndRange.LocalID0 + let workGroupSize = ndRange.LocalWorkSize let groupId = gid / workGroupSize - // 1 рабочая группа обрабатывает 2 * workGroupSize элементов - let localRows = localArray<'n> processedSize - let localCols = localArray<'n> processedSize - let localValues = localArray<'a> processedSize + let offset = groupId * localSize + let border = min (offset + localSize) length + let n = border - offset - let mutable readIdx = processedSize * groupId + lid - let mutable localLength = local () - localLength <- processedSize + let nAligned = + (%Quotes.ArithmeticOperations.ceilToPowerOfTwo) n - // копируем элементы из глобальной памяти в локальную - if readIdx < length then - localRows.[lid] <- rows.[readIdx] - localCols.[lid] <- cols.[readIdx] - localValues.[lid] <- values.[readIdx] + let numberOfThreads = nAligned / 2 - if readIdx = length then - localLength <- lid + let sortedKeys = localArray localSize + let sortedVals = localArray<'a> localSize - readIdx <- readIdx + workGroupSize + let mutable i = lid - if readIdx < length then - localRows.[lid + workGroupSize] <- rows.[readIdx] - localCols.[lid + workGroupSize] <- cols.[readIdx] - localValues.[lid + workGroupSize] <- values.[readIdx] + while i + offset < border do + let key: uint64 = + ((uint64 rows.[i + offset]) <<< 32) + ||| (uint64 cols.[i + offset]) - if readIdx = length then - localLength <- lid + workGroupSize + sortedKeys.[i] <- key + sortedVals.[i] <- vals.[i + offset] + i <- i + workGroupSize barrierLocal () - let mutable segmentLength = 1 - - while segmentLength < processedSize do - segmentLength <- segmentLength <<< 1 - let localLineId = lid % (segmentLength >>> 1) - let localTwinId = segmentLength - localLineId - 1 - let groupLineId = lid / (segmentLength >>> 1) + let mutable segmentSize = 2 - let lineId = - segmentLength * groupLineId + localLineId + while segmentSize <= nAligned do + let segmentSizeHalf = segmentSize / 2 - let twinId = - segmentLength * groupLineId + localTwinId + let mutable tid = lid - if twinId < localLength - && (localRows.[lineId] > localRows.[twinId] - || localRows.[lineId] = localRows.[twinId] - && localCols.[lineId] > localCols.[twinId]) then - let tmpRow = localRows.[lineId] - localRows.[lineId] <- localRows.[twinId] - localRows.[twinId] <- tmpRow + while tid < numberOfThreads do + let segmentId = tid / segmentSizeHalf + let innerId = tid % segmentSizeHalf + let innerIdSibling = segmentSize - innerId - 1 + let i = segmentId * segmentSize + innerId + let j = segmentId * segmentSize + innerIdSibling - let tmpCol = localCols.[lineId] - localCols.[lineId] <- localCols.[twinId] - localCols.[twinId] <- tmpCol + if (i < n && j < n && sortedKeys.[i] > sortedKeys.[j]) then + let tempK = sortedKeys.[i] + sortedKeys.[i] <- sortedKeys.[j] + sortedKeys.[j] <- tempK + let tempV = sortedVals.[i] + sortedVals.[i] <- sortedVals.[j] + sortedVals.[j] <- tempV - let tmpValue = localValues.[lineId] - localValues.[lineId] <- localValues.[twinId] - localValues.[twinId] <- tmpValue + tid <- tid + workGroupSize barrierLocal () - let mutable j = segmentLength >>> 1 - - while j > 1 do - let localLineId = lid % (j >>> 1) - let localTwinId = localLineId + (j >>> 1) - let groupLineId = lid / (j >>> 1) - let lineId = j * groupLineId + localLineId - let twinId = j * groupLineId + localTwinId - - if twinId < localLength - && (localRows.[lineId] > localRows.[twinId] - || localRows.[lineId] = localRows.[twinId] - && localCols.[lineId] > localCols.[twinId]) then - let tmpRow = localRows.[lineId] - localRows.[lineId] <- localRows.[twinId] - localRows.[twinId] <- tmpRow - - let tmpCol = localCols.[lineId] - localCols.[lineId] <- localCols.[twinId] - localCols.[twinId] <- tmpCol - - let tmpValue = localValues.[lineId] - localValues.[lineId] <- localValues.[twinId] - localValues.[twinId] <- tmpValue + let mutable k = segmentSizeHalf / 2 - barrierLocal () - - j <- j >>> 1 - - let mutable writeIdx = processedSize * groupId + lid - - if writeIdx < length then - rows.[writeIdx] <- localRows.[lid] - cols.[writeIdx] <- localCols.[lid] - values.[writeIdx] <- localValues.[lid] + while k > 0 do - writeIdx <- writeIdx + workGroupSize + let mutable tid = lid - if writeIdx < length then - rows.[writeIdx] <- localRows.[lid + workGroupSize] - cols.[writeIdx] <- localCols.[lid + workGroupSize] - values.[writeIdx] <- localValues.[lid + workGroupSize] @> + while tid < numberOfThreads do + let segmentSizeInner = k * 2 + let segmentId = tid / k + let innerId = tid % k + let innerIdSibling = innerId + k + let i = segmentId * segmentSizeInner + innerId - let program = clContext.Compile(localBegin) + let j = + segmentId * segmentSizeInner + innerIdSibling - fun (queue: MailboxProcessor<_>) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) -> + if (i < n && j < n && sortedKeys.[i] > sortedKeys.[j]) then + let tempK = sortedKeys.[i] + sortedKeys.[i] <- sortedKeys.[j] + sortedKeys.[j] <- tempK + let tempV = sortedVals.[i] + sortedVals.[i] <- sortedVals.[j] + sortedVals.[j] <- tempV - let ndRange = - Range1D.CreateValid(Utils.floorToPower2 values.Length, workGroupSize) + tid <- tid + workGroupSize - let kernel = program.GetKernel() + k <- k / 2 + barrierLocal () - queue.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange rows cols values values.Length)) - queue.Post(Msg.CreateRunMsg<_, _>(kernel)) + segmentSize <- segmentSize * 2 + let mutable i = lid - let private globalStep (clContext: ClContext) workGroupSize = + while i + offset < border do + let key = sortedKeys.[i] + rows.[i + offset] <- int (key >>> 32) + cols.[i + offset] <- int key + vals.[i + offset] <- sortedVals.[i] + i <- i + workGroupSize @> let globalStep = - <@ fun (range: Range1D) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) (length: int) (segmentLength: int) (mirror: ClCell) -> - - let mirror = mirror.Value - - let gid = range.GlobalID0 - - let localLineId = gid % (segmentLength >>> 1) - let mutable localTwinId = 0 + <@ fun (ndRange: Range1D) (rows: ClArray) (cols: ClArray) (vals: ClArray<'a>) (length: int) (segmentStart: int) -> + let lid = ndRange.LocalID0 + let workGroupSize = ndRange.LocalWorkSize - if mirror then - localTwinId <- segmentLength - localLineId - 1 - else - localTwinId <- localLineId + (segmentLength >>> 1) + let n = length - let groupLineId = gid / (segmentLength >>> 1) + let nAligned = + (%Quotes.ArithmeticOperations.ceilToPowerOfTwo) n - let lineId = - segmentLength * groupLineId + localLineId + let numberOfThreads = nAligned / 2 - let twinId = - segmentLength * groupLineId + localTwinId + let mutable segmentSize = segmentStart - if twinId < length - && (rows.[lineId] > rows.[twinId] - || rows.[lineId] = rows.[twinId] - && cols.[lineId] > cols.[twinId]) then - let tmpRow = rows.[lineId] - rows.[lineId] <- rows.[twinId] - rows.[twinId] <- tmpRow + while segmentSize <= nAligned do + let segmentSizeHalf = segmentSize / 2 - let tmpCol = cols.[lineId] - cols.[lineId] <- cols.[twinId] - cols.[twinId] <- tmpCol + let mutable tid = lid - let tmpV = values.[lineId] - values.[lineId] <- values.[twinId] - values.[twinId] <- tmpV @> + while tid < numberOfThreads do + let segmentId = tid / segmentSizeHalf + let innerId = tid % segmentSizeHalf + let innerIdSibling = segmentSize - innerId - 1 + let i = segmentId * segmentSize + innerId + let j = segmentId * segmentSize + innerIdSibling - let program = clContext.Compile(globalStep) + if (i < n && j < n) then + let keyI = + ((uint64 rows.[i]) <<< 32) ||| (uint64 cols.[i]) - fun (queue: MailboxProcessor<_>) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) (segmentLength: int) (mirror: bool) -> + let keyJ = + ((uint64 rows.[j]) <<< 32) ||| (uint64 cols.[j]) - let ndRange = - Range1D.CreateValid(Utils.floorToPower2 values.Length, workGroupSize) + if (keyI > keyJ) then + let tempR = rows.[i] + rows.[i] <- rows.[j] + rows.[j] <- tempR + let tempC = cols.[i] + cols.[i] <- cols.[j] + cols.[j] <- tempC + let tempV = vals.[i] + vals.[i] <- vals.[j] + vals.[j] <- tempV - let mirror = clContext.CreateClCell mirror + tid <- tid + workGroupSize - let kernel = program.GetKernel() + barrierGlobal () - queue.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange rows cols values values.Length segmentLength mirror) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(kernel)) - queue.Post(Msg.CreateFreeMsg(mirror)) - - - let private localEnd (clContext: ClContext) workGroupSize = - - let processedSize = workGroupSize * 2 - - let localEnd = - <@ fun (range: Range1D) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) (length: int) -> - - let lid = range.LocalID0 - let gid = range.GlobalID0 - let groupId = gid / workGroupSize + let mutable k = segmentSizeHalf / 2 - // 1 рабочая группа обрабатывает 2 * wgSize элементов - let localRows = localArray<'n> processedSize - let localCols = localArray<'n> processedSize - let localValues = localArray<'a> processedSize + while k > 0 do - let mutable readIdx = processedSize * groupId + lid - let mutable localLength = local () - localLength <- processedSize + let mutable tid = lid - // копируем элементы из глобальной памяти в локальную - if readIdx < length then - localRows.[lid] <- rows.[readIdx] - localCols.[lid] <- cols.[readIdx] - localValues.[lid] <- values.[readIdx] + while tid < numberOfThreads do + let segmentSizeInner = k * 2 + let segmentId = tid / k + let innerId = tid % k + let innerIdSibling = innerId + k + let i = segmentId * segmentSizeInner + innerId - if readIdx = length then - localLength <- lid + let j = + segmentId * segmentSizeInner + innerIdSibling - readIdx <- readIdx + workGroupSize + if (i < n && j < n) then + let keyI = + ((uint64 rows.[i]) <<< 32) ||| (uint64 cols.[i]) - if readIdx < length then - localRows.[lid + workGroupSize] <- rows.[readIdx] - localCols.[lid + workGroupSize] <- cols.[readIdx] - localValues.[lid + workGroupSize] <- values.[readIdx] + let keyJ = + ((uint64 rows.[j]) <<< 32) ||| (uint64 cols.[j]) - if readIdx = length then - localLength <- lid + workGroupSize + if (keyI > keyJ) then + let tempR = rows.[i] + rows.[i] <- rows.[j] + rows.[j] <- tempR + let tempC = cols.[i] + cols.[i] <- cols.[j] + cols.[j] <- tempC + let tempV = vals.[i] + vals.[i] <- vals.[j] + vals.[j] <- tempV - barrierLocal () - - let mutable segmentLength = processedSize - let mutable j = segmentLength - - while j > 1 do - let localLineId = lid % (j / 2) - let localTwinId = localLineId + (j / 2) - let groupLineId = lid / (j / 2) - let lineId = j * groupLineId + localLineId - let twinId = j * groupLineId + localTwinId - - if twinId < localLength - && (localRows.[lineId] > localRows.[twinId] - || localRows.[lineId] = localRows.[twinId] - && localCols.[lineId] > localCols.[twinId]) then - let tmpRow = localRows.[lineId] - localRows.[lineId] <- localRows.[twinId] - localRows.[twinId] <- tmpRow - - let tmpCol = localCols.[lineId] - localCols.[lineId] <- localCols.[twinId] - localCols.[twinId] <- tmpCol - - let tmpValue = localValues.[lineId] - localValues.[lineId] <- localValues.[twinId] - localValues.[twinId] <- tmpValue - - barrierLocal () + tid <- tid + workGroupSize - j <- j >>> 1 + k <- k / 2 + barrierGlobal () - let mutable writeIdx = processedSize * groupId + lid + segmentSize <- segmentSize * 2 @> - if writeIdx < length then - rows.[writeIdx] <- localRows.[lid] - cols.[writeIdx] <- localCols.[lid] - values.[writeIdx] <- localValues.[lid] + let localStep = clContext.Compile(localStep) + let globalStep = clContext.Compile(globalStep) - writeIdx <- writeIdx + workGroupSize + fun (queue: MailboxProcessor<_>) (rows: ClArray) (cols: ClArray) (values: ClArray<'a>) -> - if writeIdx < length then - rows.[writeIdx] <- localRows.[lid + workGroupSize] - cols.[writeIdx] <- localCols.[lid + workGroupSize] - values.[writeIdx] <- localValues.[lid + workGroupSize] @> + let size = values.Length - let program = clContext.Compile(localEnd) + if (size = 1) then + () + else if (size <= localSize) then + let numberOfThreads = + Common.Utils.ceilToMultiple waveSize (min size maxThreadsPerBlock) - fun (queue: MailboxProcessor<_>) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) -> + let ndRangeLocal = + Range1D.CreateValid(numberOfThreads, numberOfThreads) - let ndRange = - Range1D.CreateValid(Utils.floorToPower2 values.Length, workGroupSize) + let kernel = localStep.GetKernel() - let kernel = program.GetKernel() + queue.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRangeLocal rows cols values values.Length)) + queue.Post(Msg.CreateRunMsg<_, _>(kernel)) + else + let numberOfGroups = + size / localSize + + (if size % localSize = 0 then 0 else 1) - queue.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange rows cols values values.Length)) - queue.Post(Msg.CreateRunMsg<_, _>(kernel)) + let ndRangeLocal = + Range1D.CreateValid(maxThreadsPerBlock * numberOfGroups, maxThreadsPerBlock) - let sortKeyValuesInplace<'n, 'a when 'n: comparison> (clContext: ClContext) workGroupSize = + let kernelLocal = localStep.GetKernel() - let localBegin = localBegin clContext workGroupSize - let globalStep = globalStep clContext workGroupSize - let localEnd = localEnd clContext workGroupSize + queue.Post( + Msg.MsgSetArguments(fun () -> kernelLocal.KernelFunc ndRangeLocal rows cols values values.Length) + ) - fun (queue: MailboxProcessor<_>) (rows: ClArray<'n>) (cols: ClArray<'n>) (values: ClArray<'a>) -> + queue.Post(Msg.CreateRunMsg<_, _>(kernelLocal)) - let lengthCeiled = Utils.ceilToPower2 values.Length + let ndRangeGlobal = + Range1D.CreateValid(maxWorkGroupSize, maxWorkGroupSize) - let rec loopNested i = - if i > workGroupSize * 2 then - globalStep queue rows cols values i false - loopNested (i >>> 1) + let kernelGlobal = globalStep.GetKernel() - let rec mainLoop segmentLength = - if segmentLength <= lengthCeiled then - globalStep queue rows cols values segmentLength true - loopNested (segmentLength >>> 1) - localEnd queue rows cols values - mainLoop (segmentLength <<< 1) + queue.Post( + Msg.MsgSetArguments + (fun () -> kernelGlobal.KernelFunc ndRangeGlobal rows cols values values.Length (localSize * 2)) + ) - localBegin queue rows cols values - mainLoop (workGroupSize <<< 2) + queue.Post(Msg.CreateRunMsg<_, _>(kernelGlobal)) diff --git a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs index 8dc37dec..ec8ad537 100644 --- a/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs +++ b/src/GraphBLAS-sharp.Backend/Quotes/Arithmetic.fs @@ -258,6 +258,15 @@ module ArithmeticOperations = let fst<'a> = <@ fun (x: 'a) (_: 'a) -> Some x @> + let ceilToPowerOfTwo = + <@ fun (x: int) -> + let mutable i = 1 + + while i < x do + i <- i * 2 + + i @> + //PageRank specific let squareOfDifference = <@ fun (x: float32 option) (y: float32 option) -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs index d76053a8..c2477bd4 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs @@ -22,7 +22,7 @@ module Bitonic = let q = defaultContext.Queue - let makeTest sort (array: ('n * 'n * 'a) []) = + let makeTest sort (array: (int * int * 'a) []) = if array.Length > 0 then let projection (row: 'n) (col: 'n) (_: 'a) = row, col @@ -32,6 +32,8 @@ module Bitonic = ) let rows, cols, vals = Array.unzip3 array + let rows = Array.map abs rows + let cols = Array.map abs cols let clRows = context.CreateClArray rows let clColumns = context.CreateClArray cols @@ -58,11 +60,42 @@ module Bitonic = $"Column arrays should be equal. Actual is \n%A{actualCols}, expected \n%A{expectedCols}, input is \n%A{cols}" |> Utils.compareArrays (=) actualCols expectedCols - $"Value arrays should be equal. Actual is \n%A{actualValues}, expected \n%A{expectedValues}, input is \n%A{vals}" - |> Utils.compareArrays (=) actualValues expectedValues + // Check that for each pair of equal keys values are the same + let mutable i = 1 + + let expected, actual = + new ResizeArray<'a>(), new ResizeArray<'a>() + + expected.Add expectedValues.[0] + actual.Add actualValues.[0] + + while i < expectedValues.Size do + if + not + ( + actualRows.[i - 1] = actualRows.[i] + && actualCols.[i - 1] = actualCols.[i] + ) + then + Expect.sequenceEqual + (actual |> Seq.countBy id) + (actual |> Seq.countBy id) + $"Values for keys %A{actualRows.[i - 1]}, %A{actualCols.[i - 1]} are not the same" + + expected.Clear() + actual.Clear() + + expected.Add expectedValues.[i] + actual.Add actualValues.[i] + i <- i + 1 + + Expect.sequenceEqual + actual + expected + $"Values for keys %A{actualRows.[i - 1]}, %A{actualCols.[i - 1]} are not the same" let testFixtures<'a when 'a: equality> = - Sort.Bitonic.sortKeyValuesInplace context wgSize + Sort.Bitonic.sortKeyValuesInplace<'a> context wgSize |> makeTest |> testPropertyWithConfig config $"Correctness on %A{typeof<'a>}" From 2f5ba61fcd06b01db5fd06198869c7f3fdd9311c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sun, 24 Mar 2024 22:04:07 +0300 Subject: [PATCH 086/102] Comment --- src/GraphBLAS-sharp.Backend/Common/Common.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index afa9f871..c1481690 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -11,6 +11,7 @@ module Common = /// Sorts in-place input array of values by their 2d indices, /// which are stored in two given arrays of keys: rows and columns. /// When comparing, it first looks at rows, then columns. + /// Note that maximum possible workGroupSize is used internally for better perfomance. /// /// /// From 049b4b3ac34a4cd5cb2e8288d4fe156c9530ea8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sun, 7 Apr 2024 03:51:16 +0300 Subject: [PATCH 087/102] Make old scan obsolete --- src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs | 2 ++ src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs | 4 ++-- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 6 +++--- src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs index 1b4a745d..ccbc5355 100644 --- a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs @@ -225,6 +225,8 @@ module internal PrefixSumInternal = /// /// ClContext. /// Should be a power of 2 and greater than 1. + [] let standardExcludeInPlace (clContext: ClContext) workGroupSize = let scan = diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 4645c7c9..abace8a4 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -156,7 +156,7 @@ module internal Radix = let count = count clContext workGroupSize mask let prefixSum = - PrefixSumInternal.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let scatter = scatter clContext workGroupSize mask @@ -259,7 +259,7 @@ module internal Radix = let count = count clContext workGroupSize mask let prefixSum = - PrefixSumInternal.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let scatterByKey = scatterByKey clContext workGroupSize mask diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 51241f1d..73aad03b 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -529,7 +529,7 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSumInternal.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> @@ -661,7 +661,7 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSumInternal.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> @@ -940,7 +940,7 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSumInternal.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs index f60dd89d..2ec56f1e 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -65,7 +65,7 @@ module SpMSpV = inputArray.[i] <- 0 @> let sum = - PrefixSumInternal.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let prepareOffsets = clContext.Compile prepareOffsets From 13e0b522f04d6e5f9f027a480e26f052b5507c9f Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 14 Apr 2024 18:10:36 +0300 Subject: [PATCH 088/102] Channels --- .../Algorithms/BFS.fs | 15 +- .../Algorithms/PageRank.fs | 11 +- .../Configs/BFSBenchmarks.txt | 7 +- .../GraphBLAS-sharp.Benchmarks/Helpers.fs | 2 +- .../Matrix/Map2/Map2.fs | 16 +- .../Matrix/SpGeMM/Expand.fs | 9 +- .../Matrix/SpGeMM/Masked.fs | 15 +- .../GraphBLAS-sharp.Benchmarks/Program.fs | 2 +- .../GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 15 +- paket.dependencies | 4 +- paket.lock | 638 ++++++++++-------- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 8 +- .../Algorithms/MSBFS.fs | 12 +- .../Algorithms/PageRank.fs | 8 +- .../Algorithms/PageRank.fsi | 6 +- .../Algorithms/SSSP.fs | 2 +- src/GraphBLAS-sharp.Backend/Common/Bitmap.fs | 4 +- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 58 +- src/GraphBLAS-sharp.Backend/Common/Common.fs | 4 +- src/GraphBLAS-sharp.Backend/Common/Gather.fs | 4 +- src/GraphBLAS-sharp.Backend/Common/Map.fs | 10 +- .../Common/PrefixSum.fs | 14 +- src/GraphBLAS-sharp.Backend/Common/Scan.fs | 270 ++++++++ src/GraphBLAS-sharp.Backend/Common/Scatter.fs | 4 +- .../Common/Sort/Bitonic.fs | 2 +- .../Common/Sort/Radix.fs | 14 +- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 36 +- .../GraphBLAS-sharp.Backend.fsproj | 2 +- .../Matrix/COO/Intersect.fs | 2 +- src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs | 4 +- .../Matrix/COO/Map2.fs | 8 +- .../Matrix/COO/Matrix.fs | 16 +- .../Matrix/COO/Merge.fs | 4 +- src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs | 8 +- .../Matrix/CSR/Map2.fs | 8 +- .../Matrix/CSR/Matrix.fs | 22 +- .../Matrix/CSR/Merge.fs | 2 +- src/GraphBLAS-sharp.Backend/Matrix/Common.fs | 4 +- .../Matrix/LIL/Matrix.fs | 2 +- src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs | 22 +- .../Objects/ArraysExtentions.fs | 15 +- .../Objects/ClCellExtensions.fs | 10 +- src/GraphBLAS-sharp.Backend/Objects/Common.fs | 2 +- .../Objects/MailboxProcessorExtensions.fs | 6 - src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 7 +- .../Operations/Kronecker.fs | 14 +- .../Operations/Operations.fs | 36 +- .../Operations/SpGeMM/Expand.fs | 24 +- .../Operations/SpGeMM/Masked.fs | 4 +- .../Operations/SpMSpV.fs | 26 +- .../Operations/SpMV.fs | 4 +- .../Vector/Dense/Vector.fs | 18 +- .../Vector/Sparse/Common.fs | 10 +- .../Vector/Sparse/Map.fs | 8 +- .../Vector/Sparse/Map2.fs | 16 +- .../Vector/Sparse/Merge.fs | 2 +- .../Vector/Sparse/Vector.fs | 8 +- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 28 +- .../Objects/MatrixExtensions.fs | 34 +- .../Objects/VectorExtensions.fs | 4 +- .../Backend/Common/ClArray/Copy.fs | 2 +- .../Backend/Common/ClArray/Map.fs | 6 +- .../Backend/Common/ClArray/Map2.fs | 6 +- .../Common/ClArray/RemoveDuplicates.fs | 9 +- .../Backend/Common/ClArray/Replicate.fs | 2 +- .../Backend/Common/Reduce/Reduce.fs | 4 +- .../Backend/Common/Reduce/Sum.fs | 2 +- .../Backend/Common/Scan/PrefixSum.fs | 2 +- .../Backend/Common/Scatter.fs | 4 +- .../Backend/Common/Sort/Bitonic.fs | 2 +- .../Backend/Matrix/Convert.fs | 3 +- .../Backend/Matrix/Kronecker.fs | 3 +- .../Backend/Matrix/Map.fs | 9 +- .../Backend/Matrix/Map2.fs | 9 +- .../Backend/Matrix/SpGeMM/Masked.fs | 3 +- .../Backend/Matrix/Transpose.fs | 2 +- .../Backend/Vector/AssignByMask.fs | 4 +- .../Backend/Vector/Convert.fs | 5 +- .../Backend/Vector/Copy.fs | 3 +- .../Backend/Vector/Map.fs | 11 +- .../Backend/Vector/Map2.fs | 5 +- .../Backend/Vector/OfList.fs | 7 +- .../Backend/Vector/Reduce.fs | 2 +- .../Backend/Vector/SpMSpV.fs | 5 +- .../Backend/Vector/SpMV.fs | 4 +- .../Backend/Vector/ZeroCreate.fs | 5 +- tests/GraphBLAS-sharp.Tests/Helpers.fs | 2 +- 87 files changed, 1035 insertions(+), 656 deletions(-) create mode 100644 src/GraphBLAS-sharp.Backend/Common/Scan.fs delete mode 100644 src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index c34492dc..c59e1dd7 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -9,7 +9,6 @@ open GraphBLAS.FSharp.IO open GraphBLAS.FSharp.Benchmarks open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Backend.Quotes [] @@ -41,7 +40,7 @@ type Benchmarks<'elem when 'elem : struct>( member this.Processor = let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf "%A" e) + //p.Error.Add(fun e -> failwithf "%A" e) p static member AvailableContexts = Utils.availableContexts @@ -114,12 +113,12 @@ type WithoutTransferBenchmark<'elem when 'elem : struct>( override this.GlobalSetup() = this.ReadMatrix() this.LoadMatrixToGPU() - finish this.Processor + this.Processor.Synchronize() [] override this.IterationCleanup() = this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = @@ -128,7 +127,7 @@ type WithoutTransferBenchmark<'elem when 'elem : struct>( [] override this.Benchmark() = this.BFS() - this.Processor.PostAndReply Msg.MsgNotifyMe + this.Processor.Synchronize() type BFSWithoutTransferBenchmarkBool() = @@ -183,7 +182,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( [] override this.GlobalSetup() = this.ReadMatrix() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = @@ -193,7 +192,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( override this.IterationCleanup() = this.ClearInputMatrix() this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark() = @@ -202,7 +201,7 @@ type WithTransferBenchmark<'elem when 'elem : struct>( match this.ResultLevels with | ClVector.Dense result -> result.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe + this.Processor.Synchronize() | _ -> failwith "Impossible" type BFSWithTransferBenchmarkBool() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index c00c5f70..3b70fca9 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -7,7 +7,6 @@ open GraphBLAS.FSharp.IO open Brahma.FSharp open Microsoft.FSharp.Core open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Benchmarks open GraphBLAS.FSharp.Objects @@ -40,7 +39,7 @@ type Benchmarks( member this.Processor = let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf "%A" e) + //p.Error.Add(fun e -> failwithf "%A" e) p static member AvailableContexts = Utils.availableContexts @@ -113,15 +112,15 @@ type PageRankWithoutTransferBenchmarkFloat32() = override this.GlobalSetup() = this.ReadMatrix() this.LoadMatrixToGPU() - finish this.Processor + this.Processor.Synchronize() this.PrepareMatrix() this.ClearInputMatrix() - finish this.Processor + this.Processor.Synchronize() [] override this.IterationCleanup() = this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = @@ -130,4 +129,4 @@ type PageRankWithoutTransferBenchmarkFloat32() = [] override this.Benchmark() = this.PageRank() - finish this.Processor + this.Processor.Synchronize() diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/BFSBenchmarks.txt b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/BFSBenchmarks.txt index ff803830..b282136e 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/BFSBenchmarks.txt +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Configs/BFSBenchmarks.txt @@ -1,4 +1,7 @@ wing.mtx coAuthorsCiteseer.mtx -hollywood-2009.mtx -roadNet-CA.mtx \ No newline at end of file +!hollywood-2009.mtx +roadNet-CA.mtx +belgium_osm.mtx +road_central.mtx +coPapersDBLP.mtx \ No newline at end of file diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs index 0867e214..4288c875 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs @@ -15,7 +15,7 @@ open Expecto module Utils = type BenchmarkContext = { ClContext: Brahma.FSharp.ClContext - Queue: MailboxProcessor } + Queue: DeviceCommandQueue } let getMatricesFilenames configFilename = let getFullPathToConfig filename = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index 190369f5..0d5c89fd 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -8,7 +8,6 @@ open GraphBLAS.FSharp.IO open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.MatrixExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Benchmarks @@ -41,7 +40,7 @@ type Benchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem : st member this.Processor = let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf "%A" e) + //p.Error.Add(fun e -> failwithf "%A" e) p static member AvailableContexts = Utils.availableContexts @@ -119,12 +118,12 @@ module WithoutTransfer = override this.GlobalSetup() = this.ReadMatrices () this.LoadMatricesToGPU () - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark () = this.EWiseAddition() - finish this.Processor + this.Processor.Synchronize() [] override this.IterationCleanup () = @@ -252,7 +251,7 @@ module WithTransfer = [] override this.GlobalSetup() = this.ReadMatrices() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = () @@ -261,16 +260,15 @@ module WithTransfer = override this.IterationCleanup() = this.ClearInputMatrices() this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark() = this.LoadMatricesToGPU() this.EWiseAddition() - this.Processor.PostAndReply Msg.MsgNotifyMe + this.Processor.Synchronize() resultToHost this.ResultMatrix this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe - + this.Processor.Synchronize() module COO = type Float32() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index d379739c..6f20c809 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -8,7 +8,6 @@ open GraphBLAS.FSharp.IO open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Benchmarks [] @@ -40,7 +39,7 @@ type Benchmarks<'elem when 'elem : struct>( member this.Processor = let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf "%A" e) + //p.Error.Add(fun e -> failwithf "%A" e) p static member AvailableContexts = Utils.availableContexts @@ -116,17 +115,17 @@ module WithoutTransfer = override this.GlobalSetup() = this.ReadMatrices() this.LoadMatricesToGPU() - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark() = this.Mxm() - finish this.Processor + this.Processor.Synchronize() [] override this.IterationCleanup () = this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup () = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index 18ff0b22..f3ab8b66 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -8,7 +8,6 @@ open Brahma.FSharp open GraphBLAS.FSharp open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions open GraphBLAS.FSharp.Benchmarks [] @@ -46,7 +45,7 @@ type Masked<'elem when 'elem : struct>( member this.Processor = let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf "%A" e) + //p.Error.Add(fun e -> failwithf "%A" e) p static member AvaliableContexts = Utils.availableContexts @@ -153,17 +152,17 @@ type MxmBenchmarksMultiplicationOnly<'elem when 'elem : struct>( this.ReadMatrices () this.LoadMatricesToGPU () this.ConvertSecondMatrixToCSC() - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark () = this.Mxm() - finish this.Processor + this.Processor.Synchronize() [] override this.IterationCleanup () = this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup () = @@ -185,20 +184,20 @@ type MxmBenchmarksWithTransposing<'elem when 'elem : struct>( override this.GlobalSetup() = this.ReadMatrices() this.LoadMatricesToGPU () - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark() = this.ConvertSecondMatrixToCSC() this.Mxm() - finish this.Processor + this.Processor.Synchronize() [] override this.IterationCleanup() = this.ClearResult() this.ConvertSecondMatrixToCSR() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 40bbb73a..61328218 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,7 +4,7 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof |] + BenchmarkSwitcher [| typeof |] benchmarks.Run argv |> ignore 0 diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index 9d78980b..504f7a70 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -10,7 +10,6 @@ open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions [] [] @@ -41,7 +40,7 @@ type Benchmarks<'elem when 'elem : struct>( member this.Processor = let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf $"%A{e}") + //p.Error.Add(fun e -> failwithf $"%A{e}") p static member AvailableContexts = Utils.availableContexts @@ -105,18 +104,18 @@ module WithoutTransfer = override this.IterationSetup() = this.CreateVectors() this.LoadVectorsToGPU() - this.Processor.PostAndReply Msg.MsgNotifyMe + this.Processor.Synchronize() [] override this.Benchmark() = this.Map2() - this.Processor.PostAndReply Msg.MsgNotifyMe + this.Processor.Synchronize() [] override this.IterationCleanup() = this.ClearResult() this.ClearInputVectors() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = () @@ -161,7 +160,7 @@ module WithTransfer = [] override this.IterationSetup() = this.CreateVectors() - finish this.Processor + this.Processor.Synchronize() [] override this.Benchmark () = @@ -170,7 +169,7 @@ module WithTransfer = match this.ResultVector with | Some v -> v.ToHost this.Processor |> ignore - this.Processor.PostAndReply Msg.MsgNotifyMe + this.Processor.Synchronize() | None -> () @@ -178,7 +177,7 @@ module WithTransfer = override this.IterationCleanup () = this.ClearInputVectors() this.ClearResult() - finish this.Processor + this.Processor.Synchronize() [] override this.GlobalCleanup() = () diff --git a/paket.dependencies b/paket.dependencies index a434e23e..9b55c999 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -9,14 +9,14 @@ nuget YoloDev.Expecto.TestSdk 0.13.3 nuget Microsoft.NET.Test.Sdk 16.8.0 nuget altcover ~> 7 -nuget System.Collections.Immutable 7.0 +nuget System.Collections.Immutable 8.0 nuget ExtraConstraints.Fody 1.14.0 nuget Microsoft.Build.Framework 16.10 nuget System.CodeDom >= 7.0 nuget FSharp.Quotations.Evaluator 2.1.0 nuget FSharpx.Collections >= 3.1 nuget FSharpx.Text.StructuredFormat >= 3.1 -nuget Brahma.FSharp 2.0.5 +nuget Brahma.FSharp 3.0.0-alpha1.3 nuget BenchmarkDotNet nuget MathNet.Numerics.FSharp 4.0.0 nuget MathNet.Numerics.MKL.Win-x64 2.5.0 diff --git a/paket.lock b/paket.lock index 7cae92f5..73019bac 100644 --- a/paket.lock +++ b/paket.lock @@ -2,8 +2,8 @@ STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 altcover (7.6.812) - BenchmarkDotNet (0.13.9) - BenchmarkDotNet.Annotations (>= 0.13.9) - restriction: >= netstandard2.0 + BenchmarkDotNet (0.13.12) + BenchmarkDotNet.Annotations (>= 0.13.12) - restriction: >= netstandard2.0 CommandLineParser (>= 2.9.1) - restriction: >= netstandard2.0 Gee.External.Capstone (>= 2.3) - restriction: >= netstandard2.0 Iced (>= 1.17) - restriction: >= netstandard2.0 @@ -18,27 +18,27 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - BenchmarkDotNet.Annotations (0.13.9) - restriction: >= netstandard2.0 - Brahma.FSharp (2.0.5) - Brahma.FSharp.OpenCL.Printer (>= 2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Shared (>= 2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Translator (>= 2.0.5) - restriction: >= net7.0 + BenchmarkDotNet.Annotations (0.13.12) - restriction: >= netstandard2.0 + Brahma.FSharp (3.0.0-alpha1.3) + Brahma.FSharp.OpenCL.Printer (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Translator (>= 3.0.0-alpha1.3) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 FSharp.Quotations.Evaluator (>= 2.1) - restriction: >= net7.0 - YC.OpenCL.NET (>= 2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.AST (2.0.5) - restriction: >= net7.0 + YC.OpenCL.NET (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.AST (3.0.0-alpha1.3) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Printer (2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.AST (>= 2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Translator (>= 2.0.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Printer (3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.AST (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Translator (>= 3.0.0-alpha1.3) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 FSharpx.Collections (>= 3.1) - restriction: >= net7.0 FSharpx.Text.StructuredFormat (>= 3.1) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Shared (2.0.5) - restriction: >= net7.0 - YC.OpenCL.NET (>= 2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Translator (2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.AST (>= 2.0.5) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Shared (>= 2.0.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Shared (3.0.0-alpha1.3) - restriction: >= net7.0 + YC.OpenCL.NET (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Translator (3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.AST (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.3) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 FSharp.Quotations.Evaluator (>= 2.1) - restriction: >= net7.0 FSharpx.Collections (>= 3.1) - restriction: >= net7.0 @@ -63,7 +63,7 @@ NUGET FSharpx.Text.StructuredFormat (3.1) FSharp.Core (>= 4.6.2) - restriction: || (>= net452) (>= netstandard2.0) Gee.External.Capstone (2.3) - restriction: >= netstandard2.0 - Iced (1.20) - restriction: >= netstandard2.0 + Iced (1.21) - restriction: >= netstandard2.0 MathNet.Numerics (5.0) - restriction: || (>= net45) (>= netstandard1.6) System.ValueTuple (>= 4.4) - restriction: && (>= net461) (< net48) MathNet.Numerics.FSharp (4.0) @@ -77,59 +77,75 @@ NUGET System.Runtime.Serialization.Xml (>= 4.3) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) MathNet.Numerics.MKL.Win-x64 (2.5) - Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.Build.Framework (16.10) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true + Microsoft.Build.Tasks.Git (8.0) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.9.2) - restriction: >= netstandard2.0 Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) - System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 8.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (>= 8.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.7) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.7.2) - restriction: || (>= net45) (>= netcoreapp2.1) + Microsoft.CodeAnalysis.CSharp (4.9.2) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.9.2) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.9) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.447801) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.510501) - restriction: >= netstandard2.0 Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 6.0) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Diagnostics.Runtime (3.0.442202) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (3.1.512801) - restriction: >= netstandard2.0 Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.9) - restriction: >= netstandard2.0 + Microsoft.NETCore.Portable.Compatibility (>= 1.0.2) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + System.Diagnostics.Process (>= 4.3) - restriction: >= netstandard2.0 + System.Diagnostics.TraceSource (>= 4.3) - restriction: >= netstandard2.0 + System.IO.Compression (>= 4.3) - restriction: >= netstandard2.0 + System.IO.UnmanagedMemoryStream (>= 4.3) - restriction: >= netstandard2.0 + System.Net.NameResolution (>= 4.3) - restriction: >= netstandard2.0 + System.Net.Requests (>= 4.3) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 8.0) - restriction: >= netstandard2.0 + System.Reflection.TypeExtensions (>= 4.7) - restriction: >= netstandard2.0 + System.Runtime (>= 4.3.1) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - Microsoft.Diagnostics.Tracing.TraceEvent (3.1.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 + System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: >= netstandard2.0 + System.Threading.Tasks.Parallel (>= 4.3) - restriction: >= netstandard2.0 + System.Threading.Thread (>= 4.3) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) - Microsoft.Extensions.DependencyInjection (7.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.DependencyInjection (8.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection.Abstractions (7.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.DependencyInjection.Abstractions (8.0.1) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.Logging (7.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Diagnostics.DiagnosticSource (>= 7.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.Logging (8.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.DependencyInjection (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Diagnostics.DiagnosticSource (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Logging.Abstractions (7.0.1) - restriction: >= netstandard2.0 + Microsoft.Extensions.Logging.Abstractions (8.0.1) - restriction: >= netstandard2.0 + Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.Options (7.0.1) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.ComponentModel.Annotations (>= 5.0) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - Microsoft.Extensions.Primitives (7.0) - restriction: >= netstandard2.0 + Microsoft.Extensions.Options (8.0.2) - restriction: >= netstandard2.0 + Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.ComponentModel.Annotations (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) + System.ValueTuple (>= 4.5) - restriction: >= net462 + Microsoft.Extensions.Primitives (8.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) Microsoft.NET.Test.Sdk (16.8) @@ -139,28 +155,31 @@ NUGET System.ComponentModel.Primitives (>= 4.1) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (>= 4.1) - restriction: >= uap10.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: >= uap10.0 - Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) - Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) - Microsoft.SourceLink.Common (1.1.1) - copy_local: true + Microsoft.NETCore.Jit (2.0.8) - restriction: && (< net45) (>= netstandard2.0) (< win8) (< wpa81) + Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) + Microsoft.NETCore.Portable.Compatibility (1.0.2) - restriction: >= netstandard2.0 + Microsoft.NETCore.Runtime.CoreCLR (>= 1.0.2) - restriction: && (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) + Microsoft.NETCore.Runtime.CoreCLR (2.0.8) - restriction: && (< net45) (>= netstandard2.0) (< win8) (< wpa81) + Microsoft.NETCore.Jit (>= 2.0.8) + Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) + Microsoft.SourceLink.Common (8.0) - copy_local: true Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.7.2) - restriction: >= netcoreapp3.1 - NuGet.Frameworks (>= 6.5) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.TestPlatform.ObjectModel (17.9) - restriction: >= netcoreapp3.1 System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.7.2) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.7.2) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.9) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.9) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 - Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.Win32.Registry (5.0) - restriction: && (< net6.0) (>= netstandard2.0) + Microsoft.Win32.Registry (5.0) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Cecil (0.11.5) - restriction: || (>= net461) (>= netstandard2.0) NETStandard.Library (2.0.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard2.0)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< net452) (>= netstandard1.4)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) @@ -214,7 +233,6 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) - NuGet.Frameworks (6.7) - restriction: >= netcoreapp3.1 Perfolizer (0.2.1) - restriction: >= netstandard2.0 System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 QuikGraph (2.5) @@ -225,10 +243,10 @@ NUGET runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) - runtime.native.System (4.3.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + runtime.native.System (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.IO.Compression (4.3.2) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) + runtime.native.System.IO.Compression (4.3.2) - restriction: && (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) runtime.native.System.Net.Http (4.3.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) @@ -264,13 +282,13 @@ NUGET runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) System.AppContext (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) - System.CodeDom (7.0) - System.Collections (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.CodeDom (8.0) + System.Collections (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Collections.Concurrent (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Collections.Concurrent (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -281,10 +299,10 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Collections.Immutable (7.0) + System.Collections.Immutable (8.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.ComponentModel.Annotations (5.0) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) + System.ComponentModel.Annotations (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) System.ComponentModel.Primitives (4.3) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (4.3) - restriction: >= uap10.0 System.ComponentModel.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.5) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net45) (< netstandard1.5)) (>= net462) (&& (< netstandard1.0) (>= win8)) (>= wp8) (>= wpa81) @@ -294,22 +312,52 @@ NUGET System.IO (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Debug (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Diagnostics.Debug (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Diagnostics.DiagnosticSource (7.0.2) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Diagnostics.DiagnosticSource (8.0.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Diagnostics.Process (4.3) - restriction: >= netstandard2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + Microsoft.Win32.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + Microsoft.Win32.Registry (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + runtime.native.System (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Collections (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Debug (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Globalization (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.IO.FileSystem (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO.FileSystem.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.Handles (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Runtime.InteropServices (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Text.Encoding.Extensions (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.Tasks (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.Thread (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.ThreadPool (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Tools (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Tracing (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Diagnostics.TraceSource (4.3) - restriction: >= netstandard2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + runtime.native.System (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Tracing (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) - System.Drawing.Common (7.0) - restriction: >= net6.0 - Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Globalization (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) @@ -325,13 +373,13 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.IO (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.IO.Compression (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.IO.Compression (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.IO.Compression (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -357,7 +405,7 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.FileSystem (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.IO.FileSystem (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.IO (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -366,8 +414,18 @@ NUGET System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.FileSystem.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.IO.FileSystem.Primitives (4.3) - restriction: || (&& (< monoandroid) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO.UnmanagedMemoryStream (4.3) - restriction: >= netstandard2.0 + System.Buffers (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO.FileSystem.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net46) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Linq (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) System.Collections (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.6) (< win8) (< wp8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Diagnostics.Debug (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -392,14 +450,14 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Management (7.0.2) - restriction: >= netstandard2.0 - System.CodeDom (>= 7.0) - restriction: >= netstandard2.0 + System.Management (8.0) - restriction: >= netstandard2.0 + System.CodeDom (>= 8.0) - restriction: >= netstandard2.0 System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Net.Http (4.3.4) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Net.Http (4.3.4) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) runtime.native.System (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Net.Http (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -426,11 +484,40 @@ NUGET System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Threading (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Net.Primitives (4.3.1) - restriction: || (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Net.NameResolution (4.3) - restriction: >= netstandard2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + runtime.native.System (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Net.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.Principal.Windows (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Net.Primitives (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) System.Runtime (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Net.Requests (4.3) - restriction: >= netstandard2.0 + Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) + System.Net.Http (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Net.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) + System.Net.WebHeaderCollection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) + System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) System.Net.Sockets (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -438,6 +525,11 @@ NUGET System.Net.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Net.WebHeaderCollection (4.3) - restriction: && (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (4.5) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.ObjectModel (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -487,36 +579,33 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.Metadata (7.0.2) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Reflection.Metadata (8.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.TypeExtensions (4.7) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) - System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.5) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.5) (< uap10.1)) - System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.5) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.5) (< uap10.1)) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.5) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.5) (< uap10.1)) - System.Resources.ResourceManager (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Reflection.TypeExtensions (4.7) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (>= netstandard1.6)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (>= netstandard2.0) + System.Resources.ResourceManager (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - 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)) + System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.6)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (>= netstandard2.0) (>= uap10.0) 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)) 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)) 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) - System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (>= 4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Runtime.Handles (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Runtime.Handles (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.InteropServices (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Runtime.InteropServices (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -545,9 +634,9 @@ NUGET System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net46) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Xml.ReaderWriter (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.2) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.5) (>= netstandard1.6)) (&& (< net45) (>= net462) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net462) (< netstandard1.5) (>= netstandard1.6)) (&& (< net45) (>= net47) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net47) (< netstandard1.5) (>= netstandard1.6)) (&& (< 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.4) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< net45) (>= netstandard1.6)) (&& (< netstandard1.4) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -647,19 +736,19 @@ NUGET System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Permissions (7.0) - restriction: && (< net472) (>= netstandard2.0) + System.Security.Permissions (8.0) - restriction: && (< net472) (>= netstandard2.0) System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Windows.Extensions (>= 8.0) - restriction: >= net6.0 + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - System.Text.Encoding (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (7.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (8.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) @@ -671,22 +760,35 @@ NUGET System.Runtime (>= 4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3.1) - restriction: && (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Threading (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Threading.Tasks (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Threading.Tasks (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) + System.Threading.Tasks.Parallel (4.3) - restriction: >= netstandard2.0 + System.Collections.Concurrent (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) + System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) + System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) + System.Threading.Thread (4.3) - restriction: >= netstandard2.0 + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Threading.ThreadPool (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Timer (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.ValueTuple (4.5) - restriction: || (&& (>= net461) (< net48)) (&& (>= net462) (>= netstandard2.0)) - System.Windows.Extensions (7.0) - restriction: >= net6.0 - System.Drawing.Common (>= 7.0) - restriction: >= net6.0 + System.Windows.Extensions (8.0) - restriction: >= net6.0 System.Xml.ReaderWriter (4.3.1) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -747,7 +849,7 @@ NUGET System.Xml.XmlDocument (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) TypeShape (9.0) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 - YC.OpenCL.NET (2.0.5) - restriction: >= net7.0 + YC.OpenCL.NET (3.0.0-alpha1.3) - restriction: >= net7.0 ExtraConstraints.Fody (1.14) - restriction: >= net7.0 Microsoft.Build.Framework (16.10) - restriction: >= net7.0 System.CodeDom (>= 7.0) - restriction: >= net7.0 @@ -762,12 +864,13 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.14.1) - restriction: >= net5.0 - FSharp.Compiler.Service (>= 43.7.400) - restriction: >= net6.0 - FSharp.Core (>= 7.0.400) - restriction: >= net6.0 + FSharp.Analyzers.SDK (0.25) - restriction: >= net5.0 + FSharp.Compiler.Service (43.8.200) - restriction: >= net6.0 + FSharp.Core (8.0.200) - restriction: >= net6.0 McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 - FSharp.Compiler.Service (43.7.400) - restriction: >= net6.0 - FSharp.Core (7.0.400) - restriction: >= netstandard2.0 + Microsoft.Extensions.Logging.Abstractions (>= 6.0) - restriction: >= net6.0 + FSharp.Compiler.Service (43.8.200) - restriction: >= net6.0 + FSharp.Core (8.0.200) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 @@ -775,37 +878,40 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.400) - restriction: >= net5.0 + FSharp.Core (8.0.200) - restriction: >= net5.0 McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net6.0 - Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net6.0 - System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Text.Json (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.DependencyInjection.Abstractions (8.0.1) - restriction: >= net6.0 + Microsoft.Extensions.DependencyModel (8.0) - restriction: >= net6.0 + System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Text.Json (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Logging.Abstractions (8.0.1) - restriction: >= net6.0 + Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0) System.Buffers (4.5.1) - restriction: >= net6.0 - System.Collections.Immutable (7.0) - restriction: >= net6.0 + System.Collections.Immutable (8.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net6.0 + System.Diagnostics.DiagnosticSource (8.0.1) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Memory (4.5.5) - restriction: >= net6.0 System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Reflection.Emit (4.7) - restriction: >= net6.0 - System.Reflection.Metadata (7.0.2) - restriction: >= net6.0 - System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Reflection.Metadata (8.0) - restriction: >= net6.0 + System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) System.Runtime.CompilerServices.Unsafe (6.0) - restriction: >= net6.0 - System.Text.Encodings.Web (7.0) - restriction: >= net6.0 + System.Text.Encodings.Web (8.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (7.0.3) - restriction: >= net6.0 + System.Text.Json (8.0.3) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) GROUP Build STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 - Argu (6.1.1) + Argu (6.2.3) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 System.Configuration.ConfigurationManager (>= 4.4) - restriction: >= netstandard2.0 BlackFox.VsWhere (1.1) - restriction: >= netstandard2.0 @@ -932,77 +1038,71 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (7.0.400) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 - Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 + FSharp.Core (8.0.200) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Build.Framework (17.9.5) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + System.Memory (>= 4.5.5) - restriction: && (< net472) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.9.5) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.9.5) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 - Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.NET.StringTools (>= 17.9.5) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 8.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + Microsoft.NET.StringTools (17.9.5) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) - Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) + Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.2.206) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.7) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Configuration (6.7) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Common (6.9.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Configuration (6.9.1) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.9.1) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (6.7) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.9.1) - restriction: >= netstandard2.0 + NuGet.Packaging (6.9.1) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.9.1) - restriction: >= netstandard2.0 System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (6.7) - restriction: >= netstandard2.0 + NuGet.Protocol (6.9.1) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.9.1) - restriction: >= netstandard2.0 + System.Text.Json (>= 7.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) + NuGet.Versioning (6.9.1) - restriction: >= netstandard2.0 Octokit (0.48) - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net5.0) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Collections.Immutable (8.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Configuration.ConfigurationManager (7.0) - restriction: >= netstandard2.0 - System.Diagnostics.EventLog (>= 7.0) - restriction: >= net7.0 - System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) - System.Security.Permissions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 - System.Drawing.Common (7.0) - restriction: >= net6.0 - Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Configuration.ConfigurationManager (8.0) - restriction: >= netstandard2.0 + System.Diagnostics.EventLog (>= 8.0) - restriction: >= net7.0 + System.Security.Cryptography.ProtectedData (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) + System.Diagnostics.EventLog (8.0) - restriction: >= net7.0 + System.Formats.Asn1 (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netstandard2.1)) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -1014,67 +1114,74 @@ NUGET System.Runtime (4.3.1) - restriction: && (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (&& (< net5.0) (>= net6.0)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (>= netstandard2.0) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (8.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) + System.Formats.Asn1 (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) + System.Security.Cryptography.ProtectedData (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) - System.Security.Permissions (7.0) - restriction: >= netstandard2.0 - System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - System.Text.Encoding.CodePages (7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (8.0) - restriction: && (< net472) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Text.Encodings.Web (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Json (8.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) + Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.ValueTuple (>= 4.5) - restriction: >= net462 + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= uap10.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) - System.ValueTuple (4.5) - restriction: && (>= net45) (>= netstandard2.0) - System.Windows.Extensions (7.0) - restriction: >= net6.0 - System.Drawing.Common (>= 7.0) - restriction: >= net6.0 + System.ValueTuple (4.5) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) GROUP Docs STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 - Argu (6.1.1) + Argu (6.2.3) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 System.Configuration.ConfigurationManager (>= 4.4) - restriction: >= netstandard2.0 BlackFox.VsWhere (1.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.0.0.1) - restriction: >= net45 FSharp.Core (>= 4.2.3) - restriction: && (< net45) (>= netstandard2.0) Microsoft.Win32.Registry (>= 4.7) - restriction: && (< net45) (>= netstandard2.0) - Fable.Browser.Blob (1.3) - restriction: >= netstandard2.0 - Fable.Core (>= 3.0) - restriction: >= netstandard2.0 + Fable.Browser.Blob (1.4) - restriction: >= netstandard2.0 + Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.Dom (2.14) - restriction: >= netstandard2.0 + Fable.Browser.Dom (2.16) - restriction: >= netstandard2.0 Fable.Browser.Blob (>= 1.3) - restriction: >= netstandard2.0 Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Browser.WebStorage (>= 1.2) - restriction: >= netstandard2.0 Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.Event (1.5) - restriction: >= netstandard2.0 - Fable.Browser.Gamepad (>= 1.1) - restriction: >= netstandard2.0 - Fable.Core (>= 3.0) - restriction: >= netstandard2.0 + Fable.Browser.Event (1.6) - restriction: >= netstandard2.0 + Fable.Browser.Gamepad (>= 1.3) - restriction: >= netstandard2.0 + Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.Gamepad (1.2) - restriction: >= netstandard2.0 - Fable.Core (>= 3.0) - restriction: >= netstandard2.0 + Fable.Browser.Gamepad (1.3) - restriction: >= netstandard2.0 + Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.WebStorage (1.2) - restriction: >= netstandard2.0 - Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 - Fable.Core (>= 3.0) - restriction: >= netstandard2.0 + Fable.Browser.WebStorage (1.3) - restriction: >= netstandard2.0 + Fable.Browser.Event (>= 1.6) - restriction: >= netstandard2.0 + Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (4.1) - restriction: >= netstandard2.0 + Fable.Core (4.3) - restriction: >= netstandard2.0 Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 @@ -1167,70 +1274,67 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.400) + FSharp.Core (7.0.403) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 - Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Build.Framework (17.9.5) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + System.Memory (>= 4.5.5) - restriction: && (< net472) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.9.5) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.9.5) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 - Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) - System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.NET.StringTools (>= 17.9.5) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 8.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + Microsoft.NET.StringTools (17.9.5) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (< net7.0) (>= netstandard2.0)) + Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.2.206) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.7) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Configuration (6.7) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Common (6.9.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Configuration (6.9.1) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.9.1) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (6.7) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.9.1) - restriction: >= netstandard2.0 + NuGet.Packaging (6.9.1) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.9.1) - restriction: >= netstandard2.0 System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.7) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 - NuGet.Versioning (6.7) - restriction: >= netstandard2.0 + NuGet.Protocol (6.9.1) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.9.1) - restriction: >= netstandard2.0 + System.Text.Json (>= 7.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) + NuGet.Versioning (6.9.1) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1284,18 +1388,17 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Collections.Immutable (7.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Collections.Immutable (8.0) - restriction: || (>= net461) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Configuration.ConfigurationManager (7.0) - restriction: >= netstandard2.0 - System.Diagnostics.EventLog (>= 7.0) - restriction: >= net7.0 - System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) - System.Security.Permissions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Configuration.ConfigurationManager (8.0) - restriction: >= netstandard2.0 + System.Diagnostics.EventLog (>= 8.0) - restriction: >= net7.0 + System.Security.Cryptography.ProtectedData (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) System.Diagnostics.Debug (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 + System.Diagnostics.EventLog (8.0) - restriction: >= net7.0 System.Diagnostics.Process (4.3) - restriction: && (< net461) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.Win32.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1332,9 +1435,7 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) - System.Drawing.Common (7.0) - restriction: >= net6.0 - Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 - System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Formats.Asn1 (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1379,8 +1480,8 @@ NUGET System.Reflection.Emit (4.7) - restriction: && (< net461) (>= netstandard2.0) System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Reflection.Metadata (7.0.2) - restriction: || (>= net461) (>= netstandard2.0) - System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Reflection.Metadata (8.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1396,7 +1497,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (>= net461) (&& (< net5.0) (>= net6.0)) (&& (>= net6.0) (< net7.0)) (>= netstandard2.0) System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1421,7 +1522,7 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) System.Security.Cryptography.Algorithms (4.3.1) - restriction: && (< net461) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1454,9 +1555,9 @@ NUGET System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (8.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) + System.Formats.Asn1 (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net463) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) @@ -1467,18 +1568,15 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) + System.Security.Cryptography.ProtectedData (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) - System.Security.Permissions (7.0) - restriction: >= netstandard2.0 - System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (< net472) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.6) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (8.0) - restriction: && (< net472) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encoding.Extensions (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1486,6 +1584,18 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) + System.Text.Encodings.Web (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Json (8.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) + Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) + System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.ValueTuple (>= 4.5) - restriction: >= net462 System.Threading (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) @@ -1493,11 +1603,11 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) System.Threading.Thread (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.ThreadPool (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.ValueTuple (4.5) - restriction: >= net461 - System.Windows.Extensions (7.0) - restriction: >= net6.0 - System.Drawing.Common (>= 7.0) - restriction: >= net6.0 + System.ValueTuple (4.5) - restriction: || (>= net461) (&& (>= net462) (>= netstandard2.0)) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 3215f298..2cb0de70 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -34,7 +34,7 @@ module internal BFS = let containsNonZero = Vector.exists Predicates.isSome clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = @@ -87,7 +87,7 @@ module internal BFS = let fillSubVectorTo = Vector.assignByMaskInPlace Mask.assign clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = @@ -159,7 +159,7 @@ module internal BFS = ClArray.count Predicates.isSome clContext workGroupSize //Push or pull functions - let getNNZ (queue: MailboxProcessor) (v: ClVector) = + let getNNZ (queue: DeviceCommandQueue) (v: ClVector) = match v with | ClVector.Sparse v -> v.NNZ | ClVector.Dense v -> countNNZ queue v @@ -169,7 +169,7 @@ module internal BFS = let push nnz size = (float32 nnz) / (float32 size) <= SPARSITY - fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index b7c82e6a..c7c1ba38 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -20,7 +20,7 @@ module internal MSBFS = ClArray.mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + Common.PrefixSum.standardExcludeInPlace clContext workGroupSize let scatterIndices = Scatter.lastOccurrence clContext workGroupSize @@ -28,7 +28,7 @@ module internal MSBFS = let scatterValues = Scatter.lastOccurrence clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> invert queue intersection @@ -72,7 +72,7 @@ module internal MSBFS = let findIntersection = Intersect.findKeysIntersection clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (level: int) (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (level: int) (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. let intersection = @@ -114,7 +114,7 @@ module internal MSBFS = let updateFrontAndLevels = updateFrontAndLevels clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix<'a>) (source: int list) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix<'a>) (source: int list) -> let vertexCount = matrix.RowCount let sourceVertexCount = source.Length @@ -173,7 +173,7 @@ module internal MSBFS = let copyIndices = ClArray.copyTo clContext workGroupSize - fun (queue: MailboxProcessor) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> + fun (queue: DeviceCommandQueue) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. let intersection = @@ -208,7 +208,7 @@ module internal MSBFS = let updateFrontAndParents = updateFrontAndParents clContext workGroupSize - fun (queue: MailboxProcessor) (inputMatrix: ClMatrix<'a>) (source: int list) -> + fun (queue: DeviceCommandQueue) (inputMatrix: ClMatrix<'a>) (source: int list) -> let vertexCount = inputMatrix.RowCount let sourceVertexCount = source.Length diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index eecff073..7421d28e 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -16,7 +16,7 @@ module PageRank = type PageRankMatrix = | PreparedMatrix of ClMatrix - member this.Dispose(processor: MailboxProcessor) = + member this.Dispose(processor: DeviceCommandQueue) = match this with | PreparedMatrix matrix -> matrix.Dispose processor @@ -38,7 +38,7 @@ module PageRank = let zeroCreate = GraphBLAS.FSharp.ClArray.zeroCreate clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix.CSR) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix.CSR) -> let outDegree: ClArray = zeroCreate queue DeviceOnly matrix.ColumnCount @@ -96,7 +96,7 @@ module PageRank = let multiply = clContext.Compile multiply - fun (queue: MailboxProcessor) (matrix: ClMatrix) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix) -> match matrix with | ClMatrix.CSR matrix -> @@ -162,7 +162,7 @@ module PageRank = let create = GraphBLAS.FSharp.Vector.create clContext workGroupSize - fun (queue: MailboxProcessor) (PreparedMatrix matrix) accuracy -> + fun (queue: DeviceCommandQueue) (PreparedMatrix matrix) accuracy -> let vertexCount = matrix.RowCount //None is 0 diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi index 290f6a1f..7c20f94f 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi @@ -7,8 +7,8 @@ open GraphBLAS.FSharp.Objects module PageRank = [] type PageRankMatrix = - member Dispose : MailboxProcessor -> unit + member Dispose : DeviceCommandQueue -> unit - val internal prepareMatrix : ClContext -> int -> (MailboxProcessor -> ClMatrix -> PageRankMatrix) + val internal prepareMatrix : ClContext -> int -> (DeviceCommandQueue -> ClMatrix -> PageRankMatrix) - val internal run : ClContext -> int -> (MailboxProcessor -> PageRankMatrix -> float32 -> ClVector) + val internal run : ClContext -> int -> (DeviceCommandQueue -> PageRankMatrix -> float32 -> ClVector) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 489a796c..7b7d9fe9 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -33,7 +33,7 @@ module internal SSSP = let containsNonZero = Vector.exists Predicates.isSome clContext workGroupSize - fun (queue: MailboxProcessor) (matrix: ClMatrix) (source: int) -> + fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount //None is System.Int32.MaxValue diff --git a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs index 889cd43f..f415c7a8 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs @@ -24,7 +24,7 @@ module Bitmap = let kernel = clContext.Compile(getUniqueBitmap) - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) -> let inputLength = inputArray.Length @@ -67,7 +67,7 @@ module Bitmap = let firstGetBitmap = getUniqueBitmap clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> let firstBitmap = firstGetBitmap processor DeviceOnly firstArray diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index ad6b3caf..642be5c9 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -28,7 +28,7 @@ module ClArray = let program = clContext.Compile(init) - fun (processor: MailboxProcessor<_>) allocationMode (length: int) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (length: int) -> let outputArray = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) @@ -59,7 +59,7 @@ module ClArray = let program = clContext.Compile(create) - fun (processor: MailboxProcessor<_>) allocationMode (length: int) (value: 'a) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (length: int) (value: 'a) -> let value = clContext.CreateClCell(value) let outputArray = @@ -85,7 +85,7 @@ module ClArray = let create = create clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode length -> + fun (processor: DeviceCommandQueue<_>) allocationMode length -> create processor allocationMode length Unchecked.defaultof<'a> /// @@ -104,7 +104,7 @@ module ClArray = let program = clContext.Compile(copy) - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(inputArray.Length, workGroupSize) @@ -137,7 +137,7 @@ module ClArray = let program = clContext.Compile(copy) - fun (processor: MailboxProcessor<_>) (source: ClArray<'a>) (destination: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (source: ClArray<'a>) (destination: ClArray<'a>) -> if source.Length <> destination.Length then failwith "The source array length differs from the destination array length." @@ -167,7 +167,7 @@ module ClArray = let kernel = clContext.Compile(replicate) - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) count -> + fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) count -> let outputArrayLength = inputArray.Length * count let outputArray = @@ -202,15 +202,15 @@ module ClArray = Bitmap.lastOccurrence clContext workGroupSize let prefixSumExclude = - PrefixSum.runExcludeInPlace <@ (+) @> clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> let bitmap = getUniqueBitmap processor DeviceOnly inputArray let resultLength = - (prefixSumExclude processor bitmap 0) + (prefixSumExclude processor bitmap) .ToHostAndFree(processor) let outputArray = @@ -242,7 +242,7 @@ module ClArray = let kernel = clContext.Compile exists - fun (processor: MailboxProcessor<_>) (vector: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (vector: ClArray<'a>) -> let result = clContext.CreateClCell false @@ -284,7 +284,7 @@ module ClArray = let kernel = clContext.Compile assign - fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (positions: ClArray) (result: ClArray<'b>) -> + fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (positions: ClArray) (result: ClArray<'b>) -> if values.Length <> positions.Length then failwith "Lengths must be the same" @@ -314,12 +314,12 @@ module ClArray = Map.map<'a, int> (Map.chooseBitmap predicate) clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let assignValues = assignOption predicate clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (sourceValues: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (sourceValues: ClArray<'a>) -> let positions = getBitmap processor DeviceOnly sourceValues @@ -371,7 +371,7 @@ module ClArray = let kernel = clContext.Compile assign - fun (processor: MailboxProcessor<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (positions: ClArray) (result: ClArray<'c>) -> + fun (processor: DeviceCommandQueue<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (positions: ClArray) (result: ClArray<'c>) -> if firstValues.Length <> secondValues.Length || secondValues.Length <> positions.Length then @@ -410,12 +410,12 @@ module ClArray = Map.map2<'a, 'b, int> (Map.choose2Bitmap predicate) clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let assignValues = assignOption2 predicate clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) -> let positions = getBitmap processor DeviceOnly firstValues secondValues @@ -450,7 +450,7 @@ module ClArray = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (sourceArray: ClArray<'a>) startIndex count -> + fun (processor: DeviceCommandQueue<_>) allocationMode (sourceArray: ClArray<'a>) startIndex count -> if count <= 0 then failwith "Count must be greater than zero" @@ -486,7 +486,7 @@ module ClArray = let sub = sub clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode chunkSize (sourceArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode chunkSize (sourceArray: ClArray<'a>) -> if chunkSize <= 0 then failwith "The size of the chunk cannot be less than 1" @@ -513,7 +513,7 @@ module ClArray = let chunkBySizeLazy = lazyChunkBySize clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode chunkSize (sourceArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode chunkSize (sourceArray: ClArray<'a>) -> chunkBySizeLazy processor allocationMode chunkSize sourceArray |> Seq.map (fun lazyValue -> lazyValue.Value) |> Seq.toArray @@ -538,7 +538,7 @@ module ClArray = let kernel = clContext.Compile assign - fun (processor: MailboxProcessor<_>) (sourceArray: ClArray<'a>) sourceIndex (targetArray: ClArray<'a>) targetIndex count -> + fun (processor: DeviceCommandQueue<_>) (sourceArray: ClArray<'a>) sourceIndex (targetArray: ClArray<'a>) targetIndex count -> if count = 0 then // nothing to do () @@ -575,7 +575,7 @@ module ClArray = let blit = blit clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (sourceArrays: ClArray<'a> seq) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (sourceArrays: ClArray<'a> seq) -> let resultLength = sourceArrays @@ -613,7 +613,7 @@ module ClArray = let kernel = clContext.Compile fill - fun (processor: MailboxProcessor<_>) value firstPosition count (targetArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) value firstPosition count (targetArray: ClArray<'a>) -> if count = 0 then () else @@ -651,7 +651,7 @@ module ClArray = let map = Map.map2 <@ fun first second -> (first, second) @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (values: ClArray<'a>) -> if values.Length > 1 then let resultLength = values.Length - 1 @@ -693,7 +693,7 @@ module ClArray = let program = clContext.Compile(kernel) - fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (value: ClCell<'a>) -> + fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (value: ClCell<'a>) -> let result = clContext.CreateClCell Unchecked.defaultof<'b> @@ -744,7 +744,7 @@ module ClArray = let program = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (index: int) (array: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (index: int) (array: ClArray<'a>) -> if index < 0 || index >= array.Length then failwith "Index out of range" @@ -778,7 +778,7 @@ module ClArray = let program = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) (index: int) (value: 'a) -> + fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) (index: int) (value: 'a) -> if index < 0 || index >= array.Length then failwith "Index out of range" @@ -800,7 +800,7 @@ module ClArray = let getBitmap = Map.map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize - fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) -> let bitmap = getBitmap processor DeviceOnly array @@ -878,12 +878,12 @@ module ClArray = mapInPlace ArithmeticOperations.intNotQ clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let scatter = Scatter.lastOccurrence clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (excludeBitmap: ClArray) (inputArray: ClArray<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (excludeBitmap: ClArray) (inputArray: ClArray<'a>) -> invert queue excludeBitmap diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index c1481690..eb3c7169 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -211,7 +211,7 @@ module Common = /// Should be a power of 2 and greater than 1. /// Associative binary operation. /// Zero element for binary operation. - let runExcludeInPlace plus = PrefixSum.runExcludeInPlace plus + let runExcludeInPlace plus = ScanInternal.runExcludeInPlace plus /// /// Include in-place prefix sum. @@ -267,7 +267,7 @@ module Common = /// > val sum = [| 4 |] /// /// - let standardExcludeInPlace = PrefixSum.standardExcludeInPlace + let standardExcludeInPlace = ScanInternal.standardExcludeInPlace /// /// Include in-place prefix sum of integer array with addition operation and start value that is equal to 0. diff --git a/src/GraphBLAS-sharp.Backend/Common/Gather.fs b/src/GraphBLAS-sharp.Backend/Common/Gather.fs index 32d90859..9e253c7a 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Gather.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Gather.fs @@ -34,7 +34,7 @@ module Gather = let program = clContext.Compile gather - fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> let kernel = program.GetKernel() @@ -76,7 +76,7 @@ module Gather = let program = clContext.Compile gather - fun (processor: MailboxProcessor<_>) (positions: ClArray) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (positions: ClArray) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> if positions.Length <> outputArray.Length then failwith "Lengths must be the same" diff --git a/src/GraphBLAS-sharp.Backend/Common/Map.fs b/src/GraphBLAS-sharp.Backend/Common/Map.fs index 2459e1ef..e794d62c 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Map.fs @@ -25,7 +25,7 @@ module Map = let kernel = clContext.Compile map - fun (processor: MailboxProcessor<_>) allocationMode (inputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) -> let result = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) @@ -60,7 +60,7 @@ module Map = let kernel = clContext.Compile map - fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(inputArray.Length, workGroupSize) @@ -91,7 +91,7 @@ module Map = let kernel = clContext.Compile map - fun (processor: MailboxProcessor<_>) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> let result = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) @@ -136,7 +136,7 @@ module Map = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> + fun (processor: DeviceCommandQueue<_>) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> let ndRange = Range1D.CreateValid(resultArray.Length, workGroupSize) @@ -164,7 +164,7 @@ module Map = let map2 = map2InPlace<'a, 'b, 'c> map clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> let resultArray = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftArray.Length) diff --git a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs index a56af91f..e269c0bc 100644 --- a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs @@ -25,7 +25,7 @@ module PrefixSum = let program = clContext.Compile(update) - fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (bunchLength: int) (mirror: bool) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (bunchLength: int) (mirror: bool) -> let kernel = program.GetKernel() @@ -93,7 +93,7 @@ module PrefixSum = let program = clContext.Compile(scan) - fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (verticesLength: int) (totalSum: ClCell<'a>) (zero: 'a) (mirror: bool) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (verticesLength: int) (totalSum: ClCell<'a>) (zero: 'a) (mirror: bool) -> // TODO: передавать zero как константу let zero = clContext.CreateClCell(zero) @@ -153,7 +153,9 @@ module PrefixSum = let update = update opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) (zero: 'a) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (zero: 'a) -> + + failwith "AAAAAAAAAAAAAAAAAA" let firstVertices = clContext.CreateClArray<'a>( @@ -229,7 +231,7 @@ module PrefixSum = let scan = runExcludeInPlace <@ (+) @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) (inputArray: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray) -> scan processor inputArray 0 @@ -254,7 +256,7 @@ module PrefixSum = let scan = runIncludeInPlace <@ (+) @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) (inputArray: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray) -> scan processor inputArray 0 @@ -286,7 +288,7 @@ module PrefixSum = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) uniqueKeysCount (values: ClArray<'a>) (keys: ClArray) (offsets: ClArray) -> + fun (processor: DeviceCommandQueue<_>) uniqueKeysCount (values: ClArray<'a>) (keys: ClArray) (offsets: ClArray) -> let kernel = kernel.GetKernel() diff --git a/src/GraphBLAS-sharp.Backend/Common/Scan.fs b/src/GraphBLAS-sharp.Backend/Common/Scan.fs new file mode 100644 index 00000000..c47613d4 --- /dev/null +++ b/src/GraphBLAS-sharp.Backend/Common/Scan.fs @@ -0,0 +1,270 @@ +namespace GraphBLAS.FSharp.Backend.Common + +open Brahma.FSharp +open FSharp.Quotations +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions + +module internal ScanInternal = + + let private preScan + (opAdd: Expr<'a -> 'a -> 'a>) + (zero: 'a) + (saveSum: bool) + (clContext: ClContext) + (workGroupSize: int) + = + + let blockSize = + min clContext.ClDevice.MaxWorkGroupSize 256 + + let valuesPerBlock = 2 * blockSize + let numberOfMemBanks = 32 + + let localArraySize = + valuesPerBlock + + (valuesPerBlock / numberOfMemBanks) + + let getIndex = + <@ fun index -> index + (index / numberOfMemBanks) @> + + let preScan = + <@ fun (ndRange: Range1D) (valuesLength: int) (valuesBuffer: ClArray<'a>) (carryBuffer: ClArray<'a>) (totalSumCell: ClCell<'a>) -> + let gid = ndRange.GlobalID0 / blockSize + let lid = ndRange.LocalID0 + let gstart = gid * blockSize * 2 + + let sumValues = localArray<'a> localArraySize + + //Load values + if (gstart + lid + blockSize * 0) < valuesLength then + sumValues.[(%getIndex) (lid + blockSize * 0)] <- valuesBuffer.[gstart + lid + blockSize * 0] + else + sumValues.[(%getIndex) (lid + blockSize * 0)] <- zero + + + if (gstart + lid + blockSize * 1) < valuesLength then + sumValues.[(%getIndex) (lid + blockSize * 1)] <- valuesBuffer.[gstart + lid + blockSize * 1] + else + sumValues.[(%getIndex) (lid + blockSize * 1)] <- zero + + //Sweep up + let mutable offset = 1 + let mutable d = blockSize + + while d > 0 do + barrierLocal () + + if lid < d then + let ai = (%getIndex) (offset * (2 * lid + 1) - 1) + let bi = (%getIndex) (offset * (2 * lid + 2) - 1) + sumValues.[bi] <- (%opAdd) sumValues.[bi] sumValues.[ai] + + offset <- offset * 2 + d <- d / 2 + + barrierLocal () + + if lid = 0 then + let ai = (%getIndex) (2 * blockSize - 1) + carryBuffer.[gid] <- sumValues.[ai] + sumValues.[ai] <- zero + + // This condition means this thread will rewrite last element in array + // Saving it here for totalSum + if saveSum + && (gstart + lid + blockSize * 1 = valuesLength - 1 + || gstart + lid + blockSize * 0 = valuesLength - 1) then + totalSumCell.Value <- valuesBuffer.[valuesLength - 1] + + //Sweep down + d <- 1 + + while d <= blockSize do + barrierLocal () + + offset <- offset / 2 + + if lid < d then + let ai = (%getIndex) (offset * (2 * lid + 1) - 1) + let bi = (%getIndex) (offset * (2 * lid + 2) - 1) + + let tmp = sumValues.[ai] + sumValues.[ai] <- sumValues.[bi] + sumValues.[bi] <- (%opAdd) sumValues.[bi] tmp + + d <- d * 2 + + barrierLocal () + + if (gstart + lid + blockSize * 0) < valuesLength then + valuesBuffer.[gstart + lid + blockSize * 0] <- sumValues.[(%getIndex) (lid + blockSize * 0)] + + if (gstart + lid + blockSize * 1) < valuesLength then + valuesBuffer.[gstart + lid + blockSize * 1] <- sumValues.[(%getIndex) (lid + blockSize * 1)] @> + + let preScan = clContext.Compile(preScan) + + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (totalSum: ClCell<'a>) -> + let numberOfGroups = + inputArray.Length / valuesPerBlock + + (if inputArray.Length % valuesPerBlock = 0 then + 0 + else + 1) + + let carry = + clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, numberOfGroups) + + let ndRangePreScan = + Range1D.CreateValid(numberOfGroups * blockSize, blockSize) + + let preScanKernel = preScan.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> preScanKernel.KernelFunc ndRangePreScan inputArray.Length inputArray carry totalSum) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(preScanKernel)) + + carry, numberOfGroups > 1 + + let private scan (opAdd: Expr<'a -> 'a -> 'a>) (saveSum: bool) (clContext: ClContext) (workGroupSize: int) = + + let blockSize = + min clContext.ClDevice.MaxWorkGroupSize 256 + + let valuesPerBlock = 2 * blockSize + + let scan = + <@ fun (ndRange: Range1D) (valuesLength: int) (valuesBuffer: ClArray<'a>) (carryBuffer: ClArray<'a>) (totalSumCell: ClCell<'a>) -> + let gid = ndRange.GlobalID0 + 2 * blockSize + let cid = gid / (2 * blockSize) + + if gid < valuesLength then + valuesBuffer.[gid] <- (%opAdd) valuesBuffer.[gid] carryBuffer.[cid] + + if saveSum && gid = valuesLength - 1 then + totalSumCell.Value <- (%opAdd) totalSumCell.Value valuesBuffer.[gid] @> + + let scan = clContext.Compile(scan) + + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (carry: ClArray<'a>) (totalSum: ClCell<'a>) -> + let numberOfGroups = + inputArray.Length / valuesPerBlock + + (if inputArray.Length % valuesPerBlock = 0 then + 0 + else + 1) + + let ndRangeScan = + Range1D.CreateValid((numberOfGroups - 1) * valuesPerBlock, blockSize) + + let scan = scan.GetKernel() + + processor.Post( + Msg.MsgSetArguments(fun () -> scan.KernelFunc ndRangeScan inputArray.Length inputArray carry totalSum) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(scan)) + + let runExcludeInPlace plus zero (clContext: ClContext) workGroupSize = + + let blockSize = + min clContext.ClDevice.MaxWorkGroupSize 256 + + let valuesPerBlock = 2 * blockSize + + let getTotalSum = + <@ fun (ndRange: Range1D) (valuesLength: int) (valuesBuffer: ClArray<'a>) (totalSumCell: ClCell<'a>) -> + totalSumCell.Value <- (%plus) valuesBuffer.[valuesLength - 1] totalSumCell.Value @> + + let preScanSaveSum = + preScan plus zero true clContext workGroupSize + + let preScan = + preScan plus zero false clContext workGroupSize + + let scanSaveSum = scan plus true clContext workGroupSize + let scan = scan plus false clContext workGroupSize + let getTotalSum = clContext.Compile(getTotalSum) + + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> + + let totalSum = clContext.CreateClCell<'a>() + + let carry, needRecursion = + preScanSaveSum processor inputArray totalSum + + if not needRecursion then + carry.Free processor + + let ndRangeTotalSum = Range1D.CreateValid(1, 1) + let getTotalSum = getTotalSum.GetKernel() + + processor.Post( + Msg.MsgSetArguments + (fun () -> getTotalSum.KernelFunc ndRangeTotalSum inputArray.Length inputArray totalSum) + ) + + processor.Post(Msg.CreateRunMsg<_, _>(getTotalSum)) + else + let mutable carryStack = [ carry; inputArray ] + let mutable stop = not needRecursion + + // Run preScan for carry until we get fully scanned carry + // If during preScan numberOfGroups = 1 means input is fully scanned + while not stop do + let input = carryStack.Head + let carry, needRecursion = preScan processor input totalSum + + if needRecursion then + carryStack <- carry :: carryStack + else + stop <- true + carry.Free processor + + stop <- false + + // Run scan for each not fully scanned carry until we get inputArray scanned + while not stop do + match carryStack with + | carry :: inputCarry :: tail -> + if tail.IsEmpty then + scanSaveSum processor inputCarry carry totalSum + stop <- true + else + scan processor inputCarry carry totalSum + + carry.Free processor + carryStack <- carryStack.Tail + | _ -> failwith "carryStack always has at least 2 elements" + + totalSum + + /// + /// Exclude in-place prefix sum of integer array with addition operation and start value that is equal to 0. + /// + /// + /// + /// let arr = [| 1; 1; 1; 1 |] + /// let sum = [| 0 |] + /// runExcludeInplace clContext workGroupSize processor arr sum (+) 0 + /// |> ignore + /// ... + /// > val arr = [| 0; 1; 2; 3 |] + /// > val sum = [| 4 |] + /// + /// + /// ClContext. + /// Should be a power of 2 and greater than 1. + /// Note that maximum possible workGroupSize is used for better perfomance + let standardExcludeInPlace (clContext: ClContext) workGroupSize = + + let scan = + runExcludeInPlace <@ (+) @> 0 clContext workGroupSize + + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray) -> + + scan processor inputArray \ No newline at end of file diff --git a/src/GraphBLAS-sharp.Backend/Common/Scatter.fs b/src/GraphBLAS-sharp.Backend/Common/Scatter.fs index 82980465..60f359c4 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Scatter.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Scatter.fs @@ -26,7 +26,7 @@ module Scatter = let program = clContext.Compile(run) - fun (processor: MailboxProcessor<_>) (positions: ClArray) (values: ClArray<'a>) (result: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (positions: ClArray) (values: ClArray<'a>) (result: ClArray<'a>) -> if positions.Length <> values.Length then failwith "Lengths must be the same" @@ -114,7 +114,7 @@ module Scatter = let program = clContext.Compile(run) - fun (processor: MailboxProcessor<_>) (positions: ClArray) (result: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (positions: ClArray) (result: ClArray<'a>) -> let positionsLength = positions.Length diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs index 5aba906b..b1d7c95c 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs @@ -209,7 +209,7 @@ module Bitonic = let localStep = clContext.Compile(localStep) let globalStep = clContext.Compile(globalStep) - fun (queue: MailboxProcessor<_>) (rows: ClArray) (cols: ClArray) (values: ClArray<'a>) -> + fun (queue: DeviceCommandQueue<_>) (rows: ClArray) (cols: ClArray) (values: ClArray<'a>) -> let size = values.Length diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index b7db92d0..810f12d0 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -76,7 +76,7 @@ module internal Radix = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (indices: ClArray) (clWorkGroupCount: ClCell) (shift: ClCell) -> + fun (processor: DeviceCommandQueue<_>) (indices: ClArray) (clWorkGroupCount: ClCell) (shift: ClCell) -> let ndRange = Range1D.CreateValid(indices.Length, workGroupSize) @@ -133,7 +133,7 @@ module internal Radix = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (keys: ClArray) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (result: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (keys: ClArray) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (result: ClArray) -> let ndRange = Range1D.CreateValid(keys.Length, workGroupSize) @@ -156,11 +156,11 @@ module internal Radix = let count = count clContext workGroupSize mask let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let scatter = scatter clContext workGroupSize mask - fun (processor: MailboxProcessor<_>) (keys: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (keys: ClArray) -> if keys.Length <= 1 then copy processor DeviceOnly keys // TODO(allocation mode) else @@ -224,7 +224,7 @@ module internal Radix = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (keys: ClArray) (values: ClArray<'a>) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (keys: ClArray) (values: ClArray<'a>) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'a>) -> let ndRange = Range1D.CreateValid(keys.Length, workGroupSize) @@ -264,7 +264,7 @@ module internal Radix = let scatterByKey = scatterByKey clContext workGroupSize mask - fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> if values.Length <> keys.Length then failwith "Mismatch of key lengths and value. Lengths must be the same" @@ -332,7 +332,7 @@ module internal Radix = let runByKeys = runByKeys clContext workGroupSize defaultBitCount - fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> let keys, values = runByKeys processor allocationMode keys values diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 94a745c2..0735d28a 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -14,7 +14,7 @@ module Reduce = /// let private runGeneral (clContext: ClContext) workGroupSize scan scanToCell = - fun (processor: MailboxProcessor<_>) (inputArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> let scan = scan processor @@ -80,7 +80,7 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: MailboxProcessor<_>) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) @@ -117,7 +117,7 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: MailboxProcessor<_>) (valuesArray: ClArray<'a>) valuesLength -> + fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) @@ -149,7 +149,7 @@ module Reduce = let run = runGeneral clContext workGroupSize scan scanToCell - fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) -> run processor array + fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) -> run processor array let private scanReduce<'a when 'a: struct> (opAdd: Expr<'a -> 'a -> 'a>) @@ -179,7 +179,7 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: MailboxProcessor<_>) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) @@ -220,7 +220,7 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: MailboxProcessor<_>) (valuesArray: ClArray<'a>) valuesLength -> + fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) @@ -252,7 +252,7 @@ module Reduce = let run = runGeneral clContext workGroupSize scan scanToCell - fun (processor: MailboxProcessor<_>) (array: ClArray<'a>) -> run processor array + fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) -> run processor array /// /// Reduction of an array of values by an array of keys. @@ -295,7 +295,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -352,7 +352,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -448,7 +448,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> if keys.Length > workGroupSize then failwith "The length of the value should not exceed the size of the workgroup" @@ -529,9 +529,9 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> let offsets = getUniqueBitmap processor DeviceOnly keys @@ -661,9 +661,9 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) @@ -772,7 +772,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -845,7 +845,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -940,9 +940,9 @@ module Reduce = Scatter.lastOccurrence clContext workGroupSize let prefixSum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) diff --git a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj index cac6456d..dd6fa038 100644 --- a/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj +++ b/src/GraphBLAS-sharp.Backend/GraphBLAS-sharp.Backend.fsproj @@ -13,7 +13,6 @@ - @@ -32,6 +31,7 @@ + diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs index d5a326a3..0ac96889 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs @@ -30,7 +30,7 @@ module internal Intersect = let kernel = clContext.Compile <| findIntersection - fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> let bitmapSize = leftMatrix.NNZ diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs index 5d99f062..7903c711 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs @@ -40,7 +40,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> + fun (processor: DeviceCommandQueue<_>) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -94,7 +94,7 @@ module internal Map = let setPositions = Common.setPositions<'b> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> let bitmap, values, rows, columns = map queue matrix.RowCount matrix.ColumnCount matrix.Values matrix.Rows matrix.Columns diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs index a728d546..7f27dc1a 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs @@ -44,7 +44,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> + fun (processor: DeviceCommandQueue<_>) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -105,7 +105,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> let bitmap, values, rows, columns = map2 @@ -176,7 +176,7 @@ module internal Map2 = let kernel = clContext.Compile(preparePositions) - fun (processor: MailboxProcessor<_>) (allRows: ClArray) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (allRows: ClArray) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> let length = leftValues.Length let ndRange = @@ -227,7 +227,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> let allRows, allColumns, leftMergedValues, rightMergedValues, isLeft = merge queue matrixLeft matrixRight diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 5c7838fc..8f1044c5 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -22,7 +22,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: COO<'a>) -> { Context = clContext RowCount = matrix.RowCount ColumnCount = matrix.ColumnCount @@ -83,7 +83,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> let resultRows = copy processor allocationMode matrix.Rows @@ -124,7 +124,7 @@ module Matrix = let scan = Common.PrefixSum.runBackwardsIncludeInPlace <@ min @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (rowIndices: ClArray) rowCount -> + fun (processor: DeviceCommandQueue<_>) allocationMode (rowIndices: ClArray) rowCount -> let nnz = rowIndices.Length @@ -154,7 +154,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> let rowPointers = prepare processor allocationMode matrix.Rows matrix.RowCount @@ -180,7 +180,7 @@ module Matrix = let toCSRInPlace (clContext: ClContext) workGroupSize = let prepare = compressRows clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> let rowPointers = prepare processor allocationMode matrix.Rows matrix.RowCount @@ -204,7 +204,7 @@ module Matrix = let sort = Common.Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.COO<'a>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.COO<'a>) -> sort queue matrix.Columns matrix.Rows matrix.Values { Context = clContext @@ -227,7 +227,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> { Context = clContext RowCount = matrix.RowCount @@ -288,7 +288,7 @@ module Matrix = let blitData = ClArray.blit clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode startRow count (matrix: ClMatrix.COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode startRow count (matrix: ClMatrix.COO<'a>) -> if count <= 0 then failwith "Count must be greater than zero" diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs index 1401f3cc..4683a32f 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs @@ -132,7 +132,7 @@ module Merge = let kernel = clContext.Compile(merge) - fun (processor: MailboxProcessor<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> + fun (processor: DeviceCommandQueue<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> let firstSide = leftMatrix.Columns.Length let secondSide = rightMatrix.Columns.Length @@ -199,7 +199,7 @@ module Merge = let merge = run clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'a>) -> let length = leftMatrix.Columns.Length diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs index 8d068d09..3b024e15 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs @@ -41,7 +41,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions op - fun (processor: MailboxProcessor<_>) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> + fun (processor: DeviceCommandQueue<_>) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -94,7 +94,7 @@ module internal Map = let setPositions = Common.setPositions<'b> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> let bitmap, values, rows, columns = map queue matrix.RowCount matrix.ColumnCount matrix.Values matrix.RowPointers matrix.Columns @@ -144,7 +144,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions op - fun (processor: MailboxProcessor<_>) (operand: ClCell<'a option>) (matrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) (operand: ClCell<'a option>) (matrix: ClMatrix.CSR<'b>) -> let resultLength = matrix.RowCount * matrix.ColumnCount @@ -198,7 +198,7 @@ module internal Map = let setPositions = Common.setPositionsOption<'c> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (value: 'a option) (matrix: ClMatrix.CSR<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (value: 'a option) (matrix: ClMatrix.CSR<'b>) -> let valueClCell = clContext.CreateClCell value let bitmap, values, rows, columns = mapWithValue queue valueClCell matrix diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs index 70599c16..9ae65f96 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs @@ -46,7 +46,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> + fun (processor: DeviceCommandQueue<_>) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -105,7 +105,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> let bitmap, values, rows, columns = map2 @@ -166,7 +166,7 @@ module internal Map2 = let kernel = clContext.Compile(preparePositions) - fun (processor: MailboxProcessor<_>) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isEndOfRow: ClArray) (isLeft: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isEndOfRow: ClArray) (isLeft: ClArray) -> let length = leftValues.Length let ndRange = @@ -212,7 +212,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> let allRows, allColumns, leftMergedValues, rightMergedValues, isRowEnd, isLeft = merge queue matrixLeft matrixRight diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 0bea32dd..36125b3d 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -32,7 +32,7 @@ module Matrix = let program = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, matrix.Columns.Length) @@ -77,7 +77,7 @@ module Matrix = let program = clContext.Compile kernel - fun (processor: MailboxProcessor<_>) (row: int) (column: int) (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) (row: int) (column: int) (matrix: ClMatrix.CSR<'a>) -> if row < 0 || row >= matrix.RowCount then failwith "Row out of range" @@ -128,7 +128,7 @@ module Matrix = let blitData = ClArray.blit clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode startIndex count (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode startIndex count (matrix: ClMatrix.CSR<'a>) -> if count <= 0 then failwith "Count must be greater than zero" @@ -202,7 +202,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = prepare processor allocationMode matrix let cols = @@ -228,7 +228,7 @@ module Matrix = let prepare = expandRowPointers clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = prepare processor allocationMode matrix processor.Post(Msg.CreateFreeMsg(matrix.RowPointers)) @@ -298,7 +298,7 @@ module Matrix = let toCSRInPlace = COO.Matrix.toCSRInPlace clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> toCOOInPlace queue allocationMode matrix |> transposeInPlace queue |> toCSRInPlace queue allocationMode @@ -318,7 +318,7 @@ module Matrix = let toCSRInPlace = COO.Matrix.toCSRInPlace clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> toCOO queue allocationMode matrix |> transposeInPlace queue |> toCSRInPlace queue allocationMode @@ -334,7 +334,7 @@ module Matrix = let getChunkIndices = ClArray.sub clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> let getChunkValues = getChunkValues processor allocationMode matrix.Values @@ -372,7 +372,7 @@ module Matrix = let runLazy = byRowsLazy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> runLazy processor allocationMode matrix |> Seq.map (fun lazyValue -> lazyValue.Value) @@ -385,7 +385,7 @@ module Matrix = let byRows = byRows clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = byRows processor allocationMode matrix |> Seq.toList @@ -407,7 +407,7 @@ module Matrix = let subtract = Backend.Common.Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> let pointerPairs = pairwise processor DeviceOnly matrix.RowPointers // since row pointers length in matrix always >= 2 diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs index 8376053e..479fa9be 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs @@ -161,7 +161,7 @@ module Merge = let kernel = clContext.Compile(merge) - fun (processor: MailboxProcessor<_>) (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> let firstLength = leftMatrix.Columns.Length let secondLength = rightMatrix.Columns.Length diff --git a/src/GraphBLAS-sharp.Backend/Matrix/Common.fs b/src/GraphBLAS-sharp.Backend/Matrix/Common.fs index e13b889e..9a36ea31 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/Common.fs @@ -19,7 +19,7 @@ module internal Common = let sum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) @@ -54,7 +54,7 @@ module internal Common = let sum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) diff --git a/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs index 9b3c2fbd..1f30a262 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs @@ -13,7 +13,7 @@ module Matrix = let concatValues = ClArray.concat clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: LIL<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: LIL<'a>) -> let rowsPointers = matrix.Rows diff --git a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs index b15c85e1..2012da6c 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs @@ -24,7 +24,7 @@ module Matrix = let vectorCopy = Sparse.Vector.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO m -> ClMatrix.COO @@ -75,7 +75,7 @@ module Matrix = let vectorCopyTo = Sparse.Vector.copyTo clContext workGroupSize - fun (processor: MailboxProcessor<_>) (source: ClMatrix<'a>) (destination: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) (source: ClMatrix<'a>) (destination: ClMatrix<'a>) -> if source.NNZ <> destination.NNZ || source.RowCount <> destination.RowCount || source.ColumnCount <> destination.ColumnCount then @@ -119,7 +119,7 @@ module Matrix = let rowsToCSR = LIL.Matrix.toCSR clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO m -> toCSR processor allocationMode m |> ClMatrix.CSR | ClMatrix.CSR _ -> copy processor allocationMode matrix @@ -144,7 +144,7 @@ module Matrix = let transposeInPlace = CSR.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO m -> toCSRInPlace processor allocationMode m @@ -171,7 +171,7 @@ module Matrix = let rowsToCSR = LIL.Matrix.toCSR clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO _ -> copy processor allocationMode matrix | ClMatrix.CSR m -> toCOO processor allocationMode m |> ClMatrix.COO @@ -198,7 +198,7 @@ module Matrix = let transposeInPlace = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO _ -> matrix | ClMatrix.CSR m -> @@ -229,7 +229,7 @@ module Matrix = let rowsToCSR = LIL.Matrix.toCSR clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.CSC _ -> copy processor allocationMode matrix | ClMatrix.CSR m -> @@ -262,7 +262,7 @@ module Matrix = let transposeCOOInPlace = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.CSC _ -> matrix | ClMatrix.CSR m -> @@ -292,7 +292,7 @@ module Matrix = let CSRToLIL = CSR.Matrix.toLIL clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.CSC m -> m.ToCSR @@ -325,7 +325,7 @@ module Matrix = let COOTransposeInPlace = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) matrix -> + fun (processor: DeviceCommandQueue<_>) matrix -> match matrix with | ClMatrix.COO m -> COOTransposeInPlace processor m |> ClMatrix.COO | ClMatrix.CSR m -> ClMatrix.CSC m.ToCSC @@ -352,7 +352,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode matrix -> + fun (processor: DeviceCommandQueue<_>) allocationMode matrix -> match matrix with | ClMatrix.COO m -> COOTranspose processor allocationMode m diff --git a/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs b/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs index c4176b66..5fff4723 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs @@ -1,21 +1,22 @@ namespace GraphBLAS.FSharp.Objects open Brahma.FSharp -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions module ArraysExtensions = type ClArray<'a> with - member this.FreeAndWait(q: MailboxProcessor) = + member this.FreeAndWait(q: DeviceCommandQueue) = q.Post(Msg.CreateFreeMsg this) - finish q + q.Synchronize() - member this.ToHost(q: MailboxProcessor) = + member this.ToHost(q: DeviceCommandQueue) = let dst = Array.zeroCreate this.Length - q.PostAndReply(fun ch -> Msg.CreateToHostMsg(this, dst, ch)) + q.Post(Msg.CreateToHostMsg(this, dst)) + q.Synchronize() + dst - member this.Free(q: MailboxProcessor<_>) = q.Post <| Msg.CreateFreeMsg this + member this.Free(q: DeviceCommandQueue<_>) = q.Post <| Msg.CreateFreeMsg this - member this.ToHostAndFree(q: MailboxProcessor<_>) = + member this.ToHostAndFree(q: DeviceCommandQueue<_>) = let result = this.ToHost q this.Free q diff --git a/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs b/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs index 20334aae..ab0ca5d3 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs @@ -4,13 +4,15 @@ open Brahma.FSharp module ClCellExtensions = type ClCell<'a> with - member this.ToHost(processor: MailboxProcessor<_>) = - processor.PostAndReply(fun ch -> Msg.CreateToHostMsg<_>(this, (Array.zeroCreate<'a> 1), ch)).[0] + member this.ToHost(processor: DeviceCommandQueue<_>) = + let res = Array.zeroCreate<'a> 1 + processor.Post(Msg.CreateToHostMsg(this, res)) + res.[0] - member this.Free(processor: MailboxProcessor<_>) = + member this.Free(processor: DeviceCommandQueue<_>) = processor.Post(Msg.CreateFreeMsg<_>(this)) - member this.ToHostAndFree(processor: MailboxProcessor<_>) = + member this.ToHostAndFree(processor: DeviceCommandQueue<_>) = let result = this.ToHost processor this.Free processor diff --git a/src/GraphBLAS-sharp.Backend/Objects/Common.fs b/src/GraphBLAS-sharp.Backend/Objects/Common.fs index 9efb172a..b4f945f7 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Common.fs @@ -3,4 +3,4 @@ open Brahma.FSharp type IDeviceMemObject = - abstract Dispose : MailboxProcessor -> unit + abstract Dispose : DeviceCommandQueue -> unit diff --git a/src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs b/src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs deleted file mode 100644 index fb56045c..00000000 --- a/src/GraphBLAS-sharp.Backend/Objects/MailboxProcessorExtensions.fs +++ /dev/null @@ -1,6 +0,0 @@ -namespace GraphBLAS.FSharp.Objects - -open Brahma.FSharp - -module MailboxProcessorExtensions = - let finish (q: MailboxProcessor) = q.PostAndReply(Msg.MsgNotifyMe) diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index 901cb6c3..c1146e2b 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -2,7 +2,6 @@ namespace GraphBLAS.FSharp.Objects open Brahma.FSharp open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Objects.MailboxProcessorExtensions type MatrixFormat = | CSR @@ -50,7 +49,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Rows)) q.Post(Msg.CreateFreeMsg<_>(this.ColumnPointers)) - finish q + q.Synchronize() member this.Dispose q = (this :> IDeviceMemObject).Dispose q @@ -77,7 +76,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.Values)) q.Post(Msg.CreateFreeMsg<_>(this.Columns)) q.Post(Msg.CreateFreeMsg<_>(this.Rows)) - finish q + q.Synchronize() member this.Dispose q = (this :> IDeviceMemObject).Dispose q @@ -115,7 +114,7 @@ module ClMatrix = q.Post(Msg.CreateFreeMsg<_>(this.RowIndices)) q.Post(Msg.CreateFreeMsg<_>(this.ColumnIndices)) q.Post(Msg.CreateFreeMsg<_>(this.Values)) - finish q + q.Synchronize() member this.Dispose q = (this :> IDeviceMemObject).Dispose q diff --git a/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs b/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs index 9ff810bf..c670715d 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs @@ -41,7 +41,7 @@ module internal Kronecker = let updateBitmap = clContext.Compile <| updateBitmap op - fun (processor: MailboxProcessor<_>) (operand: ClCell<'a>) (matrixRight: CSR<'b>) (bitmap: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (operand: ClCell<'a>) (matrixRight: CSR<'b>) (bitmap: ClArray) -> let resultLength = matrixRight.NNZ + 1 @@ -76,7 +76,7 @@ module internal Kronecker = let opOnHost = op.Evaluate() - fun (queue: MailboxProcessor<_>) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> + fun (queue: DeviceCommandQueue<_>) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> let nnz = match opOnHost None None with @@ -142,7 +142,7 @@ module internal Kronecker = let kernel = clContext.Compile <| preparePositions op - fun (processor: MailboxProcessor<_>) (operand: ClCell<'a>) (matrix: CSR<'b>) (resultDenseMatrix: ClArray<'c>) (resultBitmap: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (operand: ClCell<'a>) (matrix: CSR<'b>) (resultDenseMatrix: ClArray<'c>) (resultBitmap: ClArray) -> let resultLength = matrix.RowCount * matrix.ColumnCount @@ -193,7 +193,7 @@ module internal Kronecker = let scan = Common.PrefixSum.standardIncludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) rowCount columnCount (rowOffset: int) (columnOffset: int) (startIndex: int) (resultMatrix: COO<'c>) (values: ClArray<'c>) (bitmap: ClArray) -> + fun (processor: DeviceCommandQueue<_>) rowCount columnCount (rowOffset: int) (columnOffset: int) (startIndex: int) (resultMatrix: COO<'c>) (values: ClArray<'c>) (bitmap: ClArray) -> let sum = scan processor bitmap @@ -245,7 +245,7 @@ module internal Kronecker = let kernel = clContext.Compile <| copyToResult - fun (processor: MailboxProcessor<_>) startIndex (rowOffset: int) (columnOffset: int) (resultMatrix: COO<'c>) (sourceMatrix: COO<'c>) -> + fun (processor: DeviceCommandQueue<_>) startIndex (rowOffset: int) (columnOffset: int) (resultMatrix: COO<'c>) (sourceMatrix: COO<'c>) -> let ndRange = Range1D.CreateValid(sourceMatrix.NNZ, workGroupSize) @@ -367,7 +367,7 @@ module internal Kronecker = let insertZero = insertZero clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (resultNNZ: int) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (resultNNZ: int) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> let resultRows = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultNNZ) @@ -438,7 +438,7 @@ module internal Kronecker = let bitonic = Common.Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> let matrixZero = mapWithValue queue allocationMode None matrixRight diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index 2e99b7dc..e0af9487 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -29,7 +29,7 @@ module Operations = let mapDense = Dense.Vector.map op clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode matrix -> + fun (processor: DeviceCommandQueue<_>) allocationMode matrix -> match matrix with | ClVector.Sparse v -> mapSparse processor allocationMode v @@ -58,7 +58,7 @@ module Operations = let map2Sparse = Sparse.Vector.map2 op clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationMode left right @@ -88,7 +88,7 @@ module Operations = let map2Dense = Dense.Vector.map2AtLeastOne op clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) @@ -112,7 +112,7 @@ module Operations = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor left right left | _ -> failwith "Unsupported vector format" @@ -131,7 +131,7 @@ module Operations = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> match leftVector, rightVector, resultVector with | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result @@ -151,7 +151,7 @@ module Operations = let map2Dense = Dense.Vector.map2 map clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationFlag left right | _ -> failwith "Unsupported vector format" @@ -173,7 +173,7 @@ module Operations = let map2SparseDense = Sparse.Map2.runSparseDense map clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> Option.map ClVector.Sparse (map2Sparse processor allocationFlag left right) @@ -202,7 +202,7 @@ module Operations = let transposeCOO = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode matrix -> + fun (processor: DeviceCommandQueue<_>) allocationMode matrix -> match matrix with | ClMatrix.COO m -> mapCOO processor allocationMode m |> ClMatrix.COO | ClMatrix.CSR m -> mapCSR processor allocationMode m |> ClMatrix.COO @@ -235,7 +235,7 @@ module Operations = let transposeCOO = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode matrix1 matrix2 -> + fun (processor: DeviceCommandQueue<_>) allocationMode matrix1 matrix2 -> match matrix1, matrix2 with | ClMatrix.COO m1, ClMatrix.COO m2 -> map2COO processor allocationMode m1 m2 @@ -272,7 +272,7 @@ module Operations = let COOTranspose = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode matrix1 matrix2 -> + fun (processor: DeviceCommandQueue<_>) allocationMode matrix1 matrix2 -> match matrix1, matrix2 with | ClMatrix.COO m1, ClMatrix.COO m2 -> COOMap2 processor allocationMode m1 m2 @@ -304,7 +304,7 @@ module Operations = let runTo = SpMV.runTo add mul clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) (result: ClVector<'c>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) (result: ClVector<'c>) -> match matrix, vector, result with | ClMatrix.CSR m, ClVector.Dense v, ClVector.Dense r -> runTo queue m v r | _ -> failwith "Not implemented yet" @@ -325,7 +325,7 @@ module Operations = let run = SpMV.run add mul clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> match matrix, vector with | ClMatrix.CSR m, ClVector.Dense v -> run queue allocationFlag m v |> ClVector.Dense | _ -> failwith "Not implemented yet" @@ -347,7 +347,7 @@ module Operations = let run = SpMSpV.runBoolStandard add mul clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix) (vector: ClVector) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix) (vector: ClVector) -> match matrix, vector with | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) | _ -> failwith "Not implemented yet" @@ -369,7 +369,7 @@ module Operations = let run = SpMSpV.run add mul clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> match matrix, vector with | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) | _ -> failwith "Not implemented yet" @@ -386,7 +386,7 @@ module Operations = let kronecker (op: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) workGroupSize = let run = Kronecker.run clContext workGroupSize op - fun (queue: MailboxProcessor<_>) allocationFlag (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) -> + fun (queue: DeviceCommandQueue<_>) allocationFlag (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) -> match matrix1, matrix2 with | ClMatrix.CSR m1, ClMatrix.CSR m2 -> let result = run queue allocationFlag m1 m2 @@ -414,7 +414,7 @@ module Operations = let runCSRnCSC = SpGeMM.Masked.run opAdd opMul clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) (mask: ClMatrix<_>) -> + fun (queue: DeviceCommandQueue<_>) (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) (mask: ClMatrix<_>) -> match matrix1, matrix2, mask with | ClMatrix.CSR m1, ClMatrix.CSC m2, ClMatrix.COO mask -> runCSRnCSC queue m1 m2 mask |> ClMatrix.COO | _ -> failwith "Matrix formats are not matching" @@ -436,7 +436,7 @@ module Operations = let run = SpGeMM.Expand.run opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> match leftMatrix, rightMatrix with | ClMatrix.CSR leftMatrix, ClMatrix.CSR rightMatrix -> let allocCapacity = @@ -476,7 +476,7 @@ module Operations = let run = SpGeMM.Expand.COO.run opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> match leftMatrix, rightMatrix with | ClMatrix.COO leftMatrix, ClMatrix.CSR rightMatrix -> let allocCapacity = diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs index 45ff0df0..e476727c 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -20,7 +20,7 @@ module internal Expand = let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftMatrixColumns: ClArray) (rightMatrixRowsLengths: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (leftMatrixColumns: ClArray) (rightMatrixRowsLengths: ClArray) -> let segmentsLengths = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftMatrixColumns.Length) @@ -48,7 +48,7 @@ module internal Expand = let scatter = Common.Scatter.lastOccurrence clContext workGroupSize - fun (processor: MailboxProcessor<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (columns: ClArray) (rows: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (columns: ClArray) (rows: ClArray) -> let positions = getBitmap processor DeviceOnly firstValues secondValues @@ -112,7 +112,7 @@ module internal Expand = let rightMatrixGather = Common.Gather.run clContext workGroupSize - fun (processor: MailboxProcessor<_>) (lengths: int) (segmentsPointers: ClArray) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) (lengths: int) (segmentsPointers: ClArray) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> // Compute left matrix positions let leftMatrixPositions = zeroCreate processor DeviceOnly lengths @@ -182,7 +182,7 @@ module internal Expand = let sortKeys = Common.Sort.Radix.standardRunKeysOnly clContext workGroupSize - fun (processor: MailboxProcessor<_>) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> // sort by columns let valuesSortedByColumns = sortByKeyValues processor DeviceOnly columns values @@ -221,7 +221,7 @@ module internal Expand = let idScatter = Common.Scatter.initFirstOccurrence Map.id clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> let bitmap = getUniqueBitmap processor DeviceOnly columns rows @@ -259,7 +259,7 @@ module internal Expand = let reduce = reduce opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (rightMatrixRowsNNZ: ClArray) (rightMatrix: ClMatrix.CSR<'b>) (leftMatrix: ClMatrix.COO<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (rightMatrixRowsNNZ: ClArray) (rightMatrix: ClMatrix.CSR<'b>) (leftMatrix: ClMatrix.COO<'a>) -> let length, segmentPointers = getSegmentPointers processor leftMatrix.Columns rightMatrixRowsNNZ @@ -316,7 +316,7 @@ module internal Expand = let expandRowPointers = CSR.Matrix.expandRowPointers clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.CSR<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix.CSR<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> let rows = expandRowPointers processor DeviceOnly leftMatrix @@ -360,7 +360,7 @@ module internal Expand = let runCOO = runCOO opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.CSR<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.CSR<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> // extract segment lengths by left matrix rows pointers let segmentPointersByLeftMatrixRows = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftMatrix.RowPointers.Length) @@ -438,7 +438,7 @@ module internal Expand = let runManySteps = runManySteps opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> let rightMatrixRowsNNZ = getNNZInRows processor DeviceOnly rightMatrix @@ -505,7 +505,7 @@ module internal Expand = let runCOO = runCOO opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> let _, result = runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix leftMatrix @@ -539,7 +539,7 @@ module internal Expand = let runCOO = runCOO opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.COO<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.COO<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> let leftRowPointers = compress processor allocationMode leftMatrix.Rows leftMatrix.RowCount @@ -621,7 +621,7 @@ module internal Expand = let runManySteps = runManySteps opAdd opMul clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> let rightMatrixRowsNNZ = getNNZInRows processor DeviceOnly rightMatrix diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs index 8c4e600a..462d58fb 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs @@ -107,7 +107,7 @@ module internal Masked = let program = context.Compile(run) - fun (queue: MailboxProcessor<_>) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> + fun (queue: DeviceCommandQueue<_>) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> let values = context.CreateClArrayWithSpecificAllocationMode<'c>(DeviceOnly, mask.NNZ) @@ -160,7 +160,7 @@ module internal Masked = let scanInPlace = Common.PrefixSum.standardExcludeInPlace context workGroupSize - fun (queue: MailboxProcessor<_>) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> + fun (queue: DeviceCommandQueue<_>) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> let values, positions = calculate queue matrixLeft matrixRight mask diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs index bca119a1..691a8905 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -33,7 +33,7 @@ module SpMSpV = let collectRows = clContext.Compile collectRows - fun (queue: MailboxProcessor<_>) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> + fun (queue: DeviceCommandQueue<_>) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> let ndRange = Range1D.CreateValid(size * 2 + 1, workGroupSize) @@ -65,11 +65,11 @@ module SpMSpV = inputArray.[i] <- 0 @> let sum = - PrefixSum.standardExcludeInPlace clContext workGroupSize + ScanInternal.standardExcludeInPlace clContext workGroupSize let prepareOffsets = clContext.Compile prepareOffsets - fun (queue: MailboxProcessor<_>) size (input: ClArray) -> + fun (queue: DeviceCommandQueue<_>) size (input: ClArray) -> let ndRange = Range1D.CreateValid(size, workGroupSize) @@ -115,7 +115,7 @@ module SpMSpV = let gather = clContext.Compile gather - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> //Collect R[v] and R[v + 1] for each v in vector let collectedRows = @@ -185,7 +185,7 @@ module SpMSpV = let multiply = clContext.Compile multiply - fun (queue: MailboxProcessor<_>) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> + fun (queue: DeviceCommandQueue<_>) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> let resultLength = columnIndices.Length @@ -235,7 +235,7 @@ module SpMSpV = let segReduce = Reduce.ByKey.Option.segmentSequential add clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> gather queue matrix vector |> Option.map (fun (gatherRows, gatherIndices, gatherValues) -> @@ -276,7 +276,7 @@ module SpMSpV = let gather = gather clContext workGroupSize let sort = - Sort.Radix.standardRunKeysOnly clContext workGroupSize + Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize let removeDuplicates = GraphBLAS.FSharp.ClArray.removeDuplications clContext workGroupSize @@ -284,20 +284,18 @@ module SpMSpV = let create = GraphBLAS.FSharp.ClArray.create clContext workGroupSize - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> gather queue matrix vector |> Option.map (fun (gatherRows, gatherIndices, gatherValues) -> - gatherRows.Free queue - gatherValues.Free queue - - let sortedIndices = sort queue gatherIndices + sort queue gatherIndices gatherRows gatherValues - let resultIndices = removeDuplicates queue sortedIndices + let resultIndices = removeDuplicates queue gatherIndices gatherIndices.Free queue - sortedIndices.Free queue + gatherRows.Free queue + gatherValues.Free queue { Context = clContext Indices = resultIndices diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs index 34b5f821..c31937b7 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs @@ -97,7 +97,7 @@ module internal SpMV = let multiplyValues = clContext.Compile multiplyValues let reduceValuesByRows = clContext.Compile reduceValuesByRows - fun (queue: MailboxProcessor<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) (result: ClArray<'c option>) -> + fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) (result: ClArray<'c option>) -> let matrixLength = matrix.Values.Length @@ -151,7 +151,7 @@ module internal SpMV = = let runTo = runTo add mul clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) -> let result = clContext.CreateClArrayWithSpecificAllocationMode<'c option>(allocationMode, matrix.RowCount) diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 6b6a7629..bfb2ddea 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -18,7 +18,7 @@ module Vector = let map = Map.map op clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClArray<'a option>) -> map processor allocationMode leftVector @@ -31,7 +31,7 @@ module Vector = let map2InPlace = Map.map2InPlace opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> map2InPlace processor leftVector rightVector resultVector @@ -43,7 +43,7 @@ module Vector = let map2 = Map.map2 opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> map2 processor allocationMode leftVector rightVector @@ -66,7 +66,7 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(leftVector.Length, workGroupSize) @@ -93,7 +93,7 @@ module Vector = let assignByMask = assignByMaskInPlace maskOp clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> let resultVector = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftVector.Length) @@ -118,7 +118,7 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: MailboxProcessor<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(maskVector.NNZ, workGroupSize) @@ -164,7 +164,7 @@ module Vector = let allValues = Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClArray<'a option>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClArray<'a option>) -> let positions = getBitmap processor DeviceOnly vector @@ -208,7 +208,7 @@ module Vector = let reduce = Common.Reduce.reduce opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) (vector: ClArray<'a option>) -> + fun (processor: DeviceCommandQueue<_>) (vector: ClArray<'a option>) -> choose processor DeviceOnly vector |> function | Some values -> @@ -229,7 +229,7 @@ module Vector = let map = Backend.Common.Map.map <@ Some @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode size (elements: (int * 'a) list) -> + fun (processor: DeviceCommandQueue<_>) allocationMode size (elements: (int * 'a) list) -> let indices, values = elements |> Array.ofList |> Array.unzip let values = diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs index 8ad13044..00d7c760 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs @@ -12,7 +12,7 @@ module internal Common = let setPositions<'a when 'a: struct> (clContext: ClContext) workGroupSize = let sum = - Common.PrefixSum.standardExcludeInPlace clContext workGroupSize + Common.ScanInternal.standardExcludeInPlace clContext workGroupSize let valuesScatter = Common.Scatter.lastOccurrence clContext workGroupSize @@ -20,7 +20,7 @@ module internal Common = let indicesScatter = Common.Scatter.lastOccurrence clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) @@ -40,7 +40,7 @@ module internal Common = let setPositionsOption<'a when 'a: struct> (clContext: ClContext) workGroupSize = let sum = - Common.PrefixSum.standardExcludeInPlace clContext workGroupSize + Common.ScanInternal.standardExcludeInPlace clContext workGroupSize let valuesScatter = Common.Scatter.lastOccurrence clContext workGroupSize @@ -48,7 +48,7 @@ module internal Common = let indicesScatter = Common.Scatter.lastOccurrence clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) @@ -77,7 +77,7 @@ module internal Common = let mapIndices = Common.Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> - fun (processor: MailboxProcessor<_>) allocationMode (vectors: Sparse<'a> seq) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vectors: Sparse<'a> seq) -> let vectorIndices, _ = vectors diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs index f0a69a41..bcb874d2 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs @@ -37,7 +37,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) (size: int) (values: ClArray<'a>) (indices: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (size: int) (values: ClArray<'a>) (indices: ClArray) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, size) @@ -82,7 +82,7 @@ module internal Map = let setPositions = Common.setPositions<'b> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (vector: ClVector.Sparse<'a>) -> + fun (queue: DeviceCommandQueue<_>) allocationMode (vector: ClVector.Sparse<'a>) -> let bitmap, values, indices = map queue vector.Size vector.Values vector.Indices @@ -122,7 +122,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) (value: ClCell<'a option>) (vector: Sparse<'b>) -> + fun (processor: DeviceCommandQueue<_>) (value: ClCell<'a option>) (vector: Sparse<'b>) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vector.Size) @@ -176,7 +176,7 @@ module internal Map = let init = ClArray.init <@ id @> clContext workGroupSize - fun (queue: MailboxProcessor<_>) allocationMode (value: 'a option) size -> + fun (queue: DeviceCommandQueue<_>) allocationMode (value: 'a option) size -> function | Some vector -> let valueClCell = clContext.CreateClCell value diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index fb91840f..37fabd50 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -37,7 +37,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) @@ -82,7 +82,7 @@ module internal Map2 = let setPositions = Common.setPositionsOption clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> let bitmap, allValues, allIndices = prepare @@ -134,7 +134,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: MailboxProcessor<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> + fun (processor: DeviceCommandQueue<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) @@ -181,7 +181,7 @@ module internal Map2 = let setPositions = Common.setPositionsOption clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> let bitmap, allValues, allIndices = prepare processor leftVector.NNZ leftVector.Values leftVector.Indices rightVector @@ -232,7 +232,7 @@ module internal Map2 = let kernel = clContext.Compile <| assign op - fun (processor: MailboxProcessor<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) (value: ClCell<'a>) -> + fun (processor: DeviceCommandQueue<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) (value: ClCell<'a>) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) @@ -281,7 +281,7 @@ module internal Map2 = let setPositions = Common.setPositions clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> let valueCell = clContext.CreateClCell(value) @@ -337,7 +337,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions op - fun (processor: MailboxProcessor<_>) (allIndices: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> + fun (processor: DeviceCommandQueue<_>) (allIndices: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> let length = allIndices.Length @@ -383,7 +383,7 @@ module internal Map2 = let setPositions = Common.setPositionsOption clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> let allIndices, leftValues, rightValues, isLeft = merge processor leftVector rightVector diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs index 4c310edf..910fd64c 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs @@ -119,7 +119,7 @@ module internal Merge = let kernel = clContext.Compile merge - fun (processor: MailboxProcessor<_>) (firstVector: ClVector.Sparse<'a>) (secondVector: ClVector.Sparse<'b>) -> + fun (processor: DeviceCommandQueue<_>) (firstVector: ClVector.Sparse<'a>) (secondVector: ClVector.Sparse<'b>) -> let firstSide = firstVector.Indices.Length diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index 1a7fb8f7..02a0419f 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -15,7 +15,7 @@ module Vector = let copyData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: Sparse<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: Sparse<'a>) -> { Context = clContext Indices = copy processor allocationMode vector.Indices Values = copyData processor allocationMode vector.Values @@ -26,7 +26,7 @@ module Vector = let copyDataTo = ClArray.copyTo clContext workGroupSize - fun (processor: MailboxProcessor<_>) (source: Sparse<'a>) (destination: Sparse<'a>) -> + fun (processor: DeviceCommandQueue<_>) (source: Sparse<'a>) (destination: Sparse<'a>) -> copyTo processor source.Indices destination.Indices copyDataTo processor source.Values destination.Values @@ -59,7 +59,7 @@ module Vector = let create = ClArray.zeroCreate clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector.Sparse<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector.Sparse<'a>) -> let resultVector = create processor allocationMode vector.Size @@ -83,7 +83,7 @@ module Vector = let reduce = Common.Reduce.reduce opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) (vector: ClVector.Sparse<'a>) -> reduce processor vector.Values + fun (processor: DeviceCommandQueue<_>) (vector: ClVector.Sparse<'a>) -> reduce processor vector.Values let ofList (clContext: ClContext) allocationMode size (elements: (int * 'a) list) = let indices, values = diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index bbba4404..41a12774 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -22,7 +22,7 @@ module Vector = let create (clContext: ClContext) workGroupSize = let create = ClArray.create clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode size format value -> + fun (processor: DeviceCommandQueue<_>) allocationMode size format value -> match format with | Sparse -> failwith "Attempting to create full sparse vector" | Dense -> @@ -37,7 +37,7 @@ module Vector = let zeroCreate (clContext: ClContext) workGroupSize = let create = create clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode size format -> + fun (processor: DeviceCommandQueue<_>) allocationMode size format -> create processor allocationMode size format None /// @@ -55,7 +55,7 @@ module Vector = let map = Common.Map.map <@ Some @> clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode format size (elements: (int * 'a) list) -> + fun (processor: DeviceCommandQueue<_>) allocationMode format size (elements: (int * 'a) list) -> match format with | Sparse -> let indices, values = @@ -102,7 +102,7 @@ module Vector = let copyOptionData = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) -> match vector with | ClVector.Sparse vector -> ClVector.Sparse @@ -123,7 +123,7 @@ module Vector = let copy = copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) -> match vector with | ClVector.Dense vector -> ClVector.Sparse @@ -142,7 +142,7 @@ module Vector = let copy = ClArray.copy clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector<'a>) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) -> match vector with | ClVector.Dense vector -> ClVector.Dense @@ -159,7 +159,7 @@ module Vector = let denseFillVector = Dense.Vector.assignByMask op clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationMode (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> + fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> match vector, mask with | ClVector.Sparse vector, ClVector.Sparse mask -> ClVector.Sparse @@ -199,7 +199,7 @@ module Vector = let assignBySparse = Dense.Vector.assignBySparseMaskInPlace op clContext workGroupSize - fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> + fun (processor: DeviceCommandQueue<_>) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> match vector, mask with | ClVector.Dense vector, ClVector.Dense mask -> assignByDense processor vector mask value vector | ClVector.Dense vector, ClVector.Sparse mask -> assignBySparse processor vector mask value vector @@ -229,7 +229,7 @@ module Vector = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor left right left | _ -> failwith "Unsupported vector format" @@ -248,7 +248,7 @@ module Vector = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: MailboxProcessor<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> + fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> match leftVector, rightVector, resultVector with | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result | _ -> failwith "Unsupported vector format" @@ -267,7 +267,7 @@ module Vector = let map2Dense = Dense.Vector.map2 map clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationFlag left right | _ -> failwith "Unsupported vector format" @@ -289,7 +289,7 @@ module Vector = let map2SparseDense = Sparse.Map2.runSparseDense map clContext workGroupSize - fun (processor: MailboxProcessor<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> Option.map ClVector.Sparse (map2Sparse processor allocationFlag left right) @@ -308,7 +308,7 @@ module Vector = let existsDense = ClArray.exists predicate clContext workGroupSize - fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) -> + fun (processor: DeviceCommandQueue<_>) (vector: ClVector<'a>) -> match vector with | ClVector.Dense vector -> existsDense processor vector | _ -> failwith "Unsupported format" @@ -332,7 +332,7 @@ module Vector = let denseReduce = Dense.Vector.reduce opAdd clContext workGroupSize - fun (processor: MailboxProcessor<_>) (vector: ClVector<'a>) -> + fun (processor: DeviceCommandQueue<_>) (vector: ClVector<'a>) -> match vector with | ClVector.Sparse vector -> sparseReduce processor vector | ClVector.Dense vector -> denseReduce processor vector diff --git a/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs b/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs index a0e8332a..80cb8bda 100644 --- a/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs +++ b/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs @@ -9,68 +9,68 @@ open GraphBLAS.FSharp.Objects.ClVectorExtensions module MatrixExtensions = // Matrix.Free type ClMatrix.COO<'a when 'a: struct> with - member this.Free(q: MailboxProcessor<_>) = + member this.Free(q: DeviceCommandQueue<_>) = this.Columns.Free q this.Values.Free q this.Rows.Free q - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: DeviceCommandQueue<_>) = { RowCount = this.RowCount ColumnCount = this.ColumnCount Rows = this.Rows.ToHost q Columns = this.Columns.ToHost q Values = this.Values.ToHost q } - member this.ToHostAndFree(q: MailboxProcessor<_>) = + member this.ToHostAndFree(q: DeviceCommandQueue<_>) = let result = this.ToHost q this.Free q result type ClMatrix.CSR<'a when 'a: struct> with - member this.Free(q: MailboxProcessor<_>) = + member this.Free(q: DeviceCommandQueue<_>) = this.Values.Free q this.Columns.Free q this.RowPointers.Free q - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: DeviceCommandQueue<_>) = { RowCount = this.RowCount ColumnCount = this.ColumnCount RowPointers = this.RowPointers.ToHost q ColumnIndices = this.Columns.ToHost q Values = this.Values.ToHost q } - member this.ToHostAndFree(q: MailboxProcessor<_>) = + member this.ToHostAndFree(q: DeviceCommandQueue<_>) = let result = this.ToHost q this.Free q result type ClMatrix.CSC<'a when 'a: struct> with - member this.Free(q: MailboxProcessor<_>) = + member this.Free(q: DeviceCommandQueue<_>) = this.Values.Free q this.Rows.Free q this.ColumnPointers.Free q - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: DeviceCommandQueue<_>) = { RowCount = this.RowCount ColumnCount = this.ColumnCount RowIndices = this.Rows.ToHost q ColumnPointers = this.ColumnPointers.ToHost q Values = this.Values.ToHost q } - member this.ToHostAndFree(q: MailboxProcessor<_>) = + member this.ToHostAndFree(q: DeviceCommandQueue<_>) = let result = this.ToHost q this.Free q result type ClMatrix.LIL<'a when 'a: struct> with - member this.Free(q: MailboxProcessor<_>) = + member this.Free(q: DeviceCommandQueue<_>) = this.Rows |> List.iter (Option.iter (fun row -> row.Dispose q)) - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: DeviceCommandQueue<_>) = { RowCount = this.RowCount ColumnCount = this.ColumnCount Rows = @@ -78,32 +78,32 @@ module MatrixExtensions = |> List.map (Option.map (fun row -> row.ToHost q)) NNZ = this.NNZ } - member this.ToHostAndFree(q: MailboxProcessor<_>) = + member this.ToHostAndFree(q: DeviceCommandQueue<_>) = let result = this.ToHost q this.Free q result type ClMatrix<'a when 'a: struct> with - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: DeviceCommandQueue<_>) = match this with | ClMatrix.COO m -> m.ToHost q |> Matrix.COO | ClMatrix.CSR m -> m.ToHost q |> Matrix.CSR | ClMatrix.CSC m -> m.ToHost q |> Matrix.CSC | ClMatrix.LIL m -> m.ToHost q |> Matrix.LIL - member this.Free(q: MailboxProcessor<_>) = + member this.Free(q: DeviceCommandQueue<_>) = match this with | ClMatrix.COO m -> m.Free q | ClMatrix.CSR m -> m.Free q | ClMatrix.CSC m -> m.Free q | ClMatrix.LIL m -> m.Free q - member this.FreeAndWait(processor: MailboxProcessor<_>) = + member this.FreeAndWait(processor: DeviceCommandQueue<_>) = this.Free processor - processor.PostAndReply(MsgNotifyMe) + processor.Synchronize() - member this.ToHostAndFree(processor: MailboxProcessor<_>) = + member this.ToHostAndFree(processor: DeviceCommandQueue<_>) = let result = this.ToHost processor this.Free processor diff --git a/src/GraphBLAS-sharp/Objects/VectorExtensions.fs b/src/GraphBLAS-sharp/Objects/VectorExtensions.fs index cfe098e7..958f01e5 100644 --- a/src/GraphBLAS-sharp/Objects/VectorExtensions.fs +++ b/src/GraphBLAS-sharp/Objects/VectorExtensions.fs @@ -6,13 +6,13 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions module ClVectorExtensions = type ClVector.Sparse<'a> with - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: Brahma.FSharp.DeviceCommandQueue<_>) = { Indices = this.Indices.ToHost q Values = this.Values.ToHost q Size = this.Size } type ClVector<'a when 'a: struct> with - member this.ToHost(q: MailboxProcessor<_>) = + member this.ToHost(q: Brahma.FSharp.DeviceCommandQueue<_>) = match this with | ClVector.Sparse vector -> Vector.Sparse <| vector.ToHost q | ClVector.Dense vector -> Vector.Dense <| vector.ToHost q diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs index cd8f4a59..42ed90cc 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs @@ -43,7 +43,7 @@ let creatTest<'a when 'a: equality> = |> testPropertyWithConfig config $"Correctness test on random %A{typeof<'a>} arrays" let testCases = - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ creatTest creatTest diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs index 2689de09..b5e3712a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map.fs @@ -7,6 +7,7 @@ open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions let context = defaultContext.Queue @@ -30,10 +31,7 @@ let makeTest (testContext: TestContext) mapFun zero isEqual (array: 'a option [] let (actualDevice: ClArray<_>) = mapFun q HostInterop clArray - let actualHost = Array.zeroCreate actualDevice.Length - - q.PostAndReply(fun ch -> Msg.CreateToHostMsg(actualDevice, actualHost, ch)) - |> ignore + let actualHost = actualDevice.ToHostAndFree q let expected = Array.map (mapOptionToValue zero) array diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs index a291858e..b2903f04 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Map2.fs @@ -6,6 +6,7 @@ open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions let context = defaultContext.Queue @@ -29,10 +30,7 @@ let makeTest<'a when 'a: equality> testContext clMapFun hostMapFun isEqual (left let (actualDevice: ClArray<'a>) = clMapFun q HostInterop leftClArray rightClArray - let actualHost = Array.zeroCreate actualDevice.Length - - q.PostAndReply(fun ch -> Msg.CreateToHostMsg(actualDevice, actualHost, ch)) - |> ignore + let actualHost = actualDevice.ToHostAndFree q let expected = Array.map2 hostMapFun leftArray rightArray diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/RemoveDuplicates.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/RemoveDuplicates.fs index 276cf286..6b08b6cd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/RemoveDuplicates.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/RemoveDuplicates.fs @@ -6,6 +6,7 @@ open Expecto.Logging.Message open Brahma.FSharp open GraphBLAS.FSharp open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Objects.ArraysExtensions let logger = Log.create "RemoveDuplicates.Tests" @@ -15,7 +16,7 @@ let testCases = let removeDuplicates_wg_2 = ClArray.removeDuplications context 2 let removeDuplicates_wg_32 = ClArray.removeDuplications context 32 let q = Context.defaultContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ testCase "Simple correctness test" <| fun () -> @@ -26,8 +27,7 @@ let testCases = let actual = let clActual = removeDuplicates_wg_2 q clArray - let actual = Array.zeroCreate clActual.Length - q.PostAndReply(fun ch -> Msg.CreateToHostMsg(clActual, actual, ch)) + clActual.ToHostAndFree q logger.debug ( eventX "Actual is {actual}" @@ -55,8 +55,7 @@ let testCases = let actual = let clActual = removeDuplicates q clArray - let actual = Array.zeroCreate clActual.Length - q.PostAndReply(fun ch -> Msg.CreateToHostMsg(clActual, actual, ch)) + clActual.ToHostAndFree q logger.debug ( eventX "Actual is {actual}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs index dd698189..a0710b53 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs @@ -46,7 +46,7 @@ let createTest<'a when 'a: equality> = |> testPropertyWithConfig config $"Correctness test on random %A{typeof<'a>} arrays" let testCases = - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ createTest createTest diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs index 439d24f6..9f6b987a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs @@ -19,7 +19,7 @@ let wgSize = Constants.Common.defaultWorkGroupSize let q = Context.defaultContext.Queue -let makeTest (reduce: MailboxProcessor<_> -> ClArray<'a> -> ClCell<'a>) plus zero (array: 'a []) = +let makeTest (reduce: DeviceCommandQueue<_> -> ClArray<'a> -> ClCell<'a>) plus zero (array: 'a []) = if array.Length > 0 then let reduce = reduce q @@ -59,7 +59,7 @@ let testFixtures plus plusQ zero name = |> testPropertyWithConfig config $"Correctness on %s{name}" let tests = - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ testFixtures (+) <@ (+) @> 0 "int add" testFixtures (+) <@ (+) @> 0uy "byte add" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs index 3953c3c0..d8bc6778 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs @@ -57,7 +57,7 @@ let testFixtures plus (plusQ: Expr<'a -> 'a -> 'a>) zero name = let tests = - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ testFixtures (+) <@ (+) @> 0 "int add" testFixtures (+) <@ (+) @> 0uy "byte add" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs index f94b0564..85866388 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs @@ -65,7 +65,7 @@ let testFixtures plus plusQ zero isEqual name = |> testPropertyWithConfig config $"Correctness on %s{name}" let tests = - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ testFixtures (+) <@ (+) @> 0 (=) "int add" testFixtures (+) <@ (+) @> 0uy (=) "byte add" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs index 4923ed6f..a27d9d65 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs @@ -51,7 +51,7 @@ let testFixturesFirst<'a when 'a: equality> = |> testPropertyWithConfig config $"Correctness on %A{typeof<'a>}" let tests = - q.Error.Add(fun e -> failwithf $"%A{e}") + //q.Error.Add(fun e -> failwithf $"%A{e}") let last = [ testFixturesLast @@ -95,7 +95,7 @@ let createInitTest clScatter hostScatter name valuesMap valuesMapQ = |> testPropertyWithConfig config name let initTests = - q.Error.Add(fun e -> failwithf $"%A{e}") + //sq.Error.Add(fun e -> failwithf $"%A{e}") let inc = ((+) 1) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs index c2477bd4..628d33b7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs @@ -100,7 +100,7 @@ module Bitonic = |> testPropertyWithConfig config $"Correctness on %A{typeof<'a>}" let tests = - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ testFixtures diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs index 537a66d8..28171a72 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs @@ -10,6 +10,7 @@ open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.MatrixExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Convert.Tests" @@ -21,7 +22,7 @@ let context = defaultContext.ClContext let q = defaultContext.Queue -q.Error.Add(fun e -> failwithf "%A" e) +//q.Error.Add(fun e -> failwithf "%A" e) let makeTest context q formatFrom formatTo convertFun isZero (array: 'a [,]) = let mtx = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs index 94470fc3..ae224469 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs @@ -9,6 +9,7 @@ open GraphBLAS.FSharp.Tests.TestCases open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.MatrixExtensions open GraphBLAS.FSharp.Backend.Quotes +open Brahma.FSharp let config = { Utils.defaultConfig with @@ -68,7 +69,7 @@ let createGeneralTest testContext (zero: 'a) isEqual op opQ testName = |> testPropertyWithConfig config $"test on %A{typeof<'a>} %s{testName}" let generalTests (testContext: TestContext) = - [ testContext.Queue.Error.Add(fun e -> failwithf "%A" e) + [ //testContext.Queue.Error.Add(fun e -> failwithf "%A" e) createGeneralTest testContext false (=) (&&) ArithmeticOperations.boolMulOption "mul" createGeneralTest testContext false (=) (||) ArithmeticOperations.boolSumOption "sum" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs index d84811a1..e82311fa 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs @@ -13,6 +13,7 @@ open GraphBLAS.FSharp.Tests.TestCases open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.MatrixExtensions +open Brahma.FSharp let logger = Log.create "Map.Tests" @@ -51,7 +52,7 @@ let checkResult isEqual op zero (baseMtx: 'a [,]) (actual: Matrix<'a>) = let correctnessGenericTest zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'b>) + (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'b>) toCOOFun (isEqual: 'a -> 'a -> bool) q @@ -108,7 +109,7 @@ let createTestMap case (zero: 'a) (constant: 'a) binOp isEqual opQ = let testFixturesMapNot case = [ let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap case false true (fun _ -> not) (=) (fun _ _ -> ArithmeticOperations.notOption) ] @@ -118,7 +119,7 @@ let notTests = let testFixturesMapAdd case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap case 0 10 (+) (=) ArithmeticOperations.addLeftConst @@ -135,7 +136,7 @@ let addTests = let testFixturesMapMul case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap case 0 10 (*) (=) ArithmeticOperations.mulLeftConst diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs index 112e230c..7cd0763a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs @@ -13,6 +13,7 @@ open GraphBLAS.FSharp.Tests.Backend open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.MatrixExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Map2.Tests" @@ -51,7 +52,7 @@ let checkResult isEqual op zero (baseMtx1: 'a [,]) (baseMtx2: 'a [,]) (actual: M let correctnessGenericTest zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'a> -> ClMatrix<'c>) + (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'a> -> ClMatrix<'c>) toCOOFun (isEqual: 'a -> 'a -> bool) q @@ -111,7 +112,7 @@ let createTestMap2Add case (zero: 'a) add isEqual addQ map2 = let testFixturesMap2Add case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap2Add case false (||) (=) ArithmeticOperations.boolSumOption Operations.Matrix.map2 createTestMap2Add case 0 (+) (=) ArithmeticOperations.intSumOption Operations.Matrix.map2 @@ -128,7 +129,7 @@ let addTests = let testFixturesMap2AddAtLeastOne case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap2Add case false (||) (=) ArithmeticOperations.boolSumAtLeastOne Operations.Matrix.map2AtLeastOne createTestMap2Add case 0 (+) (=) ArithmeticOperations.intSumAtLeastOne Operations.Matrix.map2AtLeastOne @@ -159,7 +160,7 @@ let addAtLeastOneTests = let testFixturesMap2MulAtLeastOne case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap2Add case false (&&) (=) ArithmeticOperations.boolMulAtLeastOne Operations.Matrix.map2AtLeastOne createTestMap2Add case 0 (*) (=) ArithmeticOperations.intMulAtLeastOne Operations.Matrix.map2AtLeastOne diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs index e5a1e826..d568bbc0 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.Objects.MatrixExtensions open GraphBLAS.FSharp.Test open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Tests.Context +open Brahma.FSharp let logger = Log.create "SpGeMM.Masked.Tests" @@ -66,7 +67,7 @@ let tests = arbitrary = [ typeof ] } let q = defaultContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ let add = <@ fun x y -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs index d6b9cfe9..daefc11a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs @@ -125,7 +125,7 @@ let createTest<'a when 'a: equality and 'a: struct> case (zero: 'a) isEqual = let testFixtures case = let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ createTest case 0 (=) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs index 5d40ca00..12d19b0b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs @@ -50,8 +50,8 @@ let checkResult isZero isComplemented (actual: Vector<'a>) (vector: 'a []) (mask let makeTest<'a when 'a: struct and 'a: equality> (isZero: 'a -> bool) - (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (fillVector: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) + (toDense: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (fillVector: DeviceCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) isComplemented case (vector: 'a [], mask: 'a [], value: 'a) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs index ac9073f9..d2cd3201 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs @@ -10,6 +10,7 @@ open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Backend.Vector.Convert.Tests" @@ -20,7 +21,7 @@ let wgSize = Constants.Common.defaultWorkGroupSize let makeTest formatFrom - (convertFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (convertFun: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) isZero case (array: 'a []) @@ -62,7 +63,7 @@ let testFixtures case = let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) match case.Format with | Sparse -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs index 3910ddcd..8bad7f63 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs @@ -9,6 +9,7 @@ open TestCases open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Vector.copy.Tests" @@ -36,7 +37,7 @@ let checkResult (isEqual: 'a -> 'a -> bool) (actual: Vector<'a>) (expected: Vect let correctnessGenericTest<'a when 'a: struct> isEqual zero - (copy: MailboxProcessor -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (copy: DeviceCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) (case: OperationCase) (array: 'a []) = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs index 25fed6a3..b612ea09 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs @@ -14,6 +14,7 @@ open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClVectorExtensions open Mono.CompilerServices.SymbolWriter +open Brahma.FSharp let logger = Log.create "Vector.Map.Tests" @@ -45,8 +46,8 @@ let checkResult isEqual op zero (baseVector: 'a []) (actual: Vector<'b>) = let correctnessGenericTest zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (toDense: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) (isEqual: 'a -> 'a -> bool) (case: OperationCase) (array: 'a []) @@ -101,7 +102,7 @@ let createTestMap case (zero: 'a) (constant: 'a) binOp isEqual opQ = let testFixturesMapNot case = [ let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap case false true (fun _ -> not) (=) (fun _ _ -> ArithmeticOperations.notOption) ] @@ -111,7 +112,7 @@ let notTests = let testFixturesMapAdd case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap case 0 10 (+) (=) ArithmeticOperations.addLeftConst @@ -128,7 +129,7 @@ let addTests = let testFixturesMapMul case = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTestMap case 0 10 (*) (=) ArithmeticOperations.mulLeftConst diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs index 0ef5a5dc..9bf49795 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs @@ -10,6 +10,7 @@ open GraphBLAS.FSharp.Tests open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Vector.ElementWise.Tests" @@ -44,8 +45,8 @@ let correctnessGenericTest isEqual zero op - (addFun: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) - (toDense: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) + (toDense: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) case (leftArray: 'a [], rightArray: 'a []) = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs index 436aba91..55df56cb 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs @@ -10,6 +10,7 @@ open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Vector.ofList.Tests" @@ -35,8 +36,8 @@ let checkResult let correctnessGenericTest<'a when 'a: struct> (isEqual: 'a -> 'a -> bool) - (ofList: MailboxProcessor<_> -> AllocationFlag -> VectorFormat -> int -> (int * 'a) list -> ClVector<'a>) - (toCoo: MailboxProcessor<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (ofList: DeviceCommandQueue<_> -> AllocationFlag -> VectorFormat -> int -> (int * 'a) list -> ClVector<'a>) + (toCoo: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) (case: OperationCase) (elements: (int * 'a) []) (sizeDelta: int) @@ -88,7 +89,7 @@ let testFixtures (case: OperationCase) = [ let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf $"%A{e}") + //q.Error.Add(fun e -> failwithf $"%A{e}") creatTest case creatTest case diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs index 00e157bf..f247564a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Reduce.fs @@ -52,7 +52,7 @@ let testFixtures case = let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ createTest case (=) 0 (+) <@ (+) @> "add" createTest case (=) 0uy (+) <@ (+) @> "add" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index f4195db7..4a118197 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -10,6 +10,7 @@ open GraphBLAS.FSharp.Tests.TestCases open Microsoft.FSharp.Collections open Microsoft.FSharp.Core open GraphBLAS.FSharp.Objects +open Brahma.FSharp let config = Utils.defaultConfig @@ -59,7 +60,7 @@ let correctnessGenericTest some sumOp mulOp - (spMV: MailboxProcessor<_> -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) + (spMV: DeviceCommandQueue<_> -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -114,7 +115,7 @@ let createTest spmspv testContext (zero: 'a) some isEqual add mul addQ mulQ = let testFixturesSpMSpV (testContext: TestContext) = [ let context = testContext.ClContext let q = testContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTest Operations.SpMSpVBool diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index b4688fa4..bbfeb9a9 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -51,7 +51,7 @@ let correctnessGenericTest zero sumOp mulOp - (spMV: MailboxProcessor<_> -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) + (spMV: DeviceCommandQueue<_> -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -102,7 +102,7 @@ let createTest testContext (zero: 'a) isEqual add mul addQ mulQ = let testFixturesSpMV (testContext: TestContext) = [ let context = testContext.ClContext let q = testContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) createTest testContext false (=) (||) (&&) ArithmeticOperations.boolSumOption ArithmeticOperations.boolMulOption createTest testContext 0 (=) (+) (*) ArithmeticOperations.intSumOption ArithmeticOperations.intMulOption diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs index cccfa3d7..2a7cf1ea 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs @@ -10,6 +10,7 @@ open TestCases open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClVectorExtensions open GraphBLAS.FSharp.Objects.ClContextExtensions +open Brahma.FSharp let logger = Log.create "Vector.zeroCreate.Tests" @@ -30,7 +31,7 @@ let checkResult size (actual: Vector<'a>) = Expect.equal vector.Indices [| 0 |] "The index array must contain the 0" let correctnessGenericTest<'a when 'a: struct and 'a: equality> - (zeroCreate: MailboxProcessor<_> -> AllocationFlag -> int -> VectorFormat -> ClVector<'a>) + (zeroCreate: DeviceCommandQueue<_> -> AllocationFlag -> int -> VectorFormat -> ClVector<'a>) (case: OperationCase) (vectorSize: int) = @@ -69,7 +70,7 @@ let testFixtures case = let context = case.TestContext.ClContext let q = case.TestContext.Queue - q.Error.Add(fun e -> failwithf "%A" e) + //q.Error.Add(fun e -> failwithf "%A" e) [ createTest case createTest case diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index 947287bc..cea7b549 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -402,7 +402,7 @@ module HostPrimitives = module Context = type TestContext = { ClContext: ClContext - Queue: MailboxProcessor } + Queue: DeviceCommandQueue } let availableContexts (platformRegex: string) = let mutable e = ErrorCode.Unknown From 1b0a6709b4e48929d3b554245b8ff26b9799f4d4 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Sun, 7 Apr 2024 17:02:29 +0300 Subject: [PATCH 089/102] SetArgs benchmark SetArgs benchmark --- .../Common/SetArgs.fs | 115 ++++++++++++++++++ .../GraphBLAS-sharp.Benchmarks.fsproj | 7 +- .../GraphBLAS-sharp.Benchmarks/Program.fs | 2 +- 3 files changed, 120 insertions(+), 4 deletions(-) create mode 100644 benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs new file mode 100644 index 00000000..681fd6d0 --- /dev/null +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs @@ -0,0 +1,115 @@ +module GraphBLAS.FSharp.Benchmarks.Common.SetArgs + +open FsCheck +open BenchmarkDotNet.Attributes +open Brahma.FSharp +open GraphBLAS.FSharp.Backend.Quotes +open GraphBLAS.FSharp +open GraphBLAS.FSharp.Benchmarks +open GraphBLAS.FSharp.Tests +open GraphBLAS.FSharp.Objects +open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions + +[] +[] +[)>] +type BenchmarkSetArgs() = + + //let kernel = <@ fun (ndRange: Range1D) (inputArray1: ClArray) (inputArray2: ClArray) (inputArray3: ClArray) (inputArray4: ClArray) (inputArray5: ClArray) (inputArray6: ClArray) (inputArray7: ClArray) (inputArray8: ClArray) (inputArray9: ClArray) (inputArray10: ClArray) -> () @> + let kernel = <@ fun (ndRange: Range1D) (inputArray1: ClArray) -> () @> + + member val kernelCompiled = None with get, set + + member val DeviceArray1 = Unchecked.defaultof> with get, set + member val DeviceArray2 = Unchecked.defaultof> with get, set + member val DeviceArray3 = Unchecked.defaultof> with get, set + member val DeviceArray4 = Unchecked.defaultof> with get, set + member val DeviceArray5 = Unchecked.defaultof> with get, set + member val DeviceArray6 = Unchecked.defaultof> with get, set + member val DeviceArray7 = Unchecked.defaultof> with get, set + member val DeviceArray8 = Unchecked.defaultof> with get, set + member val DeviceArray9 = Unchecked.defaultof> with get, set + member val DeviceArray10 = Unchecked.defaultof> with get, set + + member val HostArray = Unchecked.defaultof with get, set + + member val ArraySize = 1000000 + + member val Iterations = 1000 + + [] + member val OclContextInfo = Unchecked.defaultof with get, set + + member this.OclContext: ClContext = (fst this.OclContextInfo).ClContext + member this.WorkGroupSize = snd this.OclContextInfo + + member this.Processor = + let p = (fst this.OclContextInfo).Queue + p.Error.Add(fun e -> failwithf $"%A{e}") + p + + static member AvailableContexts = Utils.availableContexts + + member this.ClearInputArrays() = + this.DeviceArray1.FreeAndWait this.Processor + this.DeviceArray2.FreeAndWait this.Processor + this.DeviceArray3.FreeAndWait this.Processor + this.DeviceArray4.FreeAndWait this.Processor + this.DeviceArray5.FreeAndWait this.Processor + this.DeviceArray6.FreeAndWait this.Processor + this.DeviceArray7.FreeAndWait this.Processor + this.DeviceArray8.FreeAndWait this.Processor + this.DeviceArray9.FreeAndWait this.Processor + this.DeviceArray10.FreeAndWait this.Processor + + member this.CreateArray() = + this.HostArray <- Array.create this.ArraySize 1 + + member this.LoadArraysToGPU() = + this.DeviceArray1 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray2 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray3 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray4 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray5 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray6 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray7 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray8 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray9 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + this.DeviceArray10 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) + + [] + member this.GlobalSetup() = + this.kernelCompiled <- Some (this.OclContext.Compile kernel) + this.CreateArray() + this.LoadArraysToGPU() + + [] + member this.IterationSetup() = + this.Processor.PostAndReply Msg.MsgNotifyMe + + [] + member this.Benchmark() = + let mutable i = 0 + while i < this.Iterations do + let ndRange = + Range1D.CreateValid(1, this.WorkGroupSize) + + let kernel = this.kernelCompiled.Value.GetKernel() + + //this.Processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange this.DeviceArray1 this.DeviceArray2 this.DeviceArray3 this.DeviceArray4 this.DeviceArray5 this.DeviceArray6 this.DeviceArray7 this.DeviceArray8 this.DeviceArray9 this.DeviceArray10)) + this.Processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange this.DeviceArray1)) + + this.Processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + this.Processor.PostAndReply Msg.MsgNotifyMe + i <- i + 1 + + [] + member this.IterationCleanup() = () + + + [] + member this.GlobalCleanup() = + this.ClearInputArrays() diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index 1ab92795..c2b4b2d8 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -1,4 +1,4 @@ - + Exe @@ -19,15 +19,16 @@ + - + - + \ No newline at end of file diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index 61328218..b7efa86a 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,7 +4,7 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof |] + BenchmarkSwitcher [| typeof |] benchmarks.Run argv |> ignore 0 From b5ea52383b46d2b68af617c30161ff649965aa01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Fri, 10 May 2024 16:52:20 +0300 Subject: [PATCH 090/102] Try restart CI --- src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs index ccbc5355..c606a087 100644 --- a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs @@ -209,7 +209,6 @@ module internal PrefixSumInternal = let runBackwardsIncludeInPlace plus = runInPlace plus true scanInclusive /// - /// This method is deprecated due to bad perfomance. /// Exclude in-place prefix sum of integer array with addition operation and start value that is equal to 0. /// /// From 4485640126194272bb7921c8ec1548d2e72a7a97 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Fri, 10 May 2024 17:17:53 +0300 Subject: [PATCH 091/102] RawCommandQueue 1 --- .../Algorithms/PageRank.fs | 2 +- .../Common/SetArgs.fs | 115 ------------------ .../GraphBLAS-sharp.Benchmarks.fsproj | 1 - .../GraphBLAS-sharp.Benchmarks/Helpers.fs | 23 ++-- .../GraphBLAS-sharp.Benchmarks/Program.fs | 2 +- .../GraphBLAS-sharp.Benchmarks/Vector/Map2.fs | 6 +- paket.dependencies | 2 +- paket.lock | 34 +++--- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 22 ++-- .../Algorithms/MSBFS.fs | 16 +-- .../Algorithms/PageRank.fs | 40 +++--- .../Algorithms/PageRank.fsi | 6 +- .../Algorithms/SSSP.fs | 6 +- src/GraphBLAS-sharp.Backend/Common/Bitmap.fs | 12 +- src/GraphBLAS-sharp.Backend/Common/Gather.fs | 15 +-- src/GraphBLAS-sharp.Backend/Common/Map.fs | 33 +++-- .../Objects/MatrixExtensions.fs | 52 ++++---- .../Objects/VectorExtensions.fs | 4 +- 18 files changed, 134 insertions(+), 257 deletions(-) delete mode 100644 benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index 3b70fca9..7b70f1a8 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -73,7 +73,7 @@ type Benchmarks( member this.ClearPreparedMatrix() = matrixPrepared.Dispose this.Processor - member this.ClearResult() = this.Result.Dispose this.Processor + member this.ClearResult() = this.Result.Dispose() member this.ReadMatrix() = let converter = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs deleted file mode 100644 index 681fd6d0..00000000 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Common/SetArgs.fs +++ /dev/null @@ -1,115 +0,0 @@ -module GraphBLAS.FSharp.Benchmarks.Common.SetArgs - -open FsCheck -open BenchmarkDotNet.Attributes -open Brahma.FSharp -open GraphBLAS.FSharp.Backend.Quotes -open GraphBLAS.FSharp -open GraphBLAS.FSharp.Benchmarks -open GraphBLAS.FSharp.Tests -open GraphBLAS.FSharp.Objects -open GraphBLAS.FSharp.Objects.ArraysExtensions -open GraphBLAS.FSharp.Objects.ClContextExtensions -open GraphBLAS.FSharp.Objects.ClCellExtensions - -[] -[] -[)>] -type BenchmarkSetArgs() = - - //let kernel = <@ fun (ndRange: Range1D) (inputArray1: ClArray) (inputArray2: ClArray) (inputArray3: ClArray) (inputArray4: ClArray) (inputArray5: ClArray) (inputArray6: ClArray) (inputArray7: ClArray) (inputArray8: ClArray) (inputArray9: ClArray) (inputArray10: ClArray) -> () @> - let kernel = <@ fun (ndRange: Range1D) (inputArray1: ClArray) -> () @> - - member val kernelCompiled = None with get, set - - member val DeviceArray1 = Unchecked.defaultof> with get, set - member val DeviceArray2 = Unchecked.defaultof> with get, set - member val DeviceArray3 = Unchecked.defaultof> with get, set - member val DeviceArray4 = Unchecked.defaultof> with get, set - member val DeviceArray5 = Unchecked.defaultof> with get, set - member val DeviceArray6 = Unchecked.defaultof> with get, set - member val DeviceArray7 = Unchecked.defaultof> with get, set - member val DeviceArray8 = Unchecked.defaultof> with get, set - member val DeviceArray9 = Unchecked.defaultof> with get, set - member val DeviceArray10 = Unchecked.defaultof> with get, set - - member val HostArray = Unchecked.defaultof with get, set - - member val ArraySize = 1000000 - - member val Iterations = 1000 - - [] - member val OclContextInfo = Unchecked.defaultof with get, set - - member this.OclContext: ClContext = (fst this.OclContextInfo).ClContext - member this.WorkGroupSize = snd this.OclContextInfo - - member this.Processor = - let p = (fst this.OclContextInfo).Queue - p.Error.Add(fun e -> failwithf $"%A{e}") - p - - static member AvailableContexts = Utils.availableContexts - - member this.ClearInputArrays() = - this.DeviceArray1.FreeAndWait this.Processor - this.DeviceArray2.FreeAndWait this.Processor - this.DeviceArray3.FreeAndWait this.Processor - this.DeviceArray4.FreeAndWait this.Processor - this.DeviceArray5.FreeAndWait this.Processor - this.DeviceArray6.FreeAndWait this.Processor - this.DeviceArray7.FreeAndWait this.Processor - this.DeviceArray8.FreeAndWait this.Processor - this.DeviceArray9.FreeAndWait this.Processor - this.DeviceArray10.FreeAndWait this.Processor - - member this.CreateArray() = - this.HostArray <- Array.create this.ArraySize 1 - - member this.LoadArraysToGPU() = - this.DeviceArray1 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray2 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray3 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray4 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray5 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray6 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray7 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray8 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray9 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - this.DeviceArray10 <- this.OclContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, this.HostArray) - - [] - member this.GlobalSetup() = - this.kernelCompiled <- Some (this.OclContext.Compile kernel) - this.CreateArray() - this.LoadArraysToGPU() - - [] - member this.IterationSetup() = - this.Processor.PostAndReply Msg.MsgNotifyMe - - [] - member this.Benchmark() = - let mutable i = 0 - while i < this.Iterations do - let ndRange = - Range1D.CreateValid(1, this.WorkGroupSize) - - let kernel = this.kernelCompiled.Value.GetKernel() - - //this.Processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange this.DeviceArray1 this.DeviceArray2 this.DeviceArray3 this.DeviceArray4 this.DeviceArray5 this.DeviceArray6 this.DeviceArray7 this.DeviceArray8 this.DeviceArray9 this.DeviceArray10)) - this.Processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange this.DeviceArray1)) - - this.Processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - this.Processor.PostAndReply Msg.MsgNotifyMe - i <- i + 1 - - [] - member this.IterationCleanup() = () - - - [] - member this.GlobalCleanup() = - this.ClearInputArrays() diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj index c2b4b2d8..0ccc2f46 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/GraphBLAS-sharp.Benchmarks.fsproj @@ -19,7 +19,6 @@ - diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs index 4288c875..f23a8c08 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Helpers.fs @@ -15,7 +15,7 @@ open Expecto module Utils = type BenchmarkContext = { ClContext: Brahma.FSharp.ClContext - Queue: DeviceCommandQueue } + Queue: RawCommandQueue } let getMatricesFilenames configFilename = let getFullPathToConfig filename = @@ -103,9 +103,11 @@ module Utils = let context = Brahma.FSharp.ClContext(device, translator) - let queue = context.QueueProvider.CreateQueue() + let queue = + RawCommandQueue(context.ClDevice.Device, context.Context, context.Translator) { ClContext = context; Queue = queue }) + seq { for wgSize in workGroupSizes do for context in contexts do @@ -119,13 +121,14 @@ module Utils = let normalFloatGenerator = (Arb.Default.NormalFloat() - |> Arb.toGen - |> Gen.map float) + |> Arb.toGen + |> Gen.map float) - let fIsEqual x y = abs (x - y) < Accuracy.medium.absolute || x.Equals y + let fIsEqual x y = + abs (x - y) < Accuracy.medium.absolute + || x.Equals y - let nextInt (random: System.Random) = - random.Next() + let nextInt (random: System.Random) = random.Next() module VectorGenerator = let private pairOfVectorsOfEqualSize (valuesGenerator: Gen<'a>) createVector = @@ -144,8 +147,10 @@ module VectorGenerator = |> pairOfVectorsOfEqualSize Arb.generate let floatPair format = - let fIsEqual x y = abs (x - y) < Accuracy.medium.absolute || x = y + let fIsEqual x y = + abs (x - y) < Accuracy.medium.absolute || x = y - let createVector array = Utils.createVectorFromArray format array (fIsEqual 0.0) + let createVector array = + Utils.createVectorFromArray format array (fIsEqual 0.0) pairOfVectorsOfEqualSize Utils.normalFloatGenerator createVector diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs index b7efa86a..40bbb73a 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Program.fs @@ -4,7 +4,7 @@ open BenchmarkDotNet.Running [] let main argv = let benchmarks = - BenchmarkSwitcher [| typeof |] + BenchmarkSwitcher [| typeof |] benchmarks.Run argv |> ignore 0 diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs index 504f7a70..92daae68 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Vector/Map2.fs @@ -63,12 +63,12 @@ type Benchmarks<'elem when 'elem : struct>( | ex -> raise ex member this.ClearInputVectors()= - firstVector.Dispose this.Processor - secondVector.Dispose this.Processor + firstVector.Dispose() + secondVector.Dispose() member this.ClearResult() = match this.ResultVector with - | Some v -> v.Dispose this.Processor + | Some v -> v.Dispose() | None -> () member this.CreateVectors() = diff --git a/paket.dependencies b/paket.dependencies index 9b55c999..b427b65e 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -16,7 +16,7 @@ nuget System.CodeDom >= 7.0 nuget FSharp.Quotations.Evaluator 2.1.0 nuget FSharpx.Collections >= 3.1 nuget FSharpx.Text.StructuredFormat >= 3.1 -nuget Brahma.FSharp 3.0.0-alpha1.3 +nuget Brahma.FSharp 3.0.0-alpha1.5 nuget BenchmarkDotNet nuget MathNet.Numerics.FSharp 4.0.0 nuget MathNet.Numerics.MKL.Win-x64 2.5.0 diff --git a/paket.lock b/paket.lock index 73019bac..4dbd56ff 100644 --- a/paket.lock +++ b/paket.lock @@ -19,26 +19,26 @@ NUGET System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) BenchmarkDotNet.Annotations (0.13.12) - restriction: >= netstandard2.0 - Brahma.FSharp (3.0.0-alpha1.3) - Brahma.FSharp.OpenCL.Printer (>= 3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Translator (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp (3.0.0-alpha1.5) + Brahma.FSharp.OpenCL.Printer (>= 3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Translator (>= 3.0.0-alpha1.5) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 FSharp.Quotations.Evaluator (>= 2.1) - restriction: >= net7.0 - YC.OpenCL.NET (>= 3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.AST (3.0.0-alpha1.3) - restriction: >= net7.0 + YC.OpenCL.NET (>= 3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.AST (3.0.0-alpha1.5) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Printer (3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.AST (>= 3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Translator (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Printer (3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.AST (>= 3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Translator (>= 3.0.0-alpha1.5) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 FSharpx.Collections (>= 3.1) - restriction: >= net7.0 FSharpx.Text.StructuredFormat (>= 3.1) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Shared (3.0.0-alpha1.3) - restriction: >= net7.0 - YC.OpenCL.NET (>= 3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Translator (3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.AST (>= 3.0.0-alpha1.3) - restriction: >= net7.0 - Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.3) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Shared (3.0.0-alpha1.5) - restriction: >= net7.0 + YC.OpenCL.NET (>= 3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Translator (3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.AST (>= 3.0.0-alpha1.5) - restriction: >= net7.0 + Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.5) - restriction: >= net7.0 FSharp.Core (7.0) - restriction: >= net7.0 FSharp.Quotations.Evaluator (>= 2.1) - restriction: >= net7.0 FSharpx.Collections (>= 3.1) - restriction: >= net7.0 @@ -849,7 +849,7 @@ NUGET System.Xml.XmlDocument (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) TypeShape (9.0) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 - YC.OpenCL.NET (3.0.0-alpha1.3) - restriction: >= net7.0 + YC.OpenCL.NET (3.0.0-alpha1.5) - restriction: >= net7.0 ExtraConstraints.Fody (1.14) - restriction: >= net7.0 Microsoft.Build.Framework (16.10) - restriction: >= net7.0 System.CodeDom (>= 7.0) - restriction: >= net7.0 @@ -1071,7 +1071,7 @@ NUGET System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.2.206) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.2.235) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 @@ -1316,7 +1316,7 @@ NUGET System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.2.206) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.2.235) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 2cb0de70..78db3bae 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -34,7 +34,7 @@ module internal BFS = let containsNonZero = Vector.exists Predicates.isSome clContext workGroupSize - fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = @@ -62,7 +62,7 @@ module internal BFS = not <| (containsNonZero queue front).ToHostAndFree queue - front.Dispose queue + front.Dispose() levels @@ -87,7 +87,7 @@ module internal BFS = let fillSubVectorTo = Vector.assignByMaskInPlace Mask.assign clContext workGroupSize - fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = @@ -108,18 +108,18 @@ module internal BFS = //Getting new frontier match spMSpV queue matrix front with | None -> - front.Dispose queue + front.Dispose() stop <- true | Some newFrontier -> - front.Dispose queue + front.Dispose() //Filtering visited vertices match maskComplemented queue DeviceOnly newFrontier levels with | None -> stop <- true - newFrontier.Dispose queue + newFrontier.Dispose() | Some f -> front <- f - newFrontier.Dispose queue + newFrontier.Dispose() levels @@ -159,17 +159,17 @@ module internal BFS = ClArray.count Predicates.isSome clContext workGroupSize //Push or pull functions - let getNNZ (queue: DeviceCommandQueue) (v: ClVector) = + let getNNZ (queue: RawCommandQueue) (v: ClVector) = match v with | ClVector.Sparse v -> v.NNZ | ClVector.Dense v -> countNNZ queue v - let SPARSITY = 0.001f + let SPARSITY = 0.05f let push nnz size = (float32 nnz) / (float32 size) <= SPARSITY - fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount let levels = @@ -192,7 +192,7 @@ module internal BFS = //Getting new frontier match spMSpV queue matrix frontier with | None -> - frontier.Dispose queue + frontier.Dispose() stop <- true | Some newFrontier -> frontier.Dispose queue diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index c7c1ba38..41dbef46 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -28,7 +28,7 @@ module internal MSBFS = let scatterValues = Scatter.lastOccurrence clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> + fun (queue: RawCommandQueue) allocationMode (front: ClMatrix.COO<_>) (intersection: ClArray) -> invert queue intersection @@ -72,7 +72,7 @@ module internal MSBFS = let findIntersection = Intersect.findKeysIntersection clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (level: int) (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> + fun (queue: RawCommandQueue) allocationMode (level: int) (front: ClMatrix.COO<_>) (levels: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. let intersection = @@ -82,7 +82,7 @@ module internal MSBFS = let newFront = updateFront queue allocationMode front intersection - intersection.Free queue + intersection.Free() match newFront with | Some f -> @@ -91,7 +91,7 @@ module internal MSBFS = // Set current level value to all remaining front positions setLevel queue levelClCell 0 f.Values.Length f.Values - levelClCell.Free queue + levelClCell.Free() // Update levels let newLevels = mergeDisjoint queue levels f @@ -114,7 +114,7 @@ module internal MSBFS = let updateFrontAndLevels = updateFrontAndLevels clContext workGroupSize - fun (queue: DeviceCommandQueue) (matrix: ClMatrix<'a>) (source: int list) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix<'a>) (source: int list) -> let vertexCount = matrix.RowCount let sourceVertexCount = source.Length @@ -173,7 +173,7 @@ module internal MSBFS = let copyIndices = ClArray.copyTo clContext workGroupSize - fun (queue: DeviceCommandQueue) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> + fun (queue: RawCommandQueue) allocationMode (front: ClMatrix.COO<_>) (parents: ClMatrix.COO<_>) -> // Find intersection of levels and front indices. let intersection = @@ -183,7 +183,7 @@ module internal MSBFS = let newFront = frontExclude queue allocationMode front intersection - intersection.Free queue + intersection.Free() match newFront with | Some f -> @@ -208,7 +208,7 @@ module internal MSBFS = let updateFrontAndParents = updateFrontAndParents clContext workGroupSize - fun (queue: DeviceCommandQueue) (inputMatrix: ClMatrix<'a>) (source: int list) -> + fun (queue: RawCommandQueue) (inputMatrix: ClMatrix<'a>) (source: int list) -> let vertexCount = inputMatrix.RowCount let sourceVertexCount = source.Length diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index 7421d28e..f71d5461 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -16,7 +16,7 @@ module PageRank = type PageRankMatrix = | PreparedMatrix of ClMatrix - member this.Dispose(processor: DeviceCommandQueue) = + member this.Dispose(processor: RawCommandQueue) = match this with | PreparedMatrix matrix -> matrix.Dispose processor @@ -38,7 +38,7 @@ module PageRank = let zeroCreate = GraphBLAS.FSharp.ClArray.zeroCreate clContext workGroupSize - fun (queue: DeviceCommandQueue) (matrix: ClMatrix.CSR) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR) -> let outDegree: ClArray = zeroCreate queue DeviceOnly matrix.ColumnCount @@ -96,7 +96,7 @@ module PageRank = let multiply = clContext.Compile multiply - fun (queue: DeviceCommandQueue) (matrix: ClMatrix) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix) -> match matrix with | ClMatrix.CSR matrix -> @@ -111,28 +111,24 @@ module PageRank = let ndRange = Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize) - queue.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - matrix.RowCount - matrix.RowPointers - matrix.Values - outDegree - resultValues) - ) + kernel.KernelFunc + ndRange + matrix.RowCount + matrix.RowPointers + matrix.Values + outDegree + resultValues - queue.Post(Msg.CreateRunMsg<_, _> kernel) + queue.RunKernel(kernel) - outDegree.Free queue + outDegree.Free() let newMatrix = { Context = clContext RowCount = matrix.RowCount ColumnCount = matrix.ColumnCount - RowPointers = copy queue DeviceOnly matrix.RowPointers - Columns = copy queue DeviceOnly matrix.Columns + RowPointers = copy queue DeviceOnly matrix.RowPointers matrix.RowPointers.Length + Columns = copy queue DeviceOnly matrix.Columns matrix.Columns.Length Values = resultValues } transposeInPlace queue DeviceOnly newMatrix @@ -162,7 +158,7 @@ module PageRank = let create = GraphBLAS.FSharp.Vector.create clContext workGroupSize - fun (queue: DeviceCommandQueue) (PreparedMatrix matrix) accuracy -> + fun (queue: RawCommandQueue) (PreparedMatrix matrix) accuracy -> let vertexCount = matrix.RowCount //None is 0 @@ -206,8 +202,8 @@ module PageRank = rank <- prevRank prevRank <- temp - prevRank.Dispose queue - errors.Dispose queue - addition.Dispose queue + prevRank.Dispose() + errors.Dispose() + addition.Dispose() rank diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi index 7c20f94f..c4af2dce 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi @@ -7,8 +7,8 @@ open GraphBLAS.FSharp.Objects module PageRank = [] type PageRankMatrix = - member Dispose : DeviceCommandQueue -> unit + member Dispose : RawCommandQueue -> unit - val internal prepareMatrix : ClContext -> int -> (DeviceCommandQueue -> ClMatrix -> PageRankMatrix) + val internal prepareMatrix : ClContext -> int -> (RawCommandQueue -> ClMatrix -> PageRankMatrix) - val internal run : ClContext -> int -> (DeviceCommandQueue -> PageRankMatrix -> float32 -> ClVector) + val internal run : ClContext -> int -> (RawCommandQueue -> PageRankMatrix -> float32 -> ClVector) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs index 7b7d9fe9..d7c80f96 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/SSSP.fs @@ -33,7 +33,7 @@ module internal SSSP = let containsNonZero = Vector.exists Predicates.isSome clContext workGroupSize - fun (queue: DeviceCommandQueue) (matrix: ClMatrix) (source: int) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix) (source: int) -> let vertexCount = matrix.RowCount //None is System.Int32.MaxValue @@ -73,7 +73,7 @@ module internal SSSP = <| (containsNonZero queue front1) .ToHostAndFree(queue) - front1.Dispose queue - front2.Dispose queue + front1.Dispose() + front2.Dispose() distance diff --git a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs index f415c7a8..8063e43a 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Bitmap.fs @@ -24,7 +24,7 @@ module Bitmap = let kernel = clContext.Compile(getUniqueBitmap) - fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (inputArray: ClArray<'a>) -> let inputLength = inputArray.Length @@ -36,9 +36,9 @@ module Bitmap = let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray inputLength bitmap)) + kernel.KernelFunc ndRange inputArray inputLength bitmap - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel bitmap @@ -67,7 +67,7 @@ module Bitmap = let firstGetBitmap = getUniqueBitmap clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (firstArray: ClArray<'a>) (secondArray: ClArray<'a>) -> let firstBitmap = firstGetBitmap processor DeviceOnly firstArray @@ -77,8 +77,8 @@ module Bitmap = let result = map processor allocationMode firstBitmap secondBitmap - firstBitmap.Free processor - secondBitmap.Free processor + firstBitmap.Free() + secondBitmap.Free() result diff --git a/src/GraphBLAS-sharp.Backend/Common/Gather.fs b/src/GraphBLAS-sharp.Backend/Common/Gather.fs index 9e253c7a..dbcaf382 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Gather.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Gather.fs @@ -34,16 +34,16 @@ module Gather = let program = clContext.Compile gather - fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> let kernel = program.GetKernel() let ndRange = Range1D.CreateValid(outputArray.Length, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange values.Length values outputArray)) + kernel.KernelFunc ndRange values.Length values outputArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Fills the given output array using the given value and position arrays. Array of positions indicates @@ -76,7 +76,7 @@ module Gather = let program = clContext.Compile gather - fun (processor: DeviceCommandQueue<_>) (positions: ClArray) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (positions: ClArray) (values: ClArray<'a>) (outputArray: ClArray<'a>) -> if positions.Length <> outputArray.Length then failwith "Lengths must be the same" @@ -86,9 +86,6 @@ module Gather = let ndRange = Range1D.CreateValid(positions.Length, workGroupSize) - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange positions.Length values.Length positions values outputArray) - ) + kernel.KernelFunc ndRange positions.Length values.Length positions values outputArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel diff --git a/src/GraphBLAS-sharp.Backend/Common/Map.fs b/src/GraphBLAS-sharp.Backend/Common/Map.fs index e794d62c..9e0cacea 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Map.fs @@ -25,7 +25,7 @@ module Map = let kernel = clContext.Compile map - fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (inputArray: ClArray<'a>) -> let result = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) @@ -35,9 +35,9 @@ module Map = let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length inputArray result)) + kernel.KernelFunc ndRange inputArray.Length inputArray result - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel result @@ -60,16 +60,16 @@ module Map = let kernel = clContext.Compile map - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(inputArray.Length, workGroupSize) let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length inputArray)) + kernel.KernelFunc ndRange inputArray.Length inputArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Builds a new array whose elements are the results of applying the given function @@ -91,7 +91,7 @@ module Map = let kernel = clContext.Compile map - fun (processor: DeviceCommandQueue<_>) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> + fun (processor: RawCommandQueue) allocationMode (value: 'a) (inputArray: ClArray<'b>) -> let result = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) @@ -103,13 +103,11 @@ module Map = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray.Length valueClCell inputArray result) - ) + kernel.KernelFunc ndRange inputArray.Length valueClCell inputArray result - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel - valueClCell.Free processor + valueClCell.Free() result @@ -136,19 +134,16 @@ module Map = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> + fun (processor: RawCommandQueue) (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) (resultArray: ClArray<'c>) -> let ndRange = Range1D.CreateValid(resultArray.Length, workGroupSize) let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange resultArray.Length leftArray rightArray resultArray) - ) + kernel.KernelFunc ndRange resultArray.Length leftArray rightArray resultArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Builds a new array whose elements are the results of applying the given function @@ -164,7 +159,7 @@ module Map = let map2 = map2InPlace<'a, 'b, 'c> map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftArray: ClArray<'a>) (rightArray: ClArray<'b>) -> let resultArray = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftArray.Length) diff --git a/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs b/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs index 80cb8bda..a34c7c29 100644 --- a/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs +++ b/src/GraphBLAS-sharp/Objects/MatrixExtensions.fs @@ -9,68 +9,68 @@ open GraphBLAS.FSharp.Objects.ClVectorExtensions module MatrixExtensions = // Matrix.Free type ClMatrix.COO<'a when 'a: struct> with - member this.Free(q: DeviceCommandQueue<_>) = - this.Columns.Free q - this.Values.Free q - this.Rows.Free q + member this.Free(q: RawCommandQueue) = + this.Columns.Free() + this.Values.Free() + this.Rows.Free() - member this.ToHost(q: DeviceCommandQueue<_>) = + member this.ToHost(q: RawCommandQueue) = { RowCount = this.RowCount ColumnCount = this.ColumnCount Rows = this.Rows.ToHost q Columns = this.Columns.ToHost q Values = this.Values.ToHost q } - member this.ToHostAndFree(q: DeviceCommandQueue<_>) = + member this.ToHostAndFree(q: RawCommandQueue) = let result = this.ToHost q this.Free q result type ClMatrix.CSR<'a when 'a: struct> with - member this.Free(q: DeviceCommandQueue<_>) = - this.Values.Free q - this.Columns.Free q - this.RowPointers.Free q + member this.Free(q: RawCommandQueue) = + this.Values.Free() + this.Columns.Free() + this.RowPointers.Free() - member this.ToHost(q: DeviceCommandQueue<_>) = + member this.ToHost(q: RawCommandQueue) = { RowCount = this.RowCount ColumnCount = this.ColumnCount RowPointers = this.RowPointers.ToHost q ColumnIndices = this.Columns.ToHost q Values = this.Values.ToHost q } - member this.ToHostAndFree(q: DeviceCommandQueue<_>) = + member this.ToHostAndFree(q: RawCommandQueue) = let result = this.ToHost q this.Free q result type ClMatrix.CSC<'a when 'a: struct> with - member this.Free(q: DeviceCommandQueue<_>) = - this.Values.Free q - this.Rows.Free q - this.ColumnPointers.Free q + member this.Free(q: RawCommandQueue) = + this.Values.Free() + this.Rows.Free() + this.ColumnPointers.Free() - member this.ToHost(q: DeviceCommandQueue<_>) = + member this.ToHost(q: RawCommandQueue) = { RowCount = this.RowCount ColumnCount = this.ColumnCount RowIndices = this.Rows.ToHost q ColumnPointers = this.ColumnPointers.ToHost q Values = this.Values.ToHost q } - member this.ToHostAndFree(q: DeviceCommandQueue<_>) = + member this.ToHostAndFree(q: RawCommandQueue) = let result = this.ToHost q this.Free q result type ClMatrix.LIL<'a when 'a: struct> with - member this.Free(q: DeviceCommandQueue<_>) = + member this.Free(q: RawCommandQueue) = this.Rows - |> List.iter (Option.iter (fun row -> row.Dispose q)) + |> List.iter (Option.iter (fun row -> row.Dispose())) - member this.ToHost(q: DeviceCommandQueue<_>) = + member this.ToHost(q: RawCommandQueue) = { RowCount = this.RowCount ColumnCount = this.ColumnCount Rows = @@ -78,32 +78,32 @@ module MatrixExtensions = |> List.map (Option.map (fun row -> row.ToHost q)) NNZ = this.NNZ } - member this.ToHostAndFree(q: DeviceCommandQueue<_>) = + member this.ToHostAndFree(q: RawCommandQueue) = let result = this.ToHost q this.Free q result type ClMatrix<'a when 'a: struct> with - member this.ToHost(q: DeviceCommandQueue<_>) = + member this.ToHost(q: RawCommandQueue) = match this with | ClMatrix.COO m -> m.ToHost q |> Matrix.COO | ClMatrix.CSR m -> m.ToHost q |> Matrix.CSR | ClMatrix.CSC m -> m.ToHost q |> Matrix.CSC | ClMatrix.LIL m -> m.ToHost q |> Matrix.LIL - member this.Free(q: DeviceCommandQueue<_>) = + member this.Free(q: RawCommandQueue) = match this with | ClMatrix.COO m -> m.Free q | ClMatrix.CSR m -> m.Free q | ClMatrix.CSC m -> m.Free q | ClMatrix.LIL m -> m.Free q - member this.FreeAndWait(processor: DeviceCommandQueue<_>) = + member this.FreeAndWait(processor: RawCommandQueue) = this.Free processor processor.Synchronize() - member this.ToHostAndFree(processor: DeviceCommandQueue<_>) = + member this.ToHostAndFree(processor: RawCommandQueue) = let result = this.ToHost processor this.Free processor diff --git a/src/GraphBLAS-sharp/Objects/VectorExtensions.fs b/src/GraphBLAS-sharp/Objects/VectorExtensions.fs index 958f01e5..bd69f8bb 100644 --- a/src/GraphBLAS-sharp/Objects/VectorExtensions.fs +++ b/src/GraphBLAS-sharp/Objects/VectorExtensions.fs @@ -6,13 +6,13 @@ open GraphBLAS.FSharp.Objects.ArraysExtensions module ClVectorExtensions = type ClVector.Sparse<'a> with - member this.ToHost(q: Brahma.FSharp.DeviceCommandQueue<_>) = + member this.ToHost(q: Brahma.FSharp.RawCommandQueue) = { Indices = this.Indices.ToHost q Values = this.Values.ToHost q Size = this.Size } type ClVector<'a when 'a: struct> with - member this.ToHost(q: Brahma.FSharp.DeviceCommandQueue<_>) = + member this.ToHost(q: Brahma.FSharp.RawCommandQueue) = match this with | ClVector.Sparse vector -> Vector.Sparse <| vector.ToHost q | ClVector.Dense vector -> Vector.Dense <| vector.ToHost q From 5195a86690d6b2211bc2845e7b3ac1ade6f9f65a Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Fri, 10 May 2024 17:27:12 +0300 Subject: [PATCH 092/102] RawCommandQueue 2 --- .../GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs | 6 +++--- .../Backend/Algorithms/PageRank.fs | 2 +- .../GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs | 2 +- .../Backend/Common/ClArray/Blit.fs | 2 +- .../Backend/Common/ClArray/Choose.fs | 4 ++-- .../Backend/Common/ClArray/ChunkBySize.fs | 4 ++-- .../Backend/Common/ClArray/Concat.fs | 3 +-- .../Backend/Common/ClArray/Copy.fs | 11 +++++++---- .../Backend/Common/ClArray/ExcludeElements.fs | 4 ++-- .../Backend/Common/ClArray/Item.fs | 2 +- .../Backend/Common/ClArray/Replicate.fs | 2 +- tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs | 6 +++--- .../Backend/Common/Reduce/Reduce.fs | 4 ++-- .../Backend/Common/Reduce/ReduceByKey.fs | 10 +++++----- .../Backend/Common/Reduce/Sum.fs | 2 +- .../Backend/Common/Scan/ByKey.fs | 4 ++-- .../Backend/Common/Scan/PrefixSum.fs | 10 ++++------ .../GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs | 6 +++--- tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs | 2 +- tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs | 2 +- tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs | 2 +- .../Backend/Matrix/SpGeMM/Expand.fs | 2 +- .../Backend/Vector/AssignByMask.fs | 12 ++++++------ .../GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs | 6 +++--- tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs | 6 +++--- tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs | 10 +++++----- tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs | 12 ++++++------ tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs | 4 ++-- tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs | 8 ++++---- tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs | 6 +++--- tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs | 4 ++-- .../Backend/Vector/ZeroCreate.fs | 4 ++-- tests/GraphBLAS-sharp.Tests/Helpers.fs | 10 +++++++--- 33 files changed, 89 insertions(+), 85 deletions(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index 2a0453a8..0583ddb7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -78,9 +78,9 @@ let testFixtures (testContext: TestContext) = matrix.Dispose queue matrixBool.Dispose queue - res.Dispose queue - resSparse.Dispose queue - resPushPull.Dispose queue + res.Dispose() + resSparse.Dispose() + resPushPull.Dispose() match resHost, resHostSparse, resHostPushPull with | Vector.Dense resHost, Vector.Dense resHostSparse, Vector.Dense resHostPushPull -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs index ebd3eab6..b141cd1e 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -104,7 +104,7 @@ let testFixtures (testContext: TestContext) = preparedMatrix.Dispose queue matrix.Dispose queue - res.Dispose queue + res.Dispose() match resHost with | Vector.Dense resHost -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index 3cffbd7d..5ddca196 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -52,7 +52,7 @@ let testFixtures (testContext: TestContext) = let resHost = resDense.ToHost queue matrix.Dispose queue - resDense.Dispose queue + resDense.Dispose() match resHost with | Vector.Dense resHost -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs index 55df7a4a..bc026886 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Blit.fs @@ -24,7 +24,7 @@ let makeTest<'a> isEqual testFun (source: 'a [], sourceIndex, target: 'a [], tar testFun processor clSource sourceIndex clTarget targetIndex count - clSource.Free processor + clSource.Free() let actual = clTarget.ToHostAndFree processor // write to target --- target expected diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs index 4797b6fb..83f55a79 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Choose.fs @@ -73,8 +73,8 @@ let makeTest2 testContext isEqual opMap testFun (firstArray: 'a [], secondArray: testFun processor HostInterop clFirstArray clSecondArray let actual = clActual.ToHostAndFree processor - clFirstArray.Free processor - clSecondArray.Free processor + clFirstArray.Free() + clSecondArray.Free() "Results must be the same" |> Utils.compareArrays isEqual actual expected diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs index 513984c4..315aa12f 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ChunkBySize.fs @@ -25,7 +25,7 @@ let makeTestGetChunk<'a when 'a: equality> testFun (array: 'a [], startPosition, let (clActual: ClArray<'a>) = testFun processor HostInterop clArray startPosition count - clArray.Free processor + clArray.Free() let actual = clActual.ToHostAndFree processor "Results must be the same" @@ -56,7 +56,7 @@ let makeTestChunkBySize<'a when 'a: equality> isEqual testFun (array: 'a [], chu let clActual: ClArray<'a> [] = (testFun processor HostInterop chunkSize clArray) - clArray.Free processor + clArray.Free() let actual = clActual diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs index 1d704e0c..526a85f2 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Concat.fs @@ -26,8 +26,7 @@ let makeTest<'a> isEqual testFun (arrays: 'a [] []) = // release let actual = clActual.ToHostAndFree processor - clArrays - |> Seq.iter (fun array -> array.Free processor) + clArrays |> Seq.iter (fun array -> array.Free()) let expected = Seq.concat arrays |> Seq.toArray diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs index 42ed90cc..68f3adff 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Copy.fs @@ -19,15 +19,18 @@ let q = Context.defaultContext.Queue let config = Utils.defaultConfig -let makeTest<'a when 'a: equality> copyFun (array: array<'a>) = +let makeTest<'a when 'a: equality> + (copyFun: RawCommandQueue -> AllocationFlag -> ClArray<'a> -> int -> ClArray<'a>) + (array: array<'a>) + = if array.Length > 0 then - let clArray = context.CreateClArray array + let clArray: ClArray<'a> = context.CreateClArray array let actual = - (copyFun q HostInterop clArray: ClArray<_>) + (copyFun q DeviceOnly clArray clArray.Length) .ToHostAndFree q - clArray.Free q + clArray.Free() logger.debug ( eventX "Actual is {actual}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs index 33a94b92..c5817d45 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/ExcludeElements.fs @@ -29,8 +29,8 @@ let makeTest<'a> isEqual (zero: 'a) testFun ((array, bitmap): 'a array * int arr actual |> Option.map (fun a -> a.ToHostAndFree processor) - arrayCl.Free processor - bitmapCl.Free processor + arrayCl.Free() + bitmapCl.Free() let expected = (bitmap, array) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs index 00e21cde..638ecd75 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Item.fs @@ -24,7 +24,7 @@ let makeTest<'a when 'a: equality> testFun (array: 'a [], position) = let result: ClCell<'a> = testFun processor position clArray - clArray.Free processor + clArray.Free() let actual = result.ToHost processor let expected = Array.item position array diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs index a0710b53..b6d11d3c 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/ClArray/Replicate.fs @@ -27,7 +27,7 @@ let makeTest<'a when 'a: equality> replicateFun (array: array<'a>) i = (replicateFun q HostInterop clArray i: ClArray<'a>) .ToHostAndFree q - clArray.Free q + clArray.Free() logger.debug ( eventX $"Actual is {actual}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs index 094d8f44..ab68213b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Gather.fs @@ -39,8 +39,8 @@ let makeTest isEqual testFun (array: (uint * 'a * 'a) []) = testFun processor clPositions clValues clTarget - clPositions.Free processor - clValues.Free processor + clPositions.Free() + clValues.Free() let actual = clTarget.ToHostAndFree processor @@ -81,7 +81,7 @@ let makeTestInit isEqual testFun indexMap (array: ('a * 'a) []) = testFun processor clValues clTarget - clValues.Free processor + clValues.Free() let actual = clTarget.ToHostAndFree processor diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs index 9f6b987a..8f6457ad 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Reduce.fs @@ -19,7 +19,7 @@ let wgSize = Constants.Common.defaultWorkGroupSize let q = Context.defaultContext.Queue -let makeTest (reduce: DeviceCommandQueue<_> -> ClArray<'a> -> ClCell<'a>) plus zero (array: 'a []) = +let makeTest (reduce: RawCommandQueue -> ClArray<'a> -> ClCell<'a>) plus zero (array: 'a []) = if array.Length > 0 then let reduce = reduce q @@ -33,7 +33,7 @@ let makeTest (reduce: DeviceCommandQueue<_> -> ClArray<'a> -> ClCell<'a>) plus z let clArray = context.CreateClArray array let total = reduce clArray - clArray.Free q + clArray.Free() total.ToHostAndFree q logger.debug ( diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs index 16a5f46b..18abe5c8 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/ReduceByKey.fs @@ -52,8 +52,8 @@ let makeTest isEqual reduce reduceOp (arrayAndKeys: (int * 'a) []) = let clActualValues, clActualKeys: ClArray<'a> * ClArray = reduce processor HostInterop resultLength clKeys clValues - clValues.Free processor - clKeys.Free processor + clValues.Free() + clKeys.Free() let actualValues = clActualValues.ToHostAndFree processor let actualKeys = clActualKeys.ToHostAndFree processor @@ -235,9 +235,9 @@ let makeTest2D isEqual reduce reduceOp (array: (int * int * 'a) []) = let clActualValues, clFirstActualKeys, clSecondActualKeys: ClArray<'a> * ClArray * ClArray = reduce processor HostInterop resultLength clFirstKeys clSecondKeys clValues - clValues.Free processor - clFirstKeys.Free processor - clSecondKeys.Free processor + clValues.Free() + clFirstKeys.Free() + clSecondKeys.Free() let actualValues = clActualValues.ToHostAndFree processor diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs index d8bc6778..a05a7165 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Reduce/Sum.fs @@ -32,7 +32,7 @@ let makeTest plus zero sum (array: 'a []) = let clArray = context.CreateClArray array let (total: ClCell<_>) = sum q clArray - clArray.Free q + clArray.Free() total.ToHostAndFree q logger.debug ( diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs index d48efa75..9da27c2b 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/ByKey.fs @@ -41,8 +41,8 @@ let makeTestSequentialSegments isEqual scanHost scanDevice (keysAndValues: (int scanDevice processor uniqueKeysCount clValues clKeys clOffsets let actual = clValues.ToHostAndFree processor - clKeys.Free processor - clOffsets.Free processor + clKeys.Free() + clOffsets.Free() let keysAndValues = Array.zip keys values diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs index 85866388..0d4e3d34 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs @@ -29,7 +29,7 @@ let makeTest plus zero isEqual scan (array: 'a []) = let actual, actualSum = let clArray = context.CreateClArray array - let (total: ClCell<_>) = scan q clArray zero + let (total: ClCell<_>) = scan q clArray let actual = clArray.ToHostAndFree q let actualSum = total.ToHostAndFree q @@ -45,7 +45,7 @@ let makeTest plus zero isEqual scan (array: 'a []) = |> Array.mapFold (fun s t -> let a = plus s t - a, a) + s, a) zero logger.debug ( @@ -60,13 +60,11 @@ let makeTest plus zero isEqual scan (array: 'a []) = |> Tests.Utils.compareArrays isEqual actual expected let testFixtures plus plusQ zero isEqual name = - Common.PrefixSum.runIncludeInPlace plusQ context wgSize + Common.PrefixSum.runExcludeInPlace plusQ zero context wgSize |> makeTest plus zero isEqual |> testPropertyWithConfig config $"Correctness on %s{name}" let tests = - //q.Error.Add(fun e -> failwithf "%A" e) - [ testFixtures (+) <@ (+) @> 0 (=) "int add" testFixtures (+) <@ (+) @> 0uy (=) "byte add" testFixtures max <@ max @> 0 (=) "int max" @@ -83,4 +81,4 @@ let tests = testFixtures min <@ min @> System.Byte.MaxValue (=) "byte min" testFixtures (||) <@ (||) @> false (=) "bool logic-or" testFixtures (&&) <@ (&&) @> true (=) "bool logic-and" ] - |> testList "Backend.Common.PrefixSum tests" + |> testList "Backend.Common.PrefixSum tests" \ No newline at end of file diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs index a27d9d65..a9e337dd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scatter.fs @@ -33,8 +33,8 @@ let makeTest<'a when 'a: equality> hostScatter scatter (array: (int * 'a) []) (r scatter q clPositions clValues clResult - clValues.Free q - clPositions.Free q + clValues.Free() + clPositions.Free() clResult.ToHostAndFree q $"Arrays should be equal." @@ -81,7 +81,7 @@ let makeTestInit<'a when 'a: equality> hostScatter valueMap scatter (positions: scatter q clPositions clResult - clPositions.Free q + clPositions.Free() let actual = clResult.ToHostAndFree q $"Arrays should be equal." diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs index e82311fa..a01bd2f4 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs @@ -52,7 +52,7 @@ let checkResult isEqual op zero (baseMtx: 'a [,]) (actual: Matrix<'a>) = let correctnessGenericTest zero op - (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'b>) + (addFun: RawCommandQueue -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'b>) toCOOFun (isEqual: 'a -> 'a -> bool) q diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs index 7cd0763a..c0968c5c 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs @@ -52,7 +52,7 @@ let checkResult isEqual op zero (baseMtx1: 'a [,]) (baseMtx2: 'a [,]) (actual: M let correctnessGenericTest zero op - (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'a> -> ClMatrix<'c>) + (addFun: RawCommandQueue -> AllocationFlag -> ClMatrix<'a> -> ClMatrix<'a> -> ClMatrix<'c>) toCOOFun (isEqual: 'a -> 'a -> bool) q diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs index c491034e..59053230 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs @@ -190,7 +190,7 @@ let makeTestCSR isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = let leftValues = clLeftValues.ToHostAndFree processor let rightValues = clRightValues.ToHostAndFree processor - clIsEndOfRow.Free processor + clIsEndOfRow.Free() let isLeft = clIsLeft.ToHostAndFree processor let actualValues = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs index 2daf91fd..88087fe5 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs @@ -134,7 +134,7 @@ let makeExpandTest isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) clLeftMatrix.Dispose processor clRightMatrix.Dispose processor - clSegmentPointers.Free processor + clSegmentPointers.Free() let actualLeftValues = clActualLeftValues.ToHostAndFree processor diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs index 12d19b0b..5af11879 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/AssignByMask.fs @@ -50,8 +50,8 @@ let checkResult isZero isComplemented (actual: Vector<'a>) (vector: 'a []) (mask let makeTest<'a when 'a: struct and 'a: equality> (isZero: 'a -> bool) - (toDense: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (fillVector: DeviceCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) + (toDense: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (fillVector: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> 'a -> ClVector<'a>) isComplemented case (vector: 'a [], mask: 'a [], value: 'a) @@ -80,10 +80,10 @@ let makeTest<'a when 'a: struct and 'a: equality> let actual = cooClActual.ToHost q - clLeftVector.Dispose q - clMaskVector.Dispose q - clActual.Dispose q - cooClActual.Dispose q + clLeftVector.Dispose() + clMaskVector.Dispose() + clActual.Dispose() + cooClActual.Dispose() checkResult isZero isComplemented actual vector mask value with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs index d2cd3201..a755be58 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs @@ -21,7 +21,7 @@ let wgSize = Constants.Common.defaultWorkGroupSize let makeTest formatFrom - (convertFun: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (convertFun: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) isZero case (array: 'a []) @@ -41,8 +41,8 @@ let makeTest let res = convertedVector.ToHost q - clVector.Dispose q - convertedVector.Dispose q + clVector.Dispose() + convertedVector.Dispose() res diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs index 8bad7f63..df17455f 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Copy.fs @@ -37,7 +37,7 @@ let checkResult (isEqual: 'a -> 'a -> bool) (actual: Vector<'a>) (expected: Vect let correctnessGenericTest<'a when 'a: struct> isEqual zero - (copy: DeviceCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (copy: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) (case: OperationCase) (array: 'a []) = @@ -54,8 +54,8 @@ let correctnessGenericTest<'a when 'a: struct> let clVectorCopy = copy q HostInterop clVector let actual = clVectorCopy.ToHost q - clVector.Dispose q - clVectorCopy.Dispose q + clVector.Dispose() + clVectorCopy.Dispose() checkResult isEqual actual expected diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs index b612ea09..e1445b96 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map.fs @@ -46,8 +46,8 @@ let checkResult isEqual op zero (baseVector: 'a []) (actual: Vector<'b>) = let correctnessGenericTest zero op - (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) - (toDense: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (addFun: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (toDense: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) (isEqual: 'a -> 'a -> bool) (case: OperationCase) (array: 'a []) @@ -68,14 +68,14 @@ let correctnessGenericTest try let res = addFun q HostInterop vector - vector.Dispose q + vector.Dispose() let denseActual = toDense q HostInterop res let actual = denseActual.ToHost q - res.Dispose q - denseActual.Dispose q + res.Dispose() + denseActual.Dispose() checkResult isEqual op zero array actual with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs index 9bf49795..d7d8515d 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Map2.fs @@ -45,8 +45,8 @@ let correctnessGenericTest isEqual zero op - (addFun: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) - (toDense: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (addFun: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a> -> ClVector<'a> option) + (toDense: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) case (leftArray: 'a [], rightArray: 'a []) = @@ -78,14 +78,14 @@ let correctnessGenericTest let actual = denseActual.ToHost q - res.Dispose q - denseActual.Dispose q + res.Dispose() + denseActual.Dispose() checkResult isEqual zero op actual leftArray rightArray | _ -> () - firstVector.Dispose q - secondVector.Dispose q + firstVector.Dispose() + secondVector.Dispose() with | ex when ex.Message = "InvalidBufferSize" -> () | ex -> raise ex diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs index a1afec05..21629319 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Merge.fs @@ -34,8 +34,8 @@ let makeTest isEqual zero testFun (firstArray: 'a []) (secondArray: 'a []) = (isLeftBitmap: ClArray)) = testFun processor clFirstVector clSecondVector - clFirstVector.Dispose processor - clSecondVector.Dispose processor + clFirstVector.Dispose() + clSecondVector.Dispose() let actualIndices = allIndices.ToHostAndFree processor let actualFirstValues = firstValues.ToHostAndFree processor diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs index 55df56cb..54b572a7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/OfList.fs @@ -36,8 +36,8 @@ let checkResult let correctnessGenericTest<'a when 'a: struct> (isEqual: 'a -> 'a -> bool) - (ofList: DeviceCommandQueue<_> -> AllocationFlag -> VectorFormat -> int -> (int * 'a) list -> ClVector<'a>) - (toCoo: DeviceCommandQueue<_> -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (ofList: RawCommandQueue -> AllocationFlag -> VectorFormat -> int -> (int * 'a) list -> ClVector<'a>) + (toCoo: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) (case: OperationCase) (elements: (int * 'a) []) (sizeDelta: int) @@ -65,8 +65,8 @@ let correctnessGenericTest<'a when 'a: struct> let actual = clCooActual.ToHost q - clActual.Dispose q - clCooActual.Dispose q + clActual.Dispose() + clCooActual.Dispose() checkResult isEqual indices values actual actualSize diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index 4a118197..05147079 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -60,7 +60,7 @@ let correctnessGenericTest some sumOp mulOp - (spMV: DeviceCommandQueue<_> -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) + (spMV: RawCommandQueue -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a> option) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -87,10 +87,10 @@ let correctnessGenericTest match spMV testContext.Queue m v with | Some (ClVector.Sparse res) -> m.Dispose q - v.Dispose q + v.Dispose() let hostResIndices = res.Indices.ToHost q let hostResValues = res.Values.ToHost q - res.Dispose q + res.Dispose() checkResult sumOp mulOp zero matrix vector hostResIndices hostResValues | _ -> failwith "Result should not be empty while standard operations are tested" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index bbfeb9a9..334d0b6e 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -51,7 +51,7 @@ let correctnessGenericTest zero sumOp mulOp - (spMV: DeviceCommandQueue<_> -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) + (spMV: RawCommandQueue -> AllocationFlag -> ClMatrix<'a> -> ClVector<'a> -> ClVector<'a>) (isEqual: 'a -> 'a -> bool) q (testContext: TestContext) @@ -73,7 +73,7 @@ let correctnessGenericTest let res = spMV testContext.Queue HostInterop m v m.Dispose q - v.Dispose q + v.Dispose() match res with | ClVector.Dense res -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs index 2a7cf1ea..fb15d602 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/ZeroCreate.fs @@ -31,7 +31,7 @@ let checkResult size (actual: Vector<'a>) = Expect.equal vector.Indices [| 0 |] "The index array must contain the 0" let correctnessGenericTest<'a when 'a: struct and 'a: equality> - (zeroCreate: DeviceCommandQueue<_> -> AllocationFlag -> int -> VectorFormat -> ClVector<'a>) + (zeroCreate: RawCommandQueue -> AllocationFlag -> int -> VectorFormat -> ClVector<'a>) (case: OperationCase) (vectorSize: int) = @@ -47,7 +47,7 @@ let correctnessGenericTest<'a when 'a: struct and 'a: equality> let hostVector = clVector.ToHost q - clVector.Dispose q + clVector.Dispose() checkResult vectorSize hostVector with diff --git a/tests/GraphBLAS-sharp.Tests/Helpers.fs b/tests/GraphBLAS-sharp.Tests/Helpers.fs index cea7b549..b2e819ef 100644 --- a/tests/GraphBLAS-sharp.Tests/Helpers.fs +++ b/tests/GraphBLAS-sharp.Tests/Helpers.fs @@ -402,7 +402,7 @@ module HostPrimitives = module Context = type TestContext = { ClContext: ClContext - Queue: DeviceCommandQueue } + Queue: RawCommandQueue } let availableContexts (platformRegex: string) = let mutable e = ErrorCode.Unknown @@ -465,7 +465,10 @@ module Context = let translator = FSQuotationToOpenCLTranslator device let context = ClContext(device, translator) - let queue = context.QueueProvider.CreateQueue() + + let queue = + RawCommandQueue(context.ClDevice.Device, context.Context, context.Translator) + { ClContext = context; Queue = queue }) @@ -475,7 +478,8 @@ module Context = let context = ClContext(device, FSQuotationToOpenCLTranslator device) - let queue = context.QueueProvider.CreateQueue() + let queue = + RawCommandQueue(context.ClDevice.Device, context.Context, context.Translator) { ClContext = context; Queue = queue } From 470403814d095a72fe7e06d19a24896a87c653ab Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Fri, 10 May 2024 18:41:40 +0300 Subject: [PATCH 093/102] RawCommandQueue 3 --- .../Algorithms/BFS.fs | 2 +- .../Algorithms/PageRank.fs | 4 +- .../Matrix/Map2/Map2.fs | 6 +- .../Matrix/SpGeMM/Expand.fs | 4 +- .../Matrix/SpGeMM/Masked.fs | 8 +- .../Algorithms/MSBFS.fs | 20 +- .../Algorithms/PageRank.fs | 12 +- .../Algorithms/PageRank.fsi | 2 +- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 302 ++++++++++++------ src/GraphBLAS-sharp.Backend/Common/Common.fs | 21 +- .../Common/PrefixSum.fs | 58 ++-- src/GraphBLAS-sharp.Backend/Common/Scan.fs | 36 +-- src/GraphBLAS-sharp.Backend/Common/Scatter.fs | 17 +- .../Common/Sort/Bitonic.fs | 250 ++++++++++++++- .../Common/Sort/Radix.fs | 108 +++---- src/GraphBLAS-sharp.Backend/Common/Sum.fs | 282 +++++++--------- .../Matrix/COO/Intersect.fs | 28 +- src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs | 46 ++- .../Matrix/COO/Map2.fs | 99 +++--- .../Matrix/COO/Matrix.fs | 52 +-- .../Matrix/COO/Merge.fs | 54 ++-- src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs | 88 +++-- .../Matrix/CSR/Map2.fs | 97 +++--- .../Matrix/CSR/Matrix.fs | 65 ++-- .../Matrix/CSR/Merge.fs | 38 +-- src/GraphBLAS-sharp.Backend/Matrix/Common.fs | 4 +- .../Matrix/LIL/Matrix.fs | 2 +- src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs | 52 +-- .../Objects/ArraysExtentions.fs | 15 +- .../Objects/ClCellExtensions.fs | 11 +- src/GraphBLAS-sharp.Backend/Objects/Common.fs | 2 +- src/GraphBLAS-sharp.Backend/Objects/Matrix.fs | 57 ++-- src/GraphBLAS-sharp.Backend/Objects/Vector.fs | 14 +- .../Operations/Kronecker.fs | 145 ++++----- .../Operations/Operations.fs | 36 +-- .../Operations/SpGeMM/Expand.fs | 116 ++++--- .../Operations/SpGeMM/Masked.fs | 41 ++- .../Operations/SpMSpV.fs | 105 +++--- .../Operations/SpMV.fs | 34 +- .../Vector/Dense/Vector.fs | 124 ++++--- .../Vector/Sparse/Common.fs | 6 +- .../Vector/Sparse/Map.fs | 68 ++-- .../Vector/Sparse/Map2.fs | 161 ++++------ .../Vector/Sparse/Merge.fs | 36 +-- .../Vector/Sparse/Vector.fs | 20 +- src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 39 ++- .../Backend/Algorithms/BFS.fs | 4 +- .../Backend/Algorithms/MSBFS.fs | 4 +- .../Backend/Algorithms/PageRank.fs | 4 +- .../Backend/Algorithms/SSSP.fs | 2 +- .../Backend/Common/Scan/PrefixSum.fs | 2 +- .../Backend/Common/Sort/Bitonic.fs | 2 +- .../Backend/Matrix/Convert.fs | 4 +- .../Backend/Matrix/Intersect.fs | 4 +- .../Backend/Matrix/Kronecker.fs | 6 +- .../Backend/Matrix/Map.fs | 6 +- .../Backend/Matrix/Map2.fs | 8 +- .../Backend/Matrix/Merge.fs | 12 +- .../Backend/Matrix/RowsLengths.fs | 2 +- .../Backend/Matrix/SpGeMM/Expand.fs | 10 +- .../Backend/Matrix/SpGeMM/ExpandCOO.fs | 2 +- .../Backend/Matrix/SpGeMM/Masked.fs | 8 +- .../Backend/Matrix/Transpose.fs | 4 +- .../Backend/Vector/SpMSpV.fs | 2 +- .../Backend/Vector/SpMV.fs | 2 +- 65 files changed, 1511 insertions(+), 1364 deletions(-) diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs index c59e1dd7..9aa375d6 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/BFS.fs @@ -69,7 +69,7 @@ type Benchmarks<'elem when 'elem : struct>( this.ResultLevels <- this.FunToBenchmark this.Processor matrix vertex member this.ClearInputMatrix() = - matrix.Dispose this.Processor + matrix.Dispose() member this.ClearResult() = match this.ResultLevels with diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs index 7b70f1a8..dfd98a89 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Algorithms/PageRank.fs @@ -68,10 +68,10 @@ type Benchmarks( this.Result <- this.FunToBenchmark this.Processor matrixPrepared Constants.PageRank.accuracy member this.ClearInputMatrix() = - matrix.Dispose this.Processor + matrix.Dispose() member this.ClearPreparedMatrix() = - matrixPrepared.Dispose this.Processor + matrixPrepared.Dispose() member this.ClearResult() = this.Result.Dispose() diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs index 0d5c89fd..34446811 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/Map2/Map2.fs @@ -79,11 +79,11 @@ type Benchmarks<'matrixT, 'elem when 'matrixT :> IDeviceMemObject and 'elem : st this.ResultMatrix <- this.FunToBenchmark this.Processor HostInterop firstMatrix secondMatrix member this.ClearInputMatrices() = - firstMatrix.Dispose this.Processor - secondMatrix.Dispose this.Processor + firstMatrix.Dispose() + secondMatrix.Dispose() member this.ClearResult() = - this.ResultMatrix.Dispose this.Processor + this.ResultMatrix.Dispose() member this.ReadMatrices() = firstMatrixHost <- this.ReadMatrix <| fst this.InputMatrixReader diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs index 6f20c809..db0125e3 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Expand.fs @@ -77,11 +77,11 @@ type Benchmarks<'elem when 'elem : struct>( this.ResultMatrix <- this.FunToBenchmark this.Processor DeviceOnly matrix matrix member this.ClearInputMatrices() = - matrix.Dispose this.Processor + matrix.Dispose() member this.ClearResult() = match this.ResultMatrix with - | Some matrix -> matrix.Dispose this.Processor + | Some matrix -> matrix.Dispose() | None -> () member this.ReadMatrices() = diff --git a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs index f3ab8b66..3cfd844e 100644 --- a/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs +++ b/benchmarks/GraphBLAS-sharp.Benchmarks/Matrix/SpGeMM/Masked.fs @@ -100,12 +100,12 @@ type Masked<'elem when 'elem : struct>( this.ResultMatrix <- this.FunToBenchmark this.Processor firstMatrix secondMatrix mask member this.ClearInputMatrices() = - firstMatrix.Dispose this.Processor - secondMatrix.Dispose this.Processor - mask.Dispose this.Processor + firstMatrix.Dispose() + secondMatrix.Dispose() + mask.Dispose() member this.ClearResult() = - this.ResultMatrix.Dispose this.Processor + this.ResultMatrix.Dispose() member this.ReadMask(maskReader) = maskHost <- Matrix.COO <| this.ReadMatrix maskReader diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs index 41dbef46..4a1c8522 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/MSBFS.fs @@ -138,26 +138,26 @@ module internal MSBFS = //Getting new frontier match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with | None -> - front.Dispose queue + front.Dispose() stop <- true | Some newFrontier -> - front.Dispose queue + front.Dispose() //Filtering visited vertices match updateFrontAndLevels queue DeviceOnly level newFrontier levels with | l, Some f -> front <- f - levels.Dispose queue + levels.Dispose() levels <- l - newFrontier.Dispose queue + newFrontier.Dispose() | _, None -> stop <- true - newFrontier.Dispose queue + newFrontier.Dispose() ClMatrix.COO levels @@ -242,24 +242,24 @@ module internal MSBFS = //Getting new frontier match spGeMM queue DeviceOnly (ClMatrix.COO front) matrix with | None -> - front.Dispose queue + front.Dispose() stop <- true | Some newFrontier -> - front.Dispose queue + front.Dispose() //Filtering visited vertices match updateFrontAndParents queue DeviceOnly newFrontier parents with | p, Some f -> front <- f - parents.Dispose queue + parents.Dispose() parents <- p - newFrontier.Dispose queue + newFrontier.Dispose() | _, None -> stop <- true - newFrontier.Dispose queue + newFrontier.Dispose() ClMatrix.COO parents diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs index f71d5461..a13d567a 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fs @@ -16,9 +16,9 @@ module PageRank = type PageRankMatrix = | PreparedMatrix of ClMatrix - member this.Dispose(processor: RawCommandQueue) = + member this.Dispose() = match this with - | PreparedMatrix matrix -> matrix.Dispose processor + | PreparedMatrix matrix -> matrix.Dispose() let private countOutDegree (clContext: ClContext) workGroupSize = @@ -111,13 +111,7 @@ module PageRank = let ndRange = Range1D.CreateValid(matrix.RowCount * workGroupSize, workGroupSize) - kernel.KernelFunc - ndRange - matrix.RowCount - matrix.RowPointers - matrix.Values - outDegree - resultValues + kernel.KernelFunc ndRange matrix.RowCount matrix.RowPointers matrix.Values outDegree resultValues queue.RunKernel(kernel) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi index c4af2dce..1f95c19c 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi +++ b/src/GraphBLAS-sharp.Backend/Algorithms/PageRank.fsi @@ -7,7 +7,7 @@ open GraphBLAS.FSharp.Objects module PageRank = [] type PageRankMatrix = - member Dispose : RawCommandQueue -> unit + member Dispose : unit -> unit val internal prepareMatrix : ClContext -> int -> (RawCommandQueue -> ClMatrix -> PageRankMatrix) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 642be5c9..9c21781e 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -28,7 +28,7 @@ module ClArray = let program = clContext.Compile(init) - fun (processor: DeviceCommandQueue<_>) allocationMode (length: int) -> + fun (processor: RawCommandQueue) allocationMode (length: int) -> let outputArray = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, length) @@ -37,8 +37,8 @@ module ClArray = let ndRange = Range1D.CreateValid(length, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange outputArray length)) - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc ndRange outputArray length + processor.RunKernel kernel outputArray @@ -59,7 +59,7 @@ module ClArray = let program = clContext.Compile(create) - fun (processor: DeviceCommandQueue<_>) allocationMode (length: int) (value: 'a) -> + fun (processor: RawCommandQueue) allocationMode (length: int) (value: 'a) -> let value = clContext.CreateClCell(value) let outputArray = @@ -70,9 +70,9 @@ module ClArray = let ndRange = Range1D.CreateValid(length, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange outputArray length value)) - processor.Post(Msg.CreateRunMsg<_, _> kernel) - value.Free processor + kernel.KernelFunc ndRange outputArray length value + processor.RunKernel kernel + value.Free() outputArray @@ -85,7 +85,7 @@ module ClArray = let create = create clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode length -> + fun (processor: RawCommandQueue) allocationMode length -> create processor allocationMode length Unchecked.defaultof<'a> /// @@ -95,29 +95,30 @@ module ClArray = /// Should be a power of 2 and greater than 1. let copy (clContext: ClContext) workGroupSize = let copy = - <@ fun (ndRange: Range1D) (inputArrayBuffer: ClArray<'a>) (outputArrayBuffer: ClArray<'a>) inputArrayLength -> + <@ fun (ndRange: Range1D) (inputArrayBuffer: ClArray<'a>) (outputArrayBuffer: ClArray<'a>) resultSize -> let i = ndRange.GlobalID0 - if i < inputArrayLength then + if i < resultSize then outputArrayBuffer.[i] <- inputArrayBuffer.[i] @> let program = clContext.Compile(copy) - fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (inputArray: ClArray<'a>) (resultSize: int) -> + if resultSize > inputArray.Length then + failwith "Result size is greater than input array size" + let ndRange = - Range1D.CreateValid(inputArray.Length, workGroupSize) + Range1D.CreateValid(resultSize, workGroupSize) let outputArray = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, inputArray.Length) + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultSize) let kernel = program.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange inputArray outputArray inputArray.Length) - ) + kernel.KernelFunc ndRange inputArray outputArray resultSize - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel outputArray @@ -137,7 +138,7 @@ module ClArray = let program = clContext.Compile(copy) - fun (processor: DeviceCommandQueue<_>) (source: ClArray<'a>) (destination: ClArray<'a>) -> + fun (processor: RawCommandQueue) (source: ClArray<'a>) (destination: ClArray<'a>) -> if source.Length <> destination.Length then failwith "The source array length differs from the destination array length." @@ -146,9 +147,9 @@ module ClArray = let kernel = program.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange source destination source.Length)) + kernel.KernelFunc ndRange source destination source.Length - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel /// /// Creates an array of the given size by replicating the values of the given initial array. @@ -167,7 +168,7 @@ module ClArray = let kernel = clContext.Compile(replicate) - fun (processor: DeviceCommandQueue<_>) allocationMode (inputArray: ClArray<'a>) count -> + fun (processor: RawCommandQueue) allocationMode (inputArray: ClArray<'a>) count -> let outputArrayLength = inputArray.Length * count let outputArray = @@ -178,12 +179,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange inputArray outputArray inputArray.Length outputArrayLength) - ) + kernel.KernelFunc ndRange inputArray outputArray inputArray.Length outputArrayLength - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel outputArray @@ -195,6 +193,86 @@ module ClArray = /// Should be sorted. let removeDuplications (clContext: ClContext) workGroupSize = + let sequential = + <@ fun (ndRange: Range1D) (length: int) (keys: ClArray<'a>) (resultKeys: ClArray<'a>) (resultCount: ClCell) -> + let gid = ndRange.GlobalID0 + + if gid = 0 then + let mutable count = 0 + let mutable currentKey = keys.[0] + + let mutable offset = 1 + + while offset < length do + if keys.[offset] <> currentKey then + resultKeys.[count] <- currentKey + currentKey <- keys.[offset] + count <- count + 1 + + offset <- offset + 1 + + resultKeys.[count] <- currentKey + resultCount.Value <- count + 1 @> + + let maxWorkGroupSize = clContext.ClDevice.MaxWorkGroupSize + + let small = + <@ fun (ndRange: Range1D) keysLength (keys: ClArray<'a>) (resultKeys: ClArray<'a>) (resultCount: ClCell) -> + let lid = ndRange.LocalID0 + + let alignedSize = + (%ArithmeticOperations.ceilToPowerOfTwo) keysLength + + let offsets = localArray maxWorkGroupSize + + let mutable isUniqueKey = 0 + + if lid < keysLength then + let is_neq = lid > 0 && keys.[lid] <> keys.[lid - 1] + let is_first = lid = 0 + + if is_neq || is_first then + isUniqueKey <- 1 + else + isUniqueKey <- 0 + + offsets.[lid] <- isUniqueKey + + let mutable offset = 1 + + while offset < alignedSize do + barrierLocal () + let mutable value = offsets.[lid] + + if (offset <= lid) then + value <- value + offsets.[lid - offset] + + barrierLocal () + offsets.[lid] <- value + offset <- offset * 2 + + barrierLocal () + + let n_values = offsets.[keysLength - 1] + + if lid < n_values then + let id = lid + 1 + + let start_idx = + (%Search.Bin.lowerPositionLocal) keysLength id offsets + + match start_idx with + | Some idx -> resultKeys.[lid] <- keys.[idx] + | None -> () + + if lid = 0 then + resultCount.Value <- n_values @> + + let sequential = clContext.Compile sequential + let small = clContext.Compile small + + let copy = copy clContext workGroupSize + let scatter = Scatter.lastOccurrence clContext workGroupSize @@ -204,23 +282,72 @@ module ClArray = let prefixSumExclude = ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> + let sequentialSwitch = 32 + let smallSwitch = maxWorkGroupSize - let bitmap = - getUniqueBitmap processor DeviceOnly inputArray + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) -> - let resultLength = - (prefixSumExclude processor bitmap) - .ToHostAndFree(processor) + let inputLength = inputArray.Length - let outputArray = - clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + if inputLength = 1 then + copy processor DeviceOnly inputArray 1 + elif inputLength <= sequentialSwitch then + let resultLength = clContext.CreateClCell() - scatter processor bitmap inputArray outputArray + let temp = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, inputLength) - bitmap.Free processor + let kernel = sequential.GetKernel() - outputArray + let ndRange = Range1D.CreateValid(1, maxWorkGroupSize) + + kernel.KernelFunc ndRange inputArray.Length inputArray temp resultLength + + processor.RunKernel kernel + + let result = + copy processor DeviceOnly temp (resultLength.ToHostAndFree processor) + + temp.Free() + + result + else if inputLength <= smallSwitch then + let resultLength = clContext.CreateClCell() + + let temp = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, inputLength) + + let kernel = small.GetKernel() + + let ndRange = + Range1D.CreateValid(inputLength, maxWorkGroupSize) + + kernel.KernelFunc ndRange inputArray.Length inputArray temp resultLength + + processor.RunKernel kernel + + let result = + copy processor DeviceOnly temp (resultLength.ToHostAndFree processor) + + temp.Free() + + result + else + let bitmap = + getUniqueBitmap processor DeviceOnly inputArray + + let resultLength = + (prefixSumExclude processor bitmap) + .ToHostAndFree(processor) + + let outputArray = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) + + scatter processor bitmap inputArray outputArray + + bitmap.Free() + + outputArray /// /// Tests if any element of the array satisfies the given predicate. @@ -242,7 +369,7 @@ module ClArray = let kernel = clContext.Compile exists - fun (processor: DeviceCommandQueue<_>) (vector: ClArray<'a>) -> + fun (processor: RawCommandQueue) (vector: ClArray<'a>) -> let result = clContext.CreateClCell false @@ -251,9 +378,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange vector.Length vector result)) + kernel.KernelFunc ndRange vector.Length vector result - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel result @@ -284,7 +411,7 @@ module ClArray = let kernel = clContext.Compile assign - fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (positions: ClArray) (result: ClArray<'b>) -> + fun (processor: RawCommandQueue) (values: ClArray<'a>) (positions: ClArray) (result: ClArray<'b>) -> if values.Length <> positions.Length then failwith "Lengths must be the same" @@ -294,12 +421,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange values.Length values positions result result.Length) - ) + kernel.KernelFunc ndRange values.Length values positions result result.Length - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Applies the given function to each element of the array. @@ -319,7 +443,7 @@ module ClArray = let assignValues = assignOption predicate clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (sourceValues: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (sourceValues: ClArray<'a>) -> let positions = getBitmap processor DeviceOnly sourceValues @@ -329,7 +453,7 @@ module ClArray = .ToHostAndFree(processor) if resultLength = 0 then - positions.Free processor + positions.Free() None else @@ -338,7 +462,7 @@ module ClArray = assignValues processor sourceValues positions result - positions.Free processor + positions.Free() Some result @@ -371,7 +495,7 @@ module ClArray = let kernel = clContext.Compile assign - fun (processor: DeviceCommandQueue<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (positions: ClArray) (result: ClArray<'c>) -> + fun (processor: RawCommandQueue) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (positions: ClArray) (result: ClArray<'c>) -> if firstValues.Length <> secondValues.Length || secondValues.Length <> positions.Length then @@ -382,20 +506,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - firstValues.Length - firstValues - secondValues - positions - result - result.Length) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc ndRange firstValues.Length firstValues secondValues positions result result.Length + + processor.RunKernel kernel /// /// Applies the given function to each pair of elements of the two given arrays. @@ -415,7 +528,7 @@ module ClArray = let assignValues = assignOption2 predicate clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) -> + fun (processor: RawCommandQueue) allocationMode (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) -> let positions = getBitmap processor DeviceOnly firstValues secondValues @@ -450,7 +563,7 @@ module ClArray = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (sourceArray: ClArray<'a>) startIndex count -> + fun (processor: RawCommandQueue) allocationMode (sourceArray: ClArray<'a>) startIndex count -> if count <= 0 then failwith "Count must be greater than zero" @@ -468,9 +581,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange startIndex count sourceArray result)) + kernel.KernelFunc ndRange startIndex count sourceArray result - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel result @@ -486,7 +599,7 @@ module ClArray = let sub = sub clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode chunkSize (sourceArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode chunkSize (sourceArray: ClArray<'a>) -> if chunkSize <= 0 then failwith "The size of the chunk cannot be less than 1" @@ -513,7 +626,7 @@ module ClArray = let chunkBySizeLazy = lazyChunkBySize clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode chunkSize (sourceArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode chunkSize (sourceArray: ClArray<'a>) -> chunkBySizeLazy processor allocationMode chunkSize sourceArray |> Seq.map (fun lazyValue -> lazyValue.Value) |> Seq.toArray @@ -538,7 +651,7 @@ module ClArray = let kernel = clContext.Compile assign - fun (processor: DeviceCommandQueue<_>) (sourceArray: ClArray<'a>) sourceIndex (targetArray: ClArray<'a>) targetIndex count -> + fun (processor: RawCommandQueue) (sourceArray: ClArray<'a>) sourceIndex (targetArray: ClArray<'a>) targetIndex count -> if count = 0 then // nothing to do () @@ -559,12 +672,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange sourceIndex sourceArray targetArray targetIndex count) - ) + kernel.KernelFunc ndRange sourceIndex sourceArray targetArray targetIndex count - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Builds a new array that contains the elements of each of the given sequence of arrays. @@ -575,7 +685,7 @@ module ClArray = let blit = blit clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (sourceArrays: ClArray<'a> seq) -> + fun (processor: RawCommandQueue) allocationMode (sourceArrays: ClArray<'a> seq) -> let resultLength = sourceArrays @@ -613,7 +723,7 @@ module ClArray = let kernel = clContext.Compile fill - fun (processor: DeviceCommandQueue<_>) value firstPosition count (targetArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) value firstPosition count (targetArray: ClArray<'a>) -> if count = 0 then () else @@ -628,11 +738,9 @@ module ClArray = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange firstPosition count value targetArray) - ) + kernel.KernelFunc ndRange firstPosition count value targetArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Returns an array of each element in the input array and its predecessor, @@ -651,7 +759,7 @@ module ClArray = let map = Map.map2 <@ fun first second -> (first, second) @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (values: ClArray<'a>) -> if values.Length > 1 then let resultLength = values.Length - 1 @@ -668,8 +776,8 @@ module ClArray = let result = map processor allocationMode firstItems secondItems - firstItems.Free processor - secondItems.Free processor + firstItems.Free() + secondItems.Free() Some result else @@ -693,7 +801,7 @@ module ClArray = let program = clContext.Compile(kernel) - fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (value: ClCell<'a>) -> + fun (processor: RawCommandQueue) (values: ClArray<'a>) (value: ClCell<'a>) -> let result = clContext.CreateClCell Unchecked.defaultof<'b> @@ -701,8 +809,8 @@ module ClArray = let ndRange = Range1D.CreateValid(1, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange values.Length values value result)) - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc ndRange values.Length values value result + processor.RunKernel kernel result @@ -744,7 +852,7 @@ module ClArray = let program = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (index: int) (array: ClArray<'a>) -> + fun (processor: RawCommandQueue) (index: int) (array: ClArray<'a>) -> if index < 0 || index >= array.Length then failwith "Index out of range" @@ -756,8 +864,8 @@ module ClArray = let ndRange = Range1D.CreateValid(1, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange index array result)) - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc ndRange index array result + processor.RunKernel kernel result @@ -778,7 +886,7 @@ module ClArray = let program = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) (index: int) (value: 'a) -> + fun (processor: RawCommandQueue) (array: ClArray<'a>) (index: int) (value: 'a) -> if index < 0 || index >= array.Length then failwith "Index out of range" @@ -789,8 +897,8 @@ module ClArray = let ndRange = Range1D.CreateValid(1, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange index array value)) - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc ndRange index array value + processor.RunKernel kernel let count<'a> (predicate: Expr<'a -> bool>) (clContext: ClContext) workGroupSize = @@ -800,14 +908,14 @@ module ClArray = let getBitmap = Map.map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) -> + fun (processor: RawCommandQueue) (array: ClArray<'a>) -> let bitmap = getBitmap processor DeviceOnly array let result = (sum processor bitmap).ToHostAndFree processor - bitmap.Free processor + bitmap.Free() result @@ -883,7 +991,7 @@ module ClArray = let scatter = Scatter.lastOccurrence clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (excludeBitmap: ClArray) (inputArray: ClArray<'a>) -> + fun (queue: RawCommandQueue) allocationMode (excludeBitmap: ClArray) (inputArray: ClArray<'a>) -> invert queue excludeBitmap diff --git a/src/GraphBLAS-sharp.Backend/Common/Common.fs b/src/GraphBLAS-sharp.Backend/Common/Common.fs index eb3c7169..74e58119 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Common.fs @@ -7,6 +7,24 @@ open GraphBLAS.FSharp.Backend.Common module Common = module Sort = module Bitonic = + /// + /// Sorts in-place input array of values by their indices, + /// which are stored in two given arrays of keys: rows and columns. + /// When comparing, it first looks at rows, then columns. + /// Note that maximum possible workGroupSize is used internally for better perfomance. + /// + /// + /// + /// let keys = [| 0; 0; 3; 2; 1; 0; 5 |] + /// let values = [| 1.9; 2.8; 3.7; 4.6; 5.5; 6.4; 7.3; |] + /// sortKeyValuesInplace clContext 32 processor rows columns values + /// ... + /// > val keys = [| 0; 0; 0; 1; 2; 3; 5 |] + /// > val values = [| 1.9; 2.8; 6.4; 5.5; 4.6; 3.7; 7.3 |] + /// + /// + let sortKeyValuesInplace<'a> = Sort.Bitonic.sortKeyValuesInplace<'a> + /// /// Sorts in-place input array of values by their 2d indices, /// which are stored in two given arrays of keys: rows and columns. @@ -25,7 +43,8 @@ module Common = /// > val values = [| 1.9; 2.8; 6.4; 5.5; 4.6; 3.7; 7.3 |] /// /// - let sortKeyValuesInplace<'a> = Sort.Bitonic.sortKeyValuesInplace<'a> + let sortRowsColumnsValuesInplace<'a> = + Sort.Bitonic.sortRowsColumnsValuesInplace<'a> module Radix = /// diff --git a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs index e269c0bc..65d78a15 100644 --- a/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/PrefixSum.fs @@ -25,7 +25,7 @@ module PrefixSum = let program = clContext.Compile(update) - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (bunchLength: int) (mirror: bool) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (bunchLength: int) (mirror: bool) -> let kernel = program.GetKernel() @@ -34,13 +34,10 @@ module PrefixSum = let mirror = clContext.CreateClCell mirror - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange inputArrayLength bunchLength inputArray vertices mirror) - ) + kernel.KernelFunc ndRange inputArrayLength bunchLength inputArray vertices mirror - processor.Post(Msg.CreateRunMsg<_, _> kernel) - mirror.Free processor + processor.RunKernel kernel + mirror.Free() let private scanGeneral beforeLocalSumClear @@ -93,7 +90,7 @@ module PrefixSum = let program = clContext.Compile(scan) - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (verticesLength: int) (totalSum: ClCell<'a>) (zero: 'a) (mirror: bool) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) (inputArrayLength: int) (vertices: ClArray<'a>) (verticesLength: int) (totalSum: ClCell<'a>) (zero: 'a) (mirror: bool) -> // TODO: передавать zero как константу let zero = clContext.CreateClCell(zero) @@ -105,24 +102,12 @@ module PrefixSum = let mirror = clContext.CreateClCell mirror - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - inputArrayLength - verticesLength - inputArray - vertices - totalSum - zero - mirror) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - zero.Free processor - mirror.Free processor + kernel.KernelFunc ndRange inputArrayLength verticesLength inputArray vertices totalSum zero mirror + + processor.RunKernel kernel + + zero.Free() + mirror.Free() let private scanExclusive<'a when 'a: struct> = scanGeneral @@ -153,9 +138,7 @@ module PrefixSum = let update = update opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (zero: 'a) -> - - failwith "AAAAAAAAAAAAAAAAAA" + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) (zero: 'a) -> let firstVertices = clContext.CreateClArray<'a>( @@ -197,8 +180,8 @@ module PrefixSum = verticesArrays <- swap verticesArrays verticesLength <- (verticesLength - 1) / workGroupSize + 1 - firstVertices.Free processor - secondVertices.Free processor + firstVertices.Free() + secondVertices.Free() totalSum @@ -231,7 +214,7 @@ module PrefixSum = let scan = runExcludeInPlace <@ (+) @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray) -> + fun (processor: RawCommandQueue) (inputArray: ClArray) -> scan processor inputArray 0 @@ -256,7 +239,7 @@ module PrefixSum = let scan = runIncludeInPlace <@ (+) @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray) -> + fun (processor: RawCommandQueue) (inputArray: ClArray) -> scan processor inputArray 0 @@ -288,19 +271,16 @@ module PrefixSum = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) uniqueKeysCount (values: ClArray<'a>) (keys: ClArray) (offsets: ClArray) -> + fun (processor: RawCommandQueue) uniqueKeysCount (values: ClArray<'a>) (keys: ClArray) (offsets: ClArray) -> let kernel = kernel.GetKernel() let ndRange = Range1D.CreateValid(values.Length, workGroupSize) - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange values.Length uniqueKeysCount values keys offsets) - ) + kernel.KernelFunc ndRange values.Length uniqueKeysCount values keys offsets - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel /// /// Exclude scan by key. diff --git a/src/GraphBLAS-sharp.Backend/Common/Scan.fs b/src/GraphBLAS-sharp.Backend/Common/Scan.fs index c47613d4..b88c97fb 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Scan.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Scan.fs @@ -105,7 +105,7 @@ module internal ScanInternal = let preScan = clContext.Compile(preScan) - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (totalSum: ClCell<'a>) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) (totalSum: ClCell<'a>) -> let numberOfGroups = inputArray.Length / valuesPerBlock + (if inputArray.Length % valuesPerBlock = 0 then @@ -121,12 +121,9 @@ module internal ScanInternal = let preScanKernel = preScan.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> preScanKernel.KernelFunc ndRangePreScan inputArray.Length inputArray carry totalSum) - ) + preScanKernel.KernelFunc ndRangePreScan inputArray.Length inputArray carry totalSum - processor.Post(Msg.CreateRunMsg<_, _>(preScanKernel)) + processor.RunKernel preScanKernel carry, numberOfGroups > 1 @@ -150,7 +147,7 @@ module internal ScanInternal = let scan = clContext.Compile(scan) - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) (carry: ClArray<'a>) (totalSum: ClCell<'a>) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) (carry: ClArray<'a>) (totalSum: ClCell<'a>) -> let numberOfGroups = inputArray.Length / valuesPerBlock + (if inputArray.Length % valuesPerBlock = 0 then @@ -163,11 +160,9 @@ module internal ScanInternal = let scan = scan.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> scan.KernelFunc ndRangeScan inputArray.Length inputArray carry totalSum) - ) + scan.KernelFunc ndRangeScan inputArray.Length inputArray carry totalSum - processor.Post(Msg.CreateRunMsg<_, _>(scan)) + processor.RunKernel scan let runExcludeInPlace plus zero (clContext: ClContext) workGroupSize = @@ -190,7 +185,7 @@ module internal ScanInternal = let scan = scan plus false clContext workGroupSize let getTotalSum = clContext.Compile(getTotalSum) - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) -> let totalSum = clContext.CreateClCell<'a>() @@ -198,17 +193,14 @@ module internal ScanInternal = preScanSaveSum processor inputArray totalSum if not needRecursion then - carry.Free processor + carry.Free() let ndRangeTotalSum = Range1D.CreateValid(1, 1) let getTotalSum = getTotalSum.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> getTotalSum.KernelFunc ndRangeTotalSum inputArray.Length inputArray totalSum) - ) + getTotalSum.KernelFunc ndRangeTotalSum inputArray.Length inputArray totalSum - processor.Post(Msg.CreateRunMsg<_, _>(getTotalSum)) + processor.RunKernel getTotalSum else let mutable carryStack = [ carry; inputArray ] let mutable stop = not needRecursion @@ -223,7 +215,7 @@ module internal ScanInternal = carryStack <- carry :: carryStack else stop <- true - carry.Free processor + carry.Free() stop <- false @@ -237,7 +229,7 @@ module internal ScanInternal = else scan processor inputCarry carry totalSum - carry.Free processor + carry.Free() carryStack <- carryStack.Tail | _ -> failwith "carryStack always has at least 2 elements" @@ -265,6 +257,6 @@ module internal ScanInternal = let scan = runExcludeInPlace <@ (+) @> 0 clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray) -> + fun (processor: RawCommandQueue) (inputArray: ClArray) -> - scan processor inputArray \ No newline at end of file + scan processor inputArray diff --git a/src/GraphBLAS-sharp.Backend/Common/Scatter.fs b/src/GraphBLAS-sharp.Backend/Common/Scatter.fs index 60f359c4..c816ab7a 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Scatter.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Scatter.fs @@ -26,7 +26,7 @@ module Scatter = let program = clContext.Compile(run) - fun (processor: DeviceCommandQueue<_>) (positions: ClArray) (values: ClArray<'a>) (result: ClArray<'a>) -> + fun (processor: RawCommandQueue) (positions: ClArray) (values: ClArray<'a>) (result: ClArray<'a>) -> if positions.Length <> values.Length then failwith "Lengths must be the same" @@ -38,12 +38,9 @@ module Scatter = let kernel = program.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange positions positionsLength values result result.Length) - ) + kernel.KernelFunc ndRange positions positionsLength values result result.Length - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Creates a new array from the given one where it is indicated @@ -114,7 +111,7 @@ module Scatter = let program = clContext.Compile(run) - fun (processor: DeviceCommandQueue<_>) (positions: ClArray) (result: ClArray<'a>) -> + fun (processor: RawCommandQueue) (positions: ClArray) (result: ClArray<'a>) -> let positionsLength = positions.Length @@ -123,11 +120,9 @@ module Scatter = let kernel = program.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange positions positionsLength result result.Length) - ) + kernel.KernelFunc ndRange positions positionsLength result result.Length - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel /// /// Creates a new array from the given one where it is indicated by the array of positions at which position in the new array diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs index b1d7c95c..724de235 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs @@ -5,7 +5,7 @@ open GraphBLAS.FSharp.Backend module Bitonic = - let sortKeyValuesInplace<'a> (clContext: ClContext) (workGroupSize: int) = + let sortRowsColumnsValuesInplace<'a> (clContext: ClContext) (workGroupSize: int) = let localSize = Common.Utils.floorToPower2 ( @@ -209,7 +209,236 @@ module Bitonic = let localStep = clContext.Compile(localStep) let globalStep = clContext.Compile(globalStep) - fun (queue: DeviceCommandQueue<_>) (rows: ClArray) (cols: ClArray) (values: ClArray<'a>) -> + fun (queue: RawCommandQueue) (rows: ClArray) (cols: ClArray) (values: ClArray<'a>) -> + + let size = values.Length + + if (size = 1) then + () + else if (size <= localSize) then + let numberOfThreads = + Common.Utils.ceilToMultiple waveSize (min size maxThreadsPerBlock) + + let ndRangeLocal = + Range1D.CreateValid(numberOfThreads, numberOfThreads) + + let kernel = localStep.GetKernel() + + kernel.KernelFunc ndRangeLocal rows cols values values.Length + queue.RunKernel(kernel) + else + let numberOfGroups = + size / localSize + + (if size % localSize = 0 then 0 else 1) + + let ndRangeLocal = + Range1D.CreateValid(maxThreadsPerBlock * numberOfGroups, maxThreadsPerBlock) + + let kernelLocal = localStep.GetKernel() + + kernelLocal.KernelFunc ndRangeLocal rows cols values values.Length + + queue.RunKernel(kernelLocal) + + let ndRangeGlobal = + Range1D.CreateValid(maxWorkGroupSize, maxWorkGroupSize) + + let kernelGlobal = globalStep.GetKernel() + + kernelGlobal.KernelFunc ndRangeGlobal rows cols values values.Length (localSize * 2) + + queue.RunKernel(kernelGlobal) + + + let sortKeyValuesInplace<'a> (clContext: ClContext) (workGroupSize: int) = + + let localSize = + Common.Utils.floorToPower2 ( + int (clContext.ClDevice.LocalMemSize) + / (sizeof + sizeof<'a>) + ) + + let maxThreadsPerBlock = + min (clContext.ClDevice.MaxWorkGroupSize) (localSize / 2) + + let waveSize = 32 + let maxWorkGroupSize = clContext.ClDevice.MaxWorkGroupSize + + let localStep = + <@ fun (ndRange: Range1D) (rows: ClArray) (vals: ClArray<'a>) (length: int) -> + let gid = ndRange.GlobalID0 + let lid = ndRange.LocalID0 + let workGroupSize = ndRange.LocalWorkSize + let groupId = gid / workGroupSize + + let offset = groupId * localSize + let border = min (offset + localSize) length + let n = border - offset + + let nAligned = + (%Quotes.ArithmeticOperations.ceilToPowerOfTwo) n + + let numberOfThreads = nAligned / 2 + + let sortedKeys = localArray localSize + let sortedVals = localArray<'a> localSize + + let mutable i = lid + + while i + offset < border do + let key = rows.[i + offset] + sortedKeys.[i] <- key + sortedVals.[i] <- vals.[i + offset] + i <- i + workGroupSize + + barrierLocal () + + let mutable segmentSize = 2 + + while segmentSize <= nAligned do + let segmentSizeHalf = segmentSize / 2 + + let mutable tid = lid + + while tid < numberOfThreads do + let segmentId = tid / segmentSizeHalf + let innerId = tid % segmentSizeHalf + let innerIdSibling = segmentSize - innerId - 1 + let i = segmentId * segmentSize + innerId + let j = segmentId * segmentSize + innerIdSibling + + if (i < n && j < n && sortedKeys.[i] > sortedKeys.[j]) then + let tempK = sortedKeys.[i] + sortedKeys.[i] <- sortedKeys.[j] + sortedKeys.[j] <- tempK + let tempV = sortedVals.[i] + sortedVals.[i] <- sortedVals.[j] + sortedVals.[j] <- tempV + + tid <- tid + workGroupSize + + barrierLocal () + + let mutable k = segmentSizeHalf / 2 + + while k > 0 do + + let mutable tid = lid + + while tid < numberOfThreads do + let segmentSizeInner = k * 2 + let segmentId = tid / k + let innerId = tid % k + let innerIdSibling = innerId + k + let i = segmentId * segmentSizeInner + innerId + + let j = + segmentId * segmentSizeInner + innerIdSibling + + if (i < n && j < n && sortedKeys.[i] > sortedKeys.[j]) then + let tempK = sortedKeys.[i] + sortedKeys.[i] <- sortedKeys.[j] + sortedKeys.[j] <- tempK + let tempV = sortedVals.[i] + sortedVals.[i] <- sortedVals.[j] + sortedVals.[j] <- tempV + + tid <- tid + workGroupSize + + k <- k / 2 + barrierLocal () + + segmentSize <- segmentSize * 2 + + let mutable i = lid + + while i + offset < border do + let key = sortedKeys.[i] + rows.[i + offset] <- key + vals.[i + offset] <- sortedVals.[i] + i <- i + workGroupSize @> + + let globalStep = + <@ fun (ndRange: Range1D) (rows: ClArray) (vals: ClArray<'a>) (length: int) (segmentStart: int) -> + let lid = ndRange.LocalID0 + let workGroupSize = ndRange.LocalWorkSize + + let n = length + + let nAligned = + (%Quotes.ArithmeticOperations.ceilToPowerOfTwo) n + + let numberOfThreads = nAligned / 2 + + let mutable segmentSize = segmentStart + + while segmentSize <= nAligned do + let segmentSizeHalf = segmentSize / 2 + + let mutable tid = lid + + while tid < numberOfThreads do + let segmentId = tid / segmentSizeHalf + let innerId = tid % segmentSizeHalf + let innerIdSibling = segmentSize - innerId - 1 + let i = segmentId * segmentSize + innerId + let j = segmentId * segmentSize + innerIdSibling + + if (i < n && j < n) then + let keyI = rows.[i] + let keyJ = rows.[j] + + if (keyI > keyJ) then + let tempR = rows.[i] + rows.[i] <- rows.[j] + rows.[j] <- tempR + let tempV = vals.[i] + vals.[i] <- vals.[j] + vals.[j] <- tempV + + tid <- tid + workGroupSize + + barrierGlobal () + + let mutable k = segmentSizeHalf / 2 + + while k > 0 do + + let mutable tid = lid + + while tid < numberOfThreads do + let segmentSizeInner = k * 2 + let segmentId = tid / k + let innerId = tid % k + let innerIdSibling = innerId + k + let i = segmentId * segmentSizeInner + innerId + + let j = + segmentId * segmentSizeInner + innerIdSibling + + if (i < n && j < n) then + let keyI = rows.[i] + let keyJ = rows.[j] + + if (keyI > keyJ) then + let tempR = rows.[i] + rows.[i] <- rows.[j] + rows.[j] <- tempR + let tempV = vals.[i] + vals.[i] <- vals.[j] + vals.[j] <- tempV + + tid <- tid + workGroupSize + + k <- k / 2 + barrierGlobal () + + segmentSize <- segmentSize * 2 @> + + let localStep = clContext.Compile(localStep) + let globalStep = clContext.Compile(globalStep) + + fun (queue: RawCommandQueue) (rows: ClArray) (values: ClArray<'a>) -> let size = values.Length @@ -224,8 +453,8 @@ module Bitonic = let kernel = localStep.GetKernel() - queue.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRangeLocal rows cols values values.Length)) - queue.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc ndRangeLocal rows values values.Length + queue.RunKernel(kernel) else let numberOfGroups = size / localSize @@ -236,20 +465,15 @@ module Bitonic = let kernelLocal = localStep.GetKernel() - queue.Post( - Msg.MsgSetArguments(fun () -> kernelLocal.KernelFunc ndRangeLocal rows cols values values.Length) - ) + kernelLocal.KernelFunc ndRangeLocal rows values values.Length - queue.Post(Msg.CreateRunMsg<_, _>(kernelLocal)) + queue.RunKernel(kernelLocal) let ndRangeGlobal = Range1D.CreateValid(maxWorkGroupSize, maxWorkGroupSize) let kernelGlobal = globalStep.GetKernel() - queue.Post( - Msg.MsgSetArguments - (fun () -> kernelGlobal.KernelFunc ndRangeGlobal rows cols values values.Length (localSize * 2)) - ) + kernelGlobal.KernelFunc ndRangeGlobal rows values values.Length (localSize * 2) - queue.Post(Msg.CreateRunMsg<_, _>(kernelGlobal)) + queue.RunKernel(kernelGlobal) \ No newline at end of file diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 810f12d0..b09025ec 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -76,7 +76,7 @@ module internal Radix = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (indices: ClArray) (clWorkGroupCount: ClCell) (shift: ClCell) -> + fun (processor: RawCommandQueue) (indices: ClArray) (clWorkGroupCount: ClCell) (shift: ClCell) -> let ndRange = Range1D.CreateValid(indices.Length, workGroupSize) @@ -92,20 +92,16 @@ module internal Radix = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - indices.Length - indices - clWorkGroupCount - shift - globalOffsets - localOffsets) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + indices.Length + indices + clWorkGroupCount + shift + globalOffsets + localOffsets + + processor.RunKernel kernel globalOffsets, localOffsets @@ -133,20 +129,16 @@ module internal Radix = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (keys: ClArray) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (result: ClArray) -> + fun (processor: RawCommandQueue) (keys: ClArray) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (result: ClArray) -> let ndRange = Range1D.CreateValid(keys.Length, workGroupSize) let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc ndRange keys.Length keys shift workGroupCount globalOffset localOffsets result) - ) + kernel.KernelFunc ndRange keys.Length keys shift workGroupCount globalOffset localOffsets result - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel let private runKeysOnly (clContext: ClContext) workGroupSize bitCount = let copy = ClArray.copy clContext workGroupSize @@ -160,11 +152,11 @@ module internal Radix = let scatter = scatter clContext workGroupSize mask - fun (processor: DeviceCommandQueue<_>) (keys: ClArray) -> + fun (processor: RawCommandQueue) (keys: ClArray) -> if keys.Length <= 1 then - copy processor DeviceOnly keys // TODO(allocation mode) + copy processor DeviceOnly keys keys.Length else - let firstKeys = copy processor DeviceOnly keys + let firstKeys = copy processor DeviceOnly keys keys.Length let secondKeys = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, keys.Length) @@ -183,17 +175,17 @@ module internal Radix = let globalOffset, localOffset = count processor (fst pair) workGroupCount shift - (prefixSum processor globalOffset).Free processor + (prefixSum processor globalOffset).Free() scatter processor (fst pair) shift workGroupCount globalOffset localOffset (snd pair) pair <- swap pair - globalOffset.Free processor - localOffset.Free processor - shift.Free processor + globalOffset.Free() + localOffset.Free() + shift.Free() - (snd pair).Free processor + (snd pair).Free() fst pair let standardRunKeysOnly clContext workGroupSize = @@ -224,30 +216,26 @@ module internal Radix = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (keys: ClArray) (values: ClArray<'a>) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'a>) -> + fun (processor: RawCommandQueue) (keys: ClArray) (values: ClArray<'a>) (shift: ClCell) (workGroupCount: ClCell) (globalOffset: ClArray) (localOffsets: ClArray) (resultKeys: ClArray) (resultValues: ClArray<'a>) -> let ndRange = Range1D.CreateValid(keys.Length, workGroupSize) let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - keys.Length - keys - values - shift - workGroupCount - globalOffset - localOffsets - resultKeys - resultValues) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + keys.Length + keys + values + shift + workGroupCount + globalOffset + localOffsets + resultKeys + resultValues + + processor.RunKernel kernel let private runByKeys (clContext: ClContext) workGroupSize bitCount = let copy = ClArray.copy clContext workGroupSize @@ -264,19 +252,19 @@ module internal Radix = let scatterByKey = scatterByKey clContext workGroupSize mask - fun (processor: DeviceCommandQueue<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (keys: ClArray) (values: ClArray<'a>) -> if values.Length <> keys.Length then failwith "Mismatch of key lengths and value. Lengths must be the same" if values.Length <= 1 then - copy processor DeviceOnly keys, dataCopy processor DeviceOnly values + copy processor DeviceOnly keys keys.Length, dataCopy processor DeviceOnly values values.Length else - let firstKeys = copy processor DeviceOnly keys + let firstKeys = copy processor DeviceOnly keys keys.Length let secondKeys = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, keys.Length) - let firstValues = dataCopy processor DeviceOnly values + let firstValues = dataCopy processor DeviceOnly values values.Length let secondValues = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, values.Length) @@ -303,7 +291,7 @@ module internal Radix = let globalOffset, localOffset = count processor currentKeys workGroupCount shift - (prefixSum processor globalOffset).Free processor + (prefixSum processor globalOffset).Free() scatterByKey processor @@ -319,12 +307,12 @@ module internal Radix = keysPair <- swap keysPair valuesPair <- swap valuesPair - globalOffset.Free processor - localOffset.Free processor - shift.Free processor + globalOffset.Free() + localOffset.Free() + shift.Free() - (snd keysPair).Free processor - (snd valuesPair).Free processor + (snd keysPair).Free() + (snd valuesPair).Free() (fst keysPair, fst valuesPair) @@ -332,11 +320,11 @@ module internal Radix = let runByKeys = runByKeys clContext workGroupSize defaultBitCount - fun (processor: DeviceCommandQueue<_>) allocationMode (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (keys: ClArray) (values: ClArray<'a>) -> let keys, values = runByKeys processor allocationMode keys values - keys.Free processor + keys.Free() values diff --git a/src/GraphBLAS-sharp.Backend/Common/Sum.fs b/src/GraphBLAS-sharp.Backend/Common/Sum.fs index 0735d28a..475e4069 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sum.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sum.fs @@ -14,7 +14,7 @@ module Reduce = /// let private runGeneral (clContext: ClContext) workGroupSize scan scanToCell = - fun (processor: DeviceCommandQueue<_>) (inputArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (inputArray: ClArray<'a>) -> let scan = scan processor @@ -50,8 +50,8 @@ module Reduce = let result = scanToCell processor fstVertices verticesLength - firstVerticesArray.Free processor - secondVerticesArray.Free processor + firstVerticesArray.Free() + secondVerticesArray.Free() result @@ -80,17 +80,15 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange valuesLength valuesArray resultArray) - ) + kernel.KernelFunc ndRange valuesLength valuesArray resultArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel let private scanToCellSum (opAdd: Expr<'a -> 'a -> 'a>) (clContext: ClContext) workGroupSize zero = @@ -117,7 +115,7 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength -> + fun (processor: RawCommandQueue) (valuesArray: ClArray<'a>) valuesLength -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) @@ -126,9 +124,9 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange valuesLength valuesArray resultCell)) + kernel.KernelFunc ndRange valuesLength valuesArray resultCell - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel resultCell @@ -149,7 +147,7 @@ module Reduce = let run = runGeneral clContext workGroupSize scan scanToCell - fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) -> run processor array + fun (processor: RawCommandQueue) (array: ClArray<'a>) -> run processor array let private scanReduce<'a when 'a: struct> (opAdd: Expr<'a -> 'a -> 'a>) @@ -179,18 +177,16 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> + fun (processor: RawCommandQueue) (valuesArray: ClArray<'a>) valuesLength (resultArray: ClArray<'a>) -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange valuesLength valuesArray resultArray) - ) + kernel.KernelFunc ndRange valuesLength valuesArray resultArray - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel let private scanToCellReduce<'a when 'a: struct> (opAdd: Expr<'a -> 'a -> 'a>) @@ -220,7 +216,7 @@ module Reduce = let kernel = clContext.Compile(scan) - fun (processor: DeviceCommandQueue<_>) (valuesArray: ClArray<'a>) valuesLength -> + fun (processor: RawCommandQueue) (valuesArray: ClArray<'a>) valuesLength -> let ndRange = Range1D.CreateValid(valuesArray.Length, workGroupSize) @@ -230,9 +226,9 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange valuesLength valuesArray resultCell)) + kernel.KernelFunc ndRange valuesLength valuesArray resultCell - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel resultCell @@ -252,7 +248,7 @@ module Reduce = let run = runGeneral clContext workGroupSize scan scanToCell - fun (processor: DeviceCommandQueue<_>) (array: ClArray<'a>) -> run processor array + fun (processor: RawCommandQueue) (array: ClArray<'a>) -> run processor array /// /// Reduction of an array of values by an array of keys. @@ -295,7 +291,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -308,12 +304,9 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange keys.Length keys values reducedValues reducedKeys) - ) + kernel.KernelFunc ndRange keys.Length keys values reducedValues reducedKeys - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel reducedValues, reducedKeys @@ -352,7 +345,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -365,21 +358,9 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - resultLength - keys.Length - offsets - keys - values - reducedValues - reducedKeys) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc ndRange resultLength keys.Length offsets keys values reducedValues reducedKeys + + processor.RunKernel kernel reducedValues, reducedKeys @@ -448,7 +429,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (keys: ClArray) (values: ClArray<'a>) -> if keys.Length > workGroupSize then failwith "The length of the value should not exceed the size of the workgroup" @@ -463,12 +444,9 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange keys.Length keys values reducedValues reducedKeys) - ) + kernel.KernelFunc ndRange keys.Length keys values reducedValues reducedKeys - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel reducedValues, reducedKeys @@ -531,14 +509,14 @@ module Reduce = let prefixSum = ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> + fun (processor: RawCommandQueue) allocationMode (keys: ClArray) (values: ClArray<'a option>) -> let offsets = getUniqueBitmap processor DeviceOnly keys let uniqueKeysCount = (prefixSum processor offsets) - .ToHostAndFree processor + .ToHostAndFree(processor) let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) @@ -554,33 +532,29 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - uniqueKeysCount - keys.Length - offsets - keys - values - reducedValues - reducedKeys - resultPositions) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - - offsets.Free processor + kernel.KernelFunc + ndRange + uniqueKeysCount + keys.Length + offsets + keys + values + reducedValues + reducedKeys + resultPositions + + processor.RunKernel kernel + + offsets.Free() let resultLength = (prefixSum processor resultPositions) - .ToHostAndFree processor + .ToHostAndFree(processor) if resultLength = 0 then - reducedValues.Free processor - reducedKeys.Free processor - resultPositions.Free processor + reducedValues.Free() + reducedKeys.Free() + resultPositions.Free() None else // write values @@ -589,7 +563,7 @@ module Reduce = scatterData processor resultPositions reducedValues resultValues - reducedValues.Free processor + reducedValues.Free() // write keys let resultKeys = @@ -597,8 +571,8 @@ module Reduce = scatterIndices processor resultPositions reducedKeys resultKeys - reducedKeys.Free processor - resultPositions.Free processor + reducedKeys.Free() + resultPositions.Free() Some(resultValues, resultKeys) @@ -663,7 +637,7 @@ module Reduce = let prefixSum = ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (offsets: ClArray) (keys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultLength) @@ -679,31 +653,27 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - resultLength - keys.Length - offsets - keys - values - reducedValues - reducedKeys - resultPositions) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + resultLength + keys.Length + offsets + keys + values + reducedValues + reducedKeys + resultPositions + + processor.RunKernel kernel let resultLength = (prefixSum processor resultPositions) - .ToHostAndFree processor + .ToHostAndFree(processor) if resultLength = 0 then - reducedValues.Free processor - reducedKeys.Free processor - resultPositions.Free processor + reducedValues.Free() + reducedKeys.Free() + resultPositions.Free() None else @@ -713,7 +683,7 @@ module Reduce = scatterData processor resultPositions reducedValues resultValues - reducedValues.Free processor + reducedValues.Free() // write keys let resultKeys = @@ -721,8 +691,8 @@ module Reduce = scatterIndices processor resultPositions reducedKeys resultKeys - reducedKeys.Free processor - resultPositions.Free processor + reducedKeys.Free() + resultPositions.Free() Some(resultValues, resultKeys) @@ -772,7 +742,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -788,21 +758,17 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - firstKeys.Length - firstKeys - secondKeys - values - reducedValues - firstReducedKeys - secondReducedKeys) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + firstKeys.Length + firstKeys + secondKeys + values + reducedValues + firstReducedKeys + secondReducedKeys + + processor.RunKernel kernel reducedValues, firstReducedKeys, secondReducedKeys @@ -845,7 +811,7 @@ module Reduce = let kernel = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -861,23 +827,19 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - resultLength - firstKeys.Length - offsets - firstKeys - secondKeys - values - reducedValues - firstReducedKeys - secondReducedKeys) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + resultLength + firstKeys.Length + offsets + firstKeys + secondKeys + values + reducedValues + firstReducedKeys + secondReducedKeys + + processor.RunKernel kernel reducedValues, firstReducedKeys, secondReducedKeys @@ -942,7 +904,7 @@ module Reduce = let prefixSum = ScanInternal.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> + fun (processor: RawCommandQueue) allocationMode (resultLength: int) (offsets: ClArray) (firstKeys: ClArray) (secondKeys: ClArray) (values: ClArray<'a>) -> let reducedValues = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) @@ -961,34 +923,30 @@ module Reduce = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - resultLength - firstKeys.Length - offsets - firstKeys - secondKeys - values - reducedValues - firstReducedKeys - secondReducedKeys - resultPositions) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + resultLength + firstKeys.Length + offsets + firstKeys + secondKeys + values + reducedValues + firstReducedKeys + secondReducedKeys + resultPositions + + processor.RunKernel kernel let resultLength = (prefixSum processor resultPositions) - .ToHostAndFree processor + .ToHostAndFree(processor) if resultLength = 0 then - reducedValues.Free processor - firstReducedKeys.Free processor - secondReducedKeys.Free processor - resultPositions.Free processor + reducedValues.Free() + firstReducedKeys.Free() + secondReducedKeys.Free() + resultPositions.Free() None else @@ -998,7 +956,7 @@ module Reduce = scatterData processor resultPositions reducedValues resultValues - reducedValues.Free processor + reducedValues.Free() // write first keys let resultFirstKeys = @@ -1006,7 +964,7 @@ module Reduce = scatterIndices processor resultPositions firstReducedKeys resultFirstKeys - firstReducedKeys.Free processor + firstReducedKeys.Free() // write second keys let resultSecondKeys = @@ -1014,8 +972,8 @@ module Reduce = scatterIndices processor resultPositions secondReducedKeys resultSecondKeys - secondReducedKeys.Free processor + secondReducedKeys.Free() - resultPositions.Free processor + resultPositions.Free() Some(resultValues, resultFirstKeys, resultSecondKeys) diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs index 0ac96889..701b5f4f 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Intersect.fs @@ -30,7 +30,7 @@ module internal Intersect = let kernel = clContext.Compile <| findIntersection - fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> let bitmapSize = leftMatrix.NNZ @@ -42,20 +42,16 @@ module internal Intersect = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - leftMatrix.NNZ - rightMatrix.NNZ - leftMatrix.Rows - leftMatrix.Columns - rightMatrix.Rows - rightMatrix.Columns - bitmap) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + leftMatrix.NNZ + rightMatrix.NNZ + leftMatrix.Rows + leftMatrix.Columns + rightMatrix.Rows + rightMatrix.Columns + bitmap + + processor.RunKernel kernel bitmap diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs index 7903c711..e3434771 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions module internal Map = let private preparePositions<'a, 'b> opAdd (clContext: ClContext) workGroupSize = @@ -40,7 +41,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> + fun (processor: RawCommandQueue) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -61,24 +62,21 @@ module internal Map = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - rowCount - columnCount - values.Length - values - rowPointers - columns - resultBitmap - resultValues - resultRows - resultColumns) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + + kernel.KernelFunc + ndRange + rowCount + columnCount + values.Length + values + rowPointers + columns + resultBitmap + resultValues + resultRows + resultColumns + + processor.RunKernel kernel resultBitmap, resultValues, resultRows, resultColumns @@ -94,7 +92,7 @@ module internal Map = let setPositions = Common.setPositions<'b> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (queue: RawCommandQueue) allocationMode (matrix: ClMatrix.COO<'a>) -> let bitmap, values, rows, columns = map queue matrix.RowCount matrix.ColumnCount matrix.Values matrix.Rows matrix.Columns @@ -102,10 +100,10 @@ module internal Map = let resultRows, resultColumns, resultValues, _ = setPositions queue allocationMode rows columns values bitmap - queue.Post(Msg.CreateFreeMsg<_>(bitmap)) - queue.Post(Msg.CreateFreeMsg<_>(values)) - queue.Post(Msg.CreateFreeMsg<_>(rows)) - queue.Post(Msg.CreateFreeMsg<_>(columns)) + bitmap.Free() + values.Free() + rows.Free() + columns.Free() { Context = clContext RowCount = matrix.RowCount diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs index 7f27dc1a..33a74edc 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Map2.fs @@ -5,6 +5,7 @@ open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions open GraphBLAS.FSharp.Backend open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Backend.Matrix @@ -44,7 +45,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> + fun (processor: RawCommandQueue) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -65,28 +66,24 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - rowCount - columnCount - leftValues.Length - rightValues.Length - leftValues - leftRows - leftColumns - rightValues - rightRows - rightColumns - resultBitmap - resultValues - resultRows - resultColumns) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + rowCount + columnCount + leftValues.Length + rightValues.Length + leftValues + leftRows + leftColumns + rightValues + rightRows + rightColumns + resultBitmap + resultValues + resultRows + resultColumns + + processor.RunKernel kernel resultBitmap, resultValues, resultRows, resultColumns @@ -105,7 +102,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> + fun (queue: RawCommandQueue) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> let bitmap, values, rows, columns = map2 @@ -122,10 +119,10 @@ module internal Map2 = let resultRows, resultColumns, resultValues, _ = setPositions queue allocationMode rows columns values bitmap - queue.Post(Msg.CreateFreeMsg<_>(bitmap)) - queue.Post(Msg.CreateFreeMsg<_>(values)) - queue.Post(Msg.CreateFreeMsg<_>(rows)) - queue.Post(Msg.CreateFreeMsg<_>(columns)) + bitmap.Free() + values.Free() + rows.Free() + columns.Free() { Context = clContext RowCount = matrixLeft.RowCount @@ -176,7 +173,7 @@ module internal Map2 = let kernel = clContext.Compile(preparePositions) - fun (processor: DeviceCommandQueue<_>) (allRows: ClArray) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> + fun (processor: RawCommandQueue) (allRows: ClArray) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> let length = leftValues.Length let ndRange = @@ -190,22 +187,18 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - length - allRows - allColumns - leftValues - rightValues - allValues - rawPositionsGpu - isLeft) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + length + allRows + allColumns + leftValues + rightValues + allValues + rawPositionsGpu + isLeft + + processor.RunKernel kernel rawPositionsGpu, allValues @@ -227,7 +220,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> + fun (queue: RawCommandQueue) allocationMode (matrixLeft: ClMatrix.COO<'a>) (matrixRight: ClMatrix.COO<'b>) -> let allRows, allColumns, leftMergedValues, rightMergedValues, isLeft = merge queue matrixLeft matrixRight @@ -235,17 +228,17 @@ module internal Map2 = let rawPositions, allValues = preparePositions queue allRows allColumns leftMergedValues rightMergedValues isLeft - queue.Post(Msg.CreateFreeMsg<_>(leftMergedValues)) - queue.Post(Msg.CreateFreeMsg<_>(rightMergedValues)) + leftMergedValues.Free() + rightMergedValues.Free() let resultRows, resultColumns, resultValues, _ = setPositions queue allocationMode allRows allColumns allValues rawPositions - queue.Post(Msg.CreateFreeMsg<_>(isLeft)) - queue.Post(Msg.CreateFreeMsg<_>(rawPositions)) - queue.Post(Msg.CreateFreeMsg<_>(allRows)) - queue.Post(Msg.CreateFreeMsg<_>(allColumns)) - queue.Post(Msg.CreateFreeMsg<_>(allValues)) + isLeft.Free() + rawPositions.Free() + allRows.Free() + allColumns.Free() + allValues.Free() { Context = clContext RowCount = matrixLeft.RowCount diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs index 8f1044c5..9bf0f6ce 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Matrix.fs @@ -22,13 +22,13 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: COO<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: COO<'a>) -> { Context = clContext RowCount = matrix.RowCount ColumnCount = matrix.ColumnCount - Rows = copy processor allocationMode matrix.Rows - Columns = copy processor allocationMode matrix.Columns - Values = copyData processor allocationMode matrix.Values } + Rows = copy processor allocationMode matrix.Rows matrix.Rows.Length + Columns = copy processor allocationMode matrix.Columns matrix.Columns.Length + Values = copyData processor allocationMode matrix.Values matrix.Values.Length } /// /// Builds a new COO matrix whose elements are the results of applying the given function @@ -83,16 +83,16 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.COO<'a>) -> let resultRows = - copy processor allocationMode matrix.Rows + copy processor allocationMode matrix.Rows matrix.Rows.Length let resultColumns = - copy processor allocationMode matrix.Columns + copy processor allocationMode matrix.Columns matrix.Columns.Length let resultValues = - copyData processor allocationMode matrix.Values + copyData processor allocationMode matrix.Values matrix.Values.Length { Context = clContext RowIndices = resultRows @@ -124,7 +124,7 @@ module Matrix = let scan = Common.PrefixSum.runBackwardsIncludeInPlace <@ min @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (rowIndices: ClArray) rowCount -> + fun (processor: RawCommandQueue) allocationMode (rowIndices: ClArray) rowCount -> let nnz = rowIndices.Length @@ -134,10 +134,10 @@ module Matrix = let kernel = program.GetKernel() let ndRange = Range1D.CreateValid(nnz, workGroupSize) - processor.Post(Msg.MsgSetArguments(fun () -> kernel.KernelFunc ndRange rowIndices nnz rowPointers)) - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc ndRange rowIndices nnz rowPointers + processor.RunKernel kernel - (scan processor rowPointers nnz).Free processor + (scan processor rowPointers nnz).Free() rowPointers @@ -154,15 +154,15 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.COO<'a>) -> let rowPointers = prepare processor allocationMode matrix.Rows matrix.RowCount let cols = - copy processor allocationMode matrix.Columns + copy processor allocationMode matrix.Columns matrix.Columns.Length let values = - copyData processor allocationMode matrix.Values + copyData processor allocationMode matrix.Values matrix.Values.Length { Context = clContext RowCount = matrix.RowCount @@ -180,11 +180,11 @@ module Matrix = let toCSRInPlace (clContext: ClContext) workGroupSize = let prepare = compressRows clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.COO<'a>) -> let rowPointers = prepare processor allocationMode matrix.Rows matrix.RowCount - matrix.Rows.Free processor + matrix.Rows.Free() { Context = clContext RowCount = matrix.RowCount @@ -202,9 +202,9 @@ module Matrix = let transposeInPlace (clContext: ClContext) workGroupSize = let sort = - Common.Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + Common.Sort.Bitonic.sortRowsColumnsValuesInplace clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.COO<'a>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix.COO<'a>) -> sort queue matrix.Columns matrix.Rows matrix.Values { Context = clContext @@ -227,14 +227,14 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.COO<'a>) -> + fun (queue: RawCommandQueue) allocationMode (matrix: ClMatrix.COO<'a>) -> { Context = clContext RowCount = matrix.RowCount ColumnCount = matrix.ColumnCount - Rows = copy queue allocationMode matrix.Rows - Columns = copy queue allocationMode matrix.Columns - Values = copyData queue allocationMode matrix.Values } + Rows = copy queue allocationMode matrix.Rows matrix.Rows.Length + Columns = copy queue allocationMode matrix.Columns matrix.Columns.Length + Values = copyData queue allocationMode matrix.Values matrix.Values.Length } |> transposeInPlace queue /// @@ -288,7 +288,7 @@ module Matrix = let blitData = ClArray.blit clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode startRow count (matrix: ClMatrix.COO<'a>) -> + fun (processor: RawCommandQueue) allocationMode startRow count (matrix: ClMatrix.COO<'a>) -> if count <= 0 then failwith "Count must be greater than zero" @@ -311,8 +311,8 @@ module Matrix = .ToHostAndFree processor - 1 - firstRowClCell.Free processor - lastRowClCell.Free processor + firstRowClCell.Free() + lastRowClCell.Free() let resultLength = lastIndex - firstIndex + 1 diff --git a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs index 4683a32f..340d9db2 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/COO/Merge.fs @@ -132,7 +132,7 @@ module Merge = let kernel = clContext.Compile(merge) - fun (processor: DeviceCommandQueue<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> + fun (processor: RawCommandQueue) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'b>) -> let firstSide = leftMatrix.Columns.Length let secondSide = rightMatrix.Columns.Length @@ -158,28 +158,24 @@ module Merge = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - firstSide - secondSide - sumOfSides - leftMatrix.Rows - leftMatrix.Columns - leftMatrix.Values - rightMatrix.Rows - rightMatrix.Columns - rightMatrix.Values - allRows - allColumns - leftMergedValues - rightMergedValues - isLeft) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + firstSide + secondSide + sumOfSides + leftMatrix.Rows + leftMatrix.Columns + leftMatrix.Values + rightMatrix.Rows + rightMatrix.Columns + rightMatrix.Values + allRows + allColumns + leftMergedValues + rightMergedValues + isLeft + + processor.RunKernel kernel allRows, allColumns, leftMergedValues, rightMergedValues, isLeft @@ -199,7 +195,7 @@ module Merge = let merge = run clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'a>) -> + fun (processor: RawCommandQueue) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.COO<'a>) -> let length = leftMatrix.Columns.Length @@ -212,14 +208,12 @@ module Merge = let mergeValuesKernel = mergeValuesKernel.GetKernel() - processor.Post( - Msg.MsgSetArguments(fun () -> mergeValuesKernel.KernelFunc ndRange length leftValues rightValues isLeft) - ) + mergeValuesKernel.KernelFunc ndRange length leftValues rightValues isLeft - processor.Post(Msg.CreateRunMsg<_, _>(mergeValuesKernel)) + processor.RunKernel(mergeValuesKernel) - isLeft.Free processor - rightValues.Free processor + isLeft.Free() + rightValues.Free() { Context = clContext Rows = rows diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs index 3b024e15..2d407992 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map.fs @@ -41,7 +41,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions op - fun (processor: DeviceCommandQueue<_>) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> + fun (processor: RawCommandQueue) rowCount columnCount (values: ClArray<'a>) (rowPointers: ClArray) (columns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -62,23 +62,19 @@ module internal Map = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - rowCount - columnCount - values - rowPointers - columns - resultBitmap - resultValues - resultRows - resultColumns) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + rowCount + columnCount + values + rowPointers + columns + resultBitmap + resultValues + resultRows + resultColumns + + processor.RunKernel kernel resultBitmap, resultValues, resultRows, resultColumns @@ -94,7 +90,7 @@ module internal Map = let setPositions = Common.setPositions<'b> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (queue: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> let bitmap, values, rows, columns = map queue matrix.RowCount matrix.ColumnCount matrix.Values matrix.RowPointers matrix.Columns @@ -102,10 +98,10 @@ module internal Map = let resultRows, resultColumns, resultValues, _ = setPositions queue allocationMode rows columns values bitmap - bitmap.Free queue - values.Free queue - rows.Free queue - columns.Free queue + bitmap.Free() + values.Free() + rows.Free() + columns.Free() { Context = clContext RowCount = matrix.RowCount @@ -144,7 +140,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions op - fun (processor: DeviceCommandQueue<_>) (operand: ClCell<'a option>) (matrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) (operand: ClCell<'a option>) (matrix: ClMatrix.CSR<'b>) -> let resultLength = matrix.RowCount * matrix.ColumnCount @@ -165,24 +161,20 @@ module internal Map = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - operand - matrix.RowCount - matrix.ColumnCount - matrix.Values - matrix.RowPointers - matrix.Columns - resultBitmap - resultValues - resultRows - resultColumns) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + operand + matrix.RowCount + matrix.ColumnCount + matrix.Values + matrix.RowPointers + matrix.Columns + resultBitmap + resultValues + resultRows + resultColumns + + processor.RunKernel kernel resultBitmap, resultValues, resultRows, resultColumns @@ -198,20 +190,20 @@ module internal Map = let setPositions = Common.setPositionsOption<'c> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (value: 'a option) (matrix: ClMatrix.CSR<'b>) -> + fun (queue: RawCommandQueue) allocationMode (value: 'a option) (matrix: ClMatrix.CSR<'b>) -> let valueClCell = clContext.CreateClCell value let bitmap, values, rows, columns = mapWithValue queue valueClCell matrix - valueClCell.Free queue + valueClCell.Free() let result = setPositions queue allocationMode rows columns values bitmap - bitmap.Free queue - values.Free queue - rows.Free queue - columns.Free queue + bitmap.Free() + values.Free() + rows.Free() + columns.Free() result |> Option.map diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs index 9ae65f96..4e0b9322 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Map2.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions module internal Map2 = let private preparePositions<'a, 'b, 'c> opAdd (clContext: ClContext) workGroupSize = @@ -46,7 +47,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> + fun (processor: RawCommandQueue) rowCount columnCount (leftValues: ClArray<'a>) (leftRows: ClArray) (leftColumns: ClArray) (rightValues: ClArray<'b>) (rightRows: ClArray) (rightColumns: ClArray) -> let (resultLength: int) = columnCount * rowCount @@ -67,26 +68,22 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - rowCount - columnCount - leftValues - leftRows - leftColumns - rightValues - rightRows - rightColumns - resultBitmap - resultValues - resultRows - resultColumns) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + rowCount + columnCount + leftValues + leftRows + leftColumns + rightValues + rightRows + rightColumns + resultBitmap + resultValues + resultRows + resultColumns + + processor.RunKernel kernel resultBitmap, resultValues, resultRows, resultColumns @@ -105,7 +102,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> + fun (queue: RawCommandQueue) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> let bitmap, values, rows, columns = map2 @@ -122,10 +119,10 @@ module internal Map2 = let resultRows, resultColumns, resultValues, _ = setPositions queue allocationMode rows columns values bitmap - queue.Post(Msg.CreateFreeMsg<_>(bitmap)) - queue.Post(Msg.CreateFreeMsg<_>(values)) - queue.Post(Msg.CreateFreeMsg<_>(rows)) - queue.Post(Msg.CreateFreeMsg<_>(columns)) + bitmap.Free() + values.Free() + rows.Free() + columns.Free() { Context = clContext RowCount = matrixLeft.RowCount @@ -166,7 +163,7 @@ module internal Map2 = let kernel = clContext.Compile(preparePositions) - fun (processor: DeviceCommandQueue<_>) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isEndOfRow: ClArray) (isLeft: ClArray) -> + fun (processor: RawCommandQueue) (allColumns: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isEndOfRow: ClArray) (isLeft: ClArray) -> let length = leftValues.Length let ndRange = @@ -180,22 +177,18 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - length - allColumns - leftValues - rightValues - allValues - rowPositions - isEndOfRow - isLeft) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + length + allColumns + leftValues + rightValues + allValues + rowPositions + isEndOfRow + isLeft + + processor.RunKernel kernel rowPositions, allValues let run<'a, 'b, 'c when 'a: struct and 'b: struct and 'c: struct and 'c: equality> @@ -212,7 +205,7 @@ module internal Map2 = let setPositions = Common.setPositions<'c> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> + fun (queue: RawCommandQueue) allocationMode (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSR<'b>) -> let allRows, allColumns, leftMergedValues, rightMergedValues, isRowEnd, isLeft = merge queue matrixLeft matrixRight @@ -220,18 +213,18 @@ module internal Map2 = let positions, allValues = preparePositions queue allColumns leftMergedValues rightMergedValues isRowEnd isLeft - queue.Post(Msg.CreateFreeMsg<_>(leftMergedValues)) - queue.Post(Msg.CreateFreeMsg<_>(rightMergedValues)) + leftMergedValues.Free() + rightMergedValues.Free() let resultRows, resultColumns, resultValues, _ = setPositions queue allocationMode allRows allColumns allValues positions - queue.Post(Msg.CreateFreeMsg<_>(allRows)) - queue.Post(Msg.CreateFreeMsg<_>(isLeft)) - queue.Post(Msg.CreateFreeMsg<_>(isRowEnd)) - queue.Post(Msg.CreateFreeMsg<_>(positions)) - queue.Post(Msg.CreateFreeMsg<_>(allColumns)) - queue.Post(Msg.CreateFreeMsg<_>(allValues)) + allRows.Free() + isLeft.Free() + isRowEnd.Free() + positions.Free() + allColumns.Free() + allValues.Free() { Context = clContext RowCount = matrixLeft.RowCount diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs index 36125b3d..06d8ee7a 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Matrix.fs @@ -32,7 +32,7 @@ module Matrix = let program = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, matrix.Columns.Length) @@ -42,18 +42,9 @@ module Matrix = let ndRange = Range1D.CreateValid(matrix.Columns.Length, workGroupSize) - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - matrix.Columns.Length - matrix.RowPointers.Length - matrix.RowPointers - rows) - ) + kernel.KernelFunc ndRange matrix.Columns.Length matrix.RowPointers.Length matrix.RowPointers rows - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel rows @@ -77,7 +68,7 @@ module Matrix = let program = clContext.Compile kernel - fun (processor: DeviceCommandQueue<_>) (row: int) (column: int) (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) (row: int) (column: int) (matrix: ClMatrix.CSR<'a>) -> if row < 0 || row >= matrix.RowCount then failwith "Row out of range" @@ -91,13 +82,9 @@ module Matrix = let ndRange = Range1D.CreateValid(1, workGroupSize) - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc ndRange row column matrix.RowPointers matrix.Columns matrix.Values result) - ) + kernel.KernelFunc ndRange row column matrix.RowPointers matrix.Columns matrix.Values result - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel result @@ -128,7 +115,7 @@ module Matrix = let blitData = ClArray.blit clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode startIndex count (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode startIndex count (matrix: ClMatrix.CSR<'a>) -> if count <= 0 then failwith "Count must be greater than zero" @@ -153,19 +140,9 @@ module Matrix = let ndRange = Range1D.CreateValid(matrix.Columns.Length, workGroupSize) - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - resultLength - startIndex - matrix.RowPointers.Length - matrix.RowPointers - rows) - ) + kernel.KernelFunc ndRange resultLength startIndex matrix.RowPointers.Length matrix.RowPointers rows - processor.Post(Msg.CreateRunMsg<_, _> kernel) + processor.RunKernel kernel let startPosition = rowPointers.[startIndex] @@ -202,14 +179,14 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = prepare processor allocationMode matrix let cols = - copy processor allocationMode matrix.Columns + copy processor allocationMode matrix.Columns matrix.Columns.Length let values = - copyData processor allocationMode matrix.Values + copyData processor allocationMode matrix.Values matrix.Values.Length { Context = clContext RowCount = matrix.RowCount @@ -228,10 +205,10 @@ module Matrix = let prepare = expandRowPointers clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = prepare processor allocationMode matrix - processor.Post(Msg.CreateFreeMsg(matrix.RowPointers)) + matrix.RowPointers.Free() { Context = clContext RowCount = matrix.RowCount @@ -298,7 +275,7 @@ module Matrix = let toCSRInPlace = COO.Matrix.toCSRInPlace clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (queue: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> toCOOInPlace queue allocationMode matrix |> transposeInPlace queue |> toCSRInPlace queue allocationMode @@ -318,7 +295,7 @@ module Matrix = let toCSRInPlace = COO.Matrix.toCSRInPlace clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (queue: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> toCOO queue allocationMode matrix |> transposeInPlace queue |> toCSRInPlace queue allocationMode @@ -334,7 +311,7 @@ module Matrix = let getChunkIndices = ClArray.sub clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> let getChunkValues = getChunkValues processor allocationMode matrix.Values @@ -372,7 +349,7 @@ module Matrix = let runLazy = byRowsLazy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> runLazy processor allocationMode matrix |> Seq.map (fun lazyValue -> lazyValue.Value) @@ -385,7 +362,7 @@ module Matrix = let byRows = byRows clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) -> let rows = byRows processor allocationMode matrix |> Seq.toList @@ -407,7 +384,7 @@ module Matrix = let subtract = Backend.Common.Map.map <@ fun (fst, snd) -> snd - fst @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'b>) -> let pointerPairs = pairwise processor DeviceOnly matrix.RowPointers // since row pointers length in matrix always >= 2 @@ -417,6 +394,6 @@ module Matrix = let rowsLength = subtract processor allocationMode pointerPairs - pointerPairs.Free processor + pointerPairs.Free() rowsLength diff --git a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs index 479fa9be..373cbceb 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/CSR/Merge.fs @@ -161,7 +161,7 @@ module Merge = let kernel = clContext.Compile(merge) - fun (processor: DeviceCommandQueue<_>) (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> let firstLength = leftMatrix.Columns.Length let secondLength = rightMatrix.Columns.Length @@ -194,25 +194,21 @@ module Merge = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - leftMatrix.RowPointers - leftMatrix.Columns - leftMatrix.Values - rightMatrix.RowPointers - rightMatrix.Columns - rightMatrix.Values - allRows - allColumns - leftMergedValues - rightMergedValues - isEndOfRow - isLeft) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + leftMatrix.RowPointers + leftMatrix.Columns + leftMatrix.Values + rightMatrix.RowPointers + rightMatrix.Columns + rightMatrix.Values + allRows + allColumns + leftMergedValues + rightMergedValues + isEndOfRow + isLeft + + processor.RunKernel kernel allRows, allColumns, leftMergedValues, rightMergedValues, isEndOfRow, isLeft diff --git a/src/GraphBLAS-sharp.Backend/Matrix/Common.fs b/src/GraphBLAS-sharp.Backend/Matrix/Common.fs index 9a36ea31..f77cd6bc 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/Common.fs @@ -19,7 +19,7 @@ module internal Common = let sum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> + fun (processor: RawCommandQueue) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) @@ -54,7 +54,7 @@ module internal Common = let sum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> + fun (processor: RawCommandQueue) allocationMode (allRows: ClArray) (allColumns: ClArray) (allValues: ClArray<'a>) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) diff --git a/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs index 1f30a262..5435a6d8 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/LIL/Matrix.fs @@ -13,7 +13,7 @@ module Matrix = let concatValues = ClArray.concat clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: LIL<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: LIL<'a>) -> let rowsPointers = matrix.Rows diff --git a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs index 2012da6c..3af45c69 100644 --- a/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Matrix/Matrix.fs @@ -24,32 +24,32 @@ module Matrix = let vectorCopy = Sparse.Vector.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO m -> ClMatrix.COO { Context = clContext RowCount = m.RowCount ColumnCount = m.ColumnCount - Rows = copy processor allocationMode m.Rows - Columns = copy processor allocationMode m.Columns - Values = copyData processor allocationMode m.Values } + Rows = copy processor allocationMode m.Rows m.Rows.Length + Columns = copy processor allocationMode m.Columns m.Columns.Length + Values = copyData processor allocationMode m.Values m.Values.Length } | ClMatrix.CSR m -> ClMatrix.CSR { Context = clContext RowCount = m.RowCount ColumnCount = m.ColumnCount - RowPointers = copy processor allocationMode m.RowPointers - Columns = copy processor allocationMode m.Columns - Values = copyData processor allocationMode m.Values } + RowPointers = copy processor allocationMode m.RowPointers m.RowPointers.Length + Columns = copy processor allocationMode m.Columns m.Columns.Length + Values = copyData processor allocationMode m.Values m.Values.Length } | ClMatrix.CSC m -> ClMatrix.CSC { Context = clContext RowCount = m.RowCount ColumnCount = m.ColumnCount - Rows = copy processor allocationMode m.Rows - ColumnPointers = copy processor allocationMode m.ColumnPointers - Values = copyData processor allocationMode m.Values } + Rows = copy processor allocationMode m.Rows m.Rows.Length + ColumnPointers = copy processor allocationMode m.ColumnPointers m.ColumnPointers.Length + Values = copyData processor allocationMode m.Values m.Values.Length } | ClMatrix.LIL matrix -> matrix.Rows |> List.map (Option.map (vectorCopy processor allocationMode)) @@ -75,7 +75,7 @@ module Matrix = let vectorCopyTo = Sparse.Vector.copyTo clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (source: ClMatrix<'a>) (destination: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) (source: ClMatrix<'a>) (destination: ClMatrix<'a>) -> if source.NNZ <> destination.NNZ || source.RowCount <> destination.RowCount || source.ColumnCount <> destination.ColumnCount then @@ -119,7 +119,7 @@ module Matrix = let rowsToCSR = LIL.Matrix.toCSR clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO m -> toCSR processor allocationMode m |> ClMatrix.CSR | ClMatrix.CSR _ -> copy processor allocationMode matrix @@ -144,7 +144,7 @@ module Matrix = let transposeInPlace = CSR.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO m -> toCSRInPlace processor allocationMode m @@ -171,7 +171,7 @@ module Matrix = let rowsToCSR = LIL.Matrix.toCSR clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO _ -> copy processor allocationMode matrix | ClMatrix.CSR m -> toCOO processor allocationMode m |> ClMatrix.COO @@ -198,7 +198,7 @@ module Matrix = let transposeInPlace = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.COO _ -> matrix | ClMatrix.CSR m -> @@ -229,7 +229,7 @@ module Matrix = let rowsToCSR = LIL.Matrix.toCSR clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.CSC _ -> copy processor allocationMode matrix | ClMatrix.CSR m -> @@ -262,7 +262,7 @@ module Matrix = let transposeCOOInPlace = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.CSC _ -> matrix | ClMatrix.CSR m -> @@ -292,7 +292,7 @@ module Matrix = let CSRToLIL = CSR.Matrix.toLIL clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix<'a>) -> + fun (processor: RawCommandQueue) allocationMode (matrix: ClMatrix<'a>) -> match matrix with | ClMatrix.CSC m -> m.ToCSR @@ -325,7 +325,7 @@ module Matrix = let COOTransposeInPlace = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) matrix -> + fun (processor: RawCommandQueue) matrix -> match matrix with | ClMatrix.COO m -> COOTransposeInPlace processor m |> ClMatrix.COO | ClMatrix.CSR m -> ClMatrix.CSC m.ToCSC @@ -352,7 +352,7 @@ module Matrix = let copyData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode matrix -> + fun (processor: RawCommandQueue) allocationMode matrix -> match matrix with | ClMatrix.COO m -> COOTranspose processor allocationMode m @@ -361,17 +361,17 @@ module Matrix = { Context = m.Context RowCount = m.ColumnCount ColumnCount = m.RowCount - Rows = copy processor allocationMode m.Columns - ColumnPointers = copy processor allocationMode m.RowPointers - Values = copyData processor allocationMode m.Values } + Rows = copy processor allocationMode m.Columns m.Columns.Length + ColumnPointers = copy processor allocationMode m.RowPointers m.RowPointers.Length + Values = copyData processor allocationMode m.Values m.Values.Length } |> ClMatrix.CSC | ClMatrix.CSC m -> { Context = m.Context RowCount = m.ColumnCount ColumnCount = m.RowCount - RowPointers = copy processor allocationMode m.ColumnPointers - Columns = copy processor allocationMode m.Rows - Values = copyData processor allocationMode m.Values } + RowPointers = copy processor allocationMode m.ColumnPointers m.ColumnPointers.Length + Columns = copy processor allocationMode m.Rows m.Rows.Length + Values = copyData processor allocationMode m.Values m.Values.Length } |> ClMatrix.CSR | ClMatrix.LIL _ -> failwith "Not yet implemented" diff --git a/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs b/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs index 5fff4723..bc628250 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs @@ -4,21 +4,20 @@ open Brahma.FSharp module ArraysExtensions = type ClArray<'a> with - member this.FreeAndWait(q: DeviceCommandQueue) = - q.Post(Msg.CreateFreeMsg this) + member this.FreeAndWait(q: RawCommandQueue) = + this.Dispose() q.Synchronize() - member this.ToHost(q: DeviceCommandQueue) = + member this.ToHost(q: RawCommandQueue) = let dst = Array.zeroCreate this.Length - q.Post(Msg.CreateToHostMsg(this, dst)) - q.Synchronize() + q.ToHost(this, dst, true) dst - member this.Free(q: DeviceCommandQueue<_>) = q.Post <| Msg.CreateFreeMsg this + member this.Free() = this.Dispose() - member this.ToHostAndFree(q: DeviceCommandQueue<_>) = + member this.ToHostAndFree(q: RawCommandQueue) = let result = this.ToHost q - this.Free q + this.Free() result diff --git a/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs b/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs index ab0ca5d3..f6d44184 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/ClCellExtensions.fs @@ -4,16 +4,15 @@ open Brahma.FSharp module ClCellExtensions = type ClCell<'a> with - member this.ToHost(processor: DeviceCommandQueue<_>) = + member this.ToHost(processor: RawCommandQueue) = let res = Array.zeroCreate<'a> 1 - processor.Post(Msg.CreateToHostMsg(this, res)) + processor.ToHost(this, res, true) res.[0] - member this.Free(processor: DeviceCommandQueue<_>) = - processor.Post(Msg.CreateFreeMsg<_>(this)) + member this.Free() = this.Dispose() - member this.ToHostAndFree(processor: DeviceCommandQueue<_>) = + member this.ToHostAndFree(processor: RawCommandQueue) = let result = this.ToHost processor - this.Free processor + this.Dispose() result diff --git a/src/GraphBLAS-sharp.Backend/Objects/Common.fs b/src/GraphBLAS-sharp.Backend/Objects/Common.fs index b4f945f7..8c722ee0 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Common.fs @@ -3,4 +3,4 @@ open Brahma.FSharp type IDeviceMemObject = - abstract Dispose : DeviceCommandQueue -> unit + abstract Dispose : unit -> unit diff --git a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs index c1146e2b..24062848 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Matrix.fs @@ -19,12 +19,12 @@ module ClMatrix = Values: ClArray<'elem> } interface IDeviceMemObject with - member this.Dispose q = - q.Post(Msg.CreateFreeMsg<_>(this.Values)) - q.Post(Msg.CreateFreeMsg<_>(this.Columns)) - q.Post(Msg.CreateFreeMsg<_>(this.RowPointers)) + member this.Dispose() = + this.Values.Dispose() + this.Columns.Dispose() + this.RowPointers.Dispose() - member this.Dispose q = (this :> IDeviceMemObject).Dispose q + member this.Dispose() = (this :> IDeviceMemObject).Dispose() member this.NNZ = this.Values.Length @@ -45,13 +45,12 @@ module ClMatrix = Values: ClArray<'elem> } interface IDeviceMemObject with - member this.Dispose q = - q.Post(Msg.CreateFreeMsg<_>(this.Values)) - q.Post(Msg.CreateFreeMsg<_>(this.Rows)) - q.Post(Msg.CreateFreeMsg<_>(this.ColumnPointers)) - q.Synchronize() + member this.Dispose() = + this.Values.Dispose() + this.Rows.Dispose() + this.ColumnPointers.Dispose() - member this.Dispose q = (this :> IDeviceMemObject).Dispose q + member this.Dispose() = (this :> IDeviceMemObject).Dispose() member this.NNZ = this.Values.Length @@ -72,13 +71,12 @@ module ClMatrix = Values: ClArray<'elem> } interface IDeviceMemObject with - member this.Dispose q = - q.Post(Msg.CreateFreeMsg<_>(this.Values)) - q.Post(Msg.CreateFreeMsg<_>(this.Columns)) - q.Post(Msg.CreateFreeMsg<_>(this.Rows)) - q.Synchronize() + member this.Dispose() = + this.Values.Dispose() + this.Columns.Dispose() + this.Rows.Dispose() - member this.Dispose q = (this :> IDeviceMemObject).Dispose q + member this.Dispose() = (this :> IDeviceMemObject).Dispose() member this.NNZ = this.Values.Length @@ -89,10 +87,10 @@ module ClMatrix = Rows: ClVector.Sparse<'elem> option list } interface IDeviceMemObject with - member this.Dispose q = + member this.Dispose() = this.Rows |> Seq.choose id - |> Seq.iter (fun vector -> vector.Dispose q) + |> Seq.iter (fun vector -> vector.Dispose()) member this.NNZ = this.Rows @@ -110,13 +108,12 @@ module ClMatrix = Values: ClArray<'elem> } interface IDeviceMemObject with - member this.Dispose q = - q.Post(Msg.CreateFreeMsg<_>(this.RowIndices)) - q.Post(Msg.CreateFreeMsg<_>(this.ColumnIndices)) - q.Post(Msg.CreateFreeMsg<_>(this.Values)) - q.Synchronize() + member this.Dispose() = + this.RowIndices.Dispose() + this.ColumnIndices.Dispose() + this.Values.Dispose() - member this.Dispose q = (this :> IDeviceMemObject).Dispose q + member this.Dispose() = (this :> IDeviceMemObject).Dispose() member this.NNZ = this.Values.Length @@ -165,12 +162,12 @@ type ClMatrix<'a when 'a: struct> = /// /// Release device resources allocated for the matrix. /// - member this.Dispose q = + member this.Dispose() = match this with - | ClMatrix.CSR matrix -> (matrix :> IDeviceMemObject).Dispose q - | ClMatrix.COO matrix -> (matrix :> IDeviceMemObject).Dispose q - | ClMatrix.CSC matrix -> (matrix :> IDeviceMemObject).Dispose q - | ClMatrix.LIL matrix -> (matrix :> IDeviceMemObject).Dispose q + | ClMatrix.CSR matrix -> (matrix :> IDeviceMemObject).Dispose() + | ClMatrix.COO matrix -> (matrix :> IDeviceMemObject).Dispose() + | ClMatrix.CSC matrix -> (matrix :> IDeviceMemObject).Dispose() + | ClMatrix.LIL matrix -> (matrix :> IDeviceMemObject).Dispose() /// /// Gets the number of non-zero elements in matrix. diff --git a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs index e7a221f1..4d100afa 100644 --- a/src/GraphBLAS-sharp.Backend/Objects/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Objects/Vector.fs @@ -15,11 +15,11 @@ module ClVector = Size: int } interface IDeviceMemObject with - member this.Dispose(q) = - q.Post(Msg.CreateFreeMsg<_>(this.Values)) - q.Post(Msg.CreateFreeMsg<_>(this.Indices)) + member this.Dispose() = + this.Values.Dispose() + this.Indices.Dispose() - member this.Dispose(q) = (this :> IDeviceMemObject).Dispose(q) + member this.Dispose() = (this :> IDeviceMemObject).Dispose() member this.NNZ = this.Values.Length @@ -48,7 +48,7 @@ type ClVector<'a when 'a: struct> = /// /// Release device resources allocated for the vector. /// - member this.Dispose(q) = + member this.Dispose() = match this with - | Sparse vector -> vector.Dispose(q) - | Dense vector -> vector.FreeAndWait(q) + | Sparse vector -> vector.Dispose() + | Dense vector -> vector.Free() diff --git a/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs b/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs index c670715d..aa1469df 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Kronecker.fs @@ -41,7 +41,7 @@ module internal Kronecker = let updateBitmap = clContext.Compile <| updateBitmap op - fun (processor: DeviceCommandQueue<_>) (operand: ClCell<'a>) (matrixRight: CSR<'b>) (bitmap: ClArray) -> + fun (processor: RawCommandQueue) (operand: ClCell<'a>) (matrixRight: CSR<'b>) (bitmap: ClArray) -> let resultLength = matrixRight.NNZ + 1 @@ -54,13 +54,9 @@ module internal Kronecker = matrixRight.ColumnCount * matrixRight.RowCount - matrixRight.NNZ - processor.Post( - Msg.MsgSetArguments - (fun () -> - updateBitmap.KernelFunc ndRange operand matrixRight.NNZ numberOfZeros matrixRight.Values bitmap) - ) + updateBitmap.KernelFunc ndRange operand matrixRight.NNZ numberOfZeros matrixRight.Values bitmap - processor.Post(Msg.CreateRunMsg<_, _> updateBitmap) + processor.RunKernel(updateBitmap) let private getAllocationSize (clContext: ClContext) workGroupSize op = @@ -76,7 +72,7 @@ module internal Kronecker = let opOnHost = op.Evaluate() - fun (queue: DeviceCommandQueue<_>) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> + fun (queue: RawCommandQueue) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> let nnz = match opOnHost None None with @@ -100,11 +96,11 @@ module internal Kronecker = updateBitmap queue value matrixRight bitmap - value.Free queue + value.Free() let bitmapSum = sum queue bitmap - bitmap.Free queue + bitmap.Free() let leftZeroCount = matrixLeft.ColumnCount * matrixLeft.RowCount @@ -142,7 +138,7 @@ module internal Kronecker = let kernel = clContext.Compile <| preparePositions op - fun (processor: DeviceCommandQueue<_>) (operand: ClCell<'a>) (matrix: CSR<'b>) (resultDenseMatrix: ClArray<'c>) (resultBitmap: ClArray) -> + fun (processor: RawCommandQueue) (operand: ClCell<'a>) (matrix: CSR<'b>) (resultDenseMatrix: ClArray<'c>) (resultBitmap: ClArray) -> let resultLength = matrix.RowCount * matrix.ColumnCount @@ -151,22 +147,19 @@ module internal Kronecker = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - operand - matrix.RowCount - matrix.ColumnCount - matrix.Values - matrix.RowPointers - matrix.Columns - resultBitmap - resultDenseMatrix) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + + kernel.KernelFunc + ndRange + operand + matrix.RowCount + matrix.ColumnCount + matrix.Values + matrix.RowPointers + matrix.Columns + resultBitmap + resultDenseMatrix + + processor.RunKernel kernel let private setPositions<'c when 'c: struct> (clContext: ClContext) workGroupSize = @@ -193,7 +186,7 @@ module internal Kronecker = let scan = Common.PrefixSum.standardIncludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) rowCount columnCount (rowOffset: int) (columnOffset: int) (startIndex: int) (resultMatrix: COO<'c>) (values: ClArray<'c>) (bitmap: ClArray) -> + fun (processor: RawCommandQueue) rowCount columnCount (rowOffset: int) (columnOffset: int) (startIndex: int) (resultMatrix: COO<'c>) (values: ClArray<'c>) (bitmap: ClArray) -> let sum = scan processor bitmap @@ -205,27 +198,23 @@ module internal Kronecker = let rowOffset = rowOffset |> clContext.CreateClCell let columnOffset = columnOffset |> clContext.CreateClCell - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - rowCount - columnCount - startIndex - rowOffset - columnOffset - bitmap - values - resultMatrix.Rows - resultMatrix.Columns - resultMatrix.Values) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - rowOffset.Free processor - columnOffset.Free processor + kernel.KernelFunc + ndRange + rowCount + columnCount + startIndex + rowOffset + columnOffset + bitmap + values + resultMatrix.Rows + resultMatrix.Columns + resultMatrix.Values + + processor.RunKernel kernel + + rowOffset.Free() + columnOffset.Free() (sum.ToHostAndFree processor) + startIndex @@ -245,7 +234,7 @@ module internal Kronecker = let kernel = clContext.Compile <| copyToResult - fun (processor: DeviceCommandQueue<_>) startIndex (rowOffset: int) (columnOffset: int) (resultMatrix: COO<'c>) (sourceMatrix: COO<'c>) -> + fun (processor: RawCommandQueue) startIndex (rowOffset: int) (columnOffset: int) (resultMatrix: COO<'c>) (sourceMatrix: COO<'c>) -> let ndRange = Range1D.CreateValid(sourceMatrix.NNZ, workGroupSize) @@ -255,27 +244,23 @@ module internal Kronecker = let rowOffset = rowOffset |> clContext.CreateClCell let columnOffset = columnOffset |> clContext.CreateClCell - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - startIndex - sourceMatrix.NNZ - rowOffset - columnOffset - sourceMatrix.Rows - sourceMatrix.Columns - sourceMatrix.Values - resultMatrix.Rows - resultMatrix.Columns - resultMatrix.Values) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) - - rowOffset.Free processor - columnOffset.Free processor + kernel.KernelFunc + ndRange + startIndex + sourceMatrix.NNZ + rowOffset + columnOffset + sourceMatrix.Rows + sourceMatrix.Columns + sourceMatrix.Values + resultMatrix.Rows + resultMatrix.Columns + resultMatrix.Values + + processor.RunKernel kernel + + rowOffset.Free() + columnOffset.Free() let private insertZero (clContext: ClContext) workGroupSize = @@ -348,12 +333,12 @@ module internal Kronecker = preparePositions queue value matrixRight mappedMatrix bitmap - value.Free queue + value.Free() startIndex <- setPositions rowOffset columnOffset startIndex resultMatrix mappedMatrix bitmap - bitmap.Free queue - mappedMatrix.Free queue + bitmap.Free() + mappedMatrix.Free() startIndex @@ -367,7 +352,7 @@ module internal Kronecker = let insertZero = insertZero clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (resultNNZ: int) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> + fun (queue: RawCommandQueue) allocationMode (resultNNZ: int) (matrixZero: COO<'c> option) (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> let resultRows = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultNNZ) @@ -436,9 +421,9 @@ module internal Kronecker = let mapAll = mapAll clContext workGroupSize op let bitonic = - Common.Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + Common.Sort.Bitonic.sortRowsColumnsValuesInplace clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> + fun (queue: RawCommandQueue) allocationMode (matrixLeft: CSR<'a>) (matrixRight: CSR<'b>) -> let matrixZero = mapWithValue queue allocationMode None matrixRight @@ -447,16 +432,14 @@ module internal Kronecker = getSize queue matrixZero matrixLeft matrixRight if size = 0 then - matrixZero - |> Option.iter (fun m -> m.Dispose queue) + matrixZero |> Option.iter (fun m -> m.Dispose()) None else let result = mapAll queue allocationMode size matrixZero matrixLeft matrixRight - matrixZero - |> Option.iter (fun m -> m.Dispose queue) + matrixZero |> Option.iter (fun m -> m.Dispose()) bitonic queue result.Rows result.Columns result.Values diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index e0af9487..ff06f1d5 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -29,7 +29,7 @@ module Operations = let mapDense = Dense.Vector.map op clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode matrix -> + fun (processor: RawCommandQueue) allocationMode matrix -> match matrix with | ClVector.Sparse v -> mapSparse processor allocationMode v @@ -58,7 +58,7 @@ module Operations = let map2Sparse = Sparse.Vector.map2 op clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationMode left right @@ -88,7 +88,7 @@ module Operations = let map2Dense = Dense.Vector.map2AtLeastOne op clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> Option.map ClVector.Sparse (map2Sparse processor allocationMode left right) @@ -112,7 +112,7 @@ module Operations = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor left right left | _ -> failwith "Unsupported vector format" @@ -131,7 +131,7 @@ module Operations = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> + fun (processor: RawCommandQueue) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> match leftVector, rightVector, resultVector with | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result @@ -151,7 +151,7 @@ module Operations = let map2Dense = Dense.Vector.map2 map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationFlag left right | _ -> failwith "Unsupported vector format" @@ -173,7 +173,7 @@ module Operations = let map2SparseDense = Sparse.Map2.runSparseDense map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> Option.map ClVector.Sparse (map2Sparse processor allocationFlag left right) @@ -202,7 +202,7 @@ module Operations = let transposeCOO = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode matrix -> + fun (processor: RawCommandQueue) allocationMode matrix -> match matrix with | ClMatrix.COO m -> mapCOO processor allocationMode m |> ClMatrix.COO | ClMatrix.CSR m -> mapCSR processor allocationMode m |> ClMatrix.COO @@ -235,7 +235,7 @@ module Operations = let transposeCOO = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode matrix1 matrix2 -> + fun (processor: RawCommandQueue) allocationMode matrix1 matrix2 -> match matrix1, matrix2 with | ClMatrix.COO m1, ClMatrix.COO m2 -> map2COO processor allocationMode m1 m2 @@ -272,7 +272,7 @@ module Operations = let COOTranspose = COO.Matrix.transposeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode matrix1 matrix2 -> + fun (processor: RawCommandQueue) allocationMode matrix1 matrix2 -> match matrix1, matrix2 with | ClMatrix.COO m1, ClMatrix.COO m2 -> COOMap2 processor allocationMode m1 m2 @@ -304,7 +304,7 @@ module Operations = let runTo = SpMV.runTo add mul clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) (result: ClVector<'c>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) (result: ClVector<'c>) -> match matrix, vector, result with | ClMatrix.CSR m, ClVector.Dense v, ClVector.Dense r -> runTo queue m v r | _ -> failwith "Not implemented yet" @@ -325,7 +325,7 @@ module Operations = let run = SpMV.run add mul clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + fun (queue: RawCommandQueue) allocationFlag (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> match matrix, vector with | ClMatrix.CSR m, ClVector.Dense v -> run queue allocationFlag m v |> ClVector.Dense | _ -> failwith "Not implemented yet" @@ -347,7 +347,7 @@ module Operations = let run = SpMSpV.runBoolStandard add mul clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix) (vector: ClVector) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix) (vector: ClVector) -> match matrix, vector with | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) | _ -> failwith "Not implemented yet" @@ -369,7 +369,7 @@ module Operations = let run = SpMSpV.run add mul clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) -> match matrix, vector with | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) | _ -> failwith "Not implemented yet" @@ -386,7 +386,7 @@ module Operations = let kronecker (op: Expr<'a option -> 'b option -> 'c option>) (clContext: ClContext) workGroupSize = let run = Kronecker.run clContext workGroupSize op - fun (queue: DeviceCommandQueue<_>) allocationFlag (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) -> + fun (queue: RawCommandQueue) allocationFlag (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) -> match matrix1, matrix2 with | ClMatrix.CSR m1, ClMatrix.CSR m2 -> let result = run queue allocationFlag m1 m2 @@ -414,7 +414,7 @@ module Operations = let runCSRnCSC = SpGeMM.Masked.run opAdd opMul clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) (mask: ClMatrix<_>) -> + fun (queue: RawCommandQueue) (matrix1: ClMatrix<'a>) (matrix2: ClMatrix<'b>) (mask: ClMatrix<_>) -> match matrix1, matrix2, mask with | ClMatrix.CSR m1, ClMatrix.CSC m2, ClMatrix.COO mask -> runCSRnCSC queue m1 m2 mask |> ClMatrix.COO | _ -> failwith "Matrix formats are not matching" @@ -436,7 +436,7 @@ module Operations = let run = SpGeMM.Expand.run opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> match leftMatrix, rightMatrix with | ClMatrix.CSR leftMatrix, ClMatrix.CSR rightMatrix -> let allocCapacity = @@ -476,7 +476,7 @@ module Operations = let run = SpGeMM.Expand.COO.run opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftMatrix: ClMatrix<'a>) (rightMatrix: ClMatrix<'b>) -> match leftMatrix, rightMatrix with | ClMatrix.COO leftMatrix, ClMatrix.CSR rightMatrix -> let allocCapacity = diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs index e476727c..6980c017 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Expand.fs @@ -20,7 +20,7 @@ module internal Expand = let prefixSum = Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftMatrixColumns: ClArray) (rightMatrixRowsLengths: ClArray) -> + fun (processor: RawCommandQueue) (leftMatrixColumns: ClArray) (rightMatrixRowsLengths: ClArray) -> let segmentsLengths = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftMatrixColumns.Length) @@ -31,7 +31,7 @@ module internal Expand = // compute pointers let length = (prefixSum processor segmentsLengths) - .ToHostAndFree processor + .ToHostAndFree(processor) length, segmentsLengths @@ -48,7 +48,7 @@ module internal Expand = let scatter = Common.Scatter.lastOccurrence clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (columns: ClArray) (rows: ClArray) -> + fun (processor: RawCommandQueue) (firstValues: ClArray<'a>) (secondValues: ClArray<'b>) (columns: ClArray) (rows: ClArray) -> let positions = getBitmap processor DeviceOnly firstValues secondValues @@ -58,7 +58,7 @@ module internal Expand = .ToHostAndFree(processor) if resultLength = 0 then - positions.Free processor + positions.Free() None else @@ -77,7 +77,7 @@ module internal Expand = assignValues processor firstValues secondValues positions resultValues - positions.Free processor + positions.Free() Some(resultValues, resultColumns, resultRows) @@ -112,14 +112,14 @@ module internal Expand = let rightMatrixGather = Common.Gather.run clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (lengths: int) (segmentsPointers: ClArray) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) (lengths: int) (segmentsPointers: ClArray) (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> // Compute left matrix positions let leftMatrixPositions = zeroCreate processor DeviceOnly lengths idScatter processor segmentsPointers leftMatrixPositions (maxPrefixSum processor leftMatrixPositions 0) - .Free processor + .Free() // Compute right matrix positions let rightMatrixPositions = create processor DeviceOnly lengths 1 @@ -131,7 +131,7 @@ module internal Expand = scatter processor segmentsPointers requiredRightMatrixPointers rightMatrixPositions - requiredRightMatrixPointers.Free processor + requiredRightMatrixPointers.Free() // another way to get offsets ??? let offsets = @@ -139,7 +139,7 @@ module internal Expand = segmentPrefixSum processor offsets.Length rightMatrixPositions leftMatrixPositions offsets - offsets.Free processor + offsets.Free() // compute columns let columns = @@ -158,7 +158,7 @@ module internal Expand = leftMatrixGather processor leftMatrixPositions leftMatrix.Values leftMatrixValues - leftMatrixPositions.Free processor + leftMatrixPositions.Free() // compute right matrix values let rightMatrixValues = @@ -166,7 +166,7 @@ module internal Expand = rightMatrixGather processor rightMatrixPositions rightMatrix.Values rightMatrixValues - rightMatrixPositions.Free processor + rightMatrixPositions.Free() // left, right matrix values, columns and rows indices leftMatrixValues, rightMatrixValues, columns, rows @@ -182,7 +182,7 @@ module internal Expand = let sortKeys = Common.Sort.Radix.standardRunKeysOnly clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> + fun (processor: RawCommandQueue) (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> // sort by columns let valuesSortedByColumns = sortByKeyValues processor DeviceOnly columns values @@ -201,9 +201,9 @@ module internal Expand = let sortedRows = sortKeys processor rowsSortedByColumns - valuesSortedByColumns.Free processor - rowsSortedByColumns.Free processor - sortedColumns.Free processor + valuesSortedByColumns.Free() + rowsSortedByColumns.Free() + sortedColumns.Free() valuesSortedByRows, columnsSortedByRows, sortedRows @@ -221,26 +221,26 @@ module internal Expand = let idScatter = Common.Scatter.initFirstOccurrence Map.id clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> + fun (processor: RawCommandQueue) allocationMode (values: ClArray<'a>) (columns: ClArray) (rows: ClArray) -> let bitmap = getUniqueBitmap processor DeviceOnly columns rows let uniqueKeysCount = (prefixSum processor bitmap) - .ToHostAndFree processor + .ToHostAndFree(processor) let offsets = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, uniqueKeysCount) idScatter processor bitmap offsets - bitmap.Free processor + bitmap.Free() let reduceResult = reduce processor allocationMode uniqueKeysCount offsets columns rows values - offsets.Free processor + offsets.Free() // reducedValues, reducedColumns, reducedRows option reduceResult @@ -259,13 +259,13 @@ module internal Expand = let reduce = reduce opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (rightMatrixRowsNNZ: ClArray) (rightMatrix: ClMatrix.CSR<'b>) (leftMatrix: ClMatrix.COO<'a>) -> + fun (processor: RawCommandQueue) allocationMode (rightMatrixRowsNNZ: ClArray) (rightMatrix: ClMatrix.CSR<'b>) (leftMatrix: ClMatrix.COO<'a>) -> let length, segmentPointers = getSegmentPointers processor leftMatrix.Columns rightMatrixRowsNNZ if length = 0 then - segmentPointers.Free processor + segmentPointers.Free() length, None else @@ -273,16 +273,16 @@ module internal Expand = let leftMatrixValues, rightMatrixValues, columns, rows = expand processor length segmentPointers leftMatrix rightMatrix - segmentPointers.Free processor + segmentPointers.Free() // multiply let mulResult = multiply processor leftMatrixValues rightMatrixValues columns rows - leftMatrixValues.Free processor - rightMatrixValues.Free processor - columns.Free processor - rows.Free processor + leftMatrixValues.Free() + rightMatrixValues.Free() + columns.Free() + rows.Free() let result = mulResult @@ -292,17 +292,17 @@ module internal Expand = let sortedValues, sortedColumns, sortedRows = sort processor resultValues resultColumns resultRows - resultValues.Free processor - resultColumns.Free processor - resultRows.Free processor + resultValues.Free() + resultColumns.Free() + resultRows.Free() // addition let reduceResult = reduce processor allocationMode sortedValues sortedColumns sortedRows - sortedValues.Free processor - sortedColumns.Free processor - sortedRows.Free processor + sortedValues.Free() + sortedColumns.Free() + sortedRows.Free() reduceResult) @@ -316,7 +316,7 @@ module internal Expand = let expandRowPointers = CSR.Matrix.expandRowPointers clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix.CSR<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftMatrix: ClMatrix.CSR<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> let rows = expandRowPointers processor DeviceOnly leftMatrix @@ -332,7 +332,7 @@ module internal Expand = let _, result = runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix leftMatrixCOO - rows.Free processor + rows.Free() result |> Option.map @@ -360,7 +360,7 @@ module internal Expand = let runCOO = runCOO opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.CSR<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.CSR<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> // extract segment lengths by left matrix rows pointers let segmentPointersByLeftMatrixRows = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, leftMatrix.RowPointers.Length) @@ -386,11 +386,11 @@ module internal Expand = // find largest row that fit into maxAllocSize let upperBound = - (upperBound currentBound).ToHostAndFree processor + (upperBound currentBound).ToHostAndFree(processor) let endRow = upperBound - 2 - currentBound.Free processor + currentBound.Free() // TODO(handle largest rows) // (we can split row, multiply and merge them but merge path needed) @@ -416,7 +416,7 @@ module internal Expand = let result = helper 0 0 [] |> List.rev - segmentPointersByLeftMatrixRows.Free processor + segmentPointersByLeftMatrixRows.Free() result @@ -438,7 +438,7 @@ module internal Expand = let runManySteps = runManySteps opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode maxAllocSize (leftMatrix: ClMatrix.CSR<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> let rightMatrixRowsNNZ = getNNZInRows processor DeviceOnly rightMatrix @@ -449,7 +449,7 @@ module internal Expand = if generalLength = 0 then None elif generalLength < maxAllocSize then - segmentLengths.Free processor + segmentLengths.Free() runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix else @@ -464,8 +464,8 @@ module internal Expand = rightMatrixRowsNNZ rightMatrix - rightMatrixRowsNNZ.Free processor - segmentLengths.Free processor + rightMatrixRowsNNZ.Free() + segmentLengths.Free() match result with | _ :: _ -> @@ -482,13 +482,12 @@ module internal Expand = // TODO(overhead: compute result length 3 time) // release resources valuesList - |> List.iter (fun array -> array.Free processor) + |> List.iter (fun array -> array.Free()) columnsList - |> List.iter (fun array -> array.Free processor) + |> List.iter (fun array -> array.Free()) - rowsList - |> List.iter (fun array -> array.Free processor) + rowsList |> List.iter (fun array -> array.Free()) { Context = clContext RowCount = leftMatrix.RowCount @@ -505,7 +504,7 @@ module internal Expand = let runCOO = runCOO opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftMatrix: ClMatrix.COO<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftMatrix: ClMatrix.COO<'a>) rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> let _, result = runCOO processor allocationMode rightMatrixRowsNNZ rightMatrix leftMatrix @@ -539,7 +538,7 @@ module internal Expand = let runCOO = runCOO opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.COO<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode maxAllocSize generalLength (leftMatrix: ClMatrix.COO<'a>) segmentLengths rightMatrixRowsNNZ (rightMatrix: ClMatrix.CSR<'b>) -> let leftRowPointers = compress processor allocationMode leftMatrix.Rows leftMatrix.RowCount @@ -569,11 +568,11 @@ module internal Expand = // find largest row that fit into maxAllocSize let upperBound = - (upperBound currentBound).ToHostAndFree processor + (upperBound currentBound).ToHostAndFree(processor) let endRow = upperBound - 2 - currentBound.Free processor + currentBound.Free() // TODO(handle largest rows) // (we can split row, multiply and merge them but merge path needed) @@ -599,7 +598,7 @@ module internal Expand = let result = helper 0 0 [] |> List.rev - segmentPointersByLeftMatrixRows.Free processor + segmentPointersByLeftMatrixRows.Free() result @@ -621,7 +620,7 @@ module internal Expand = let runManySteps = runManySteps opAdd opMul clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode maxAllocSize (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> + fun (processor: RawCommandQueue) allocationMode maxAllocSize (leftMatrix: ClMatrix.COO<'a>) (rightMatrix: ClMatrix.CSR<'b>) -> let rightMatrixRowsNNZ = getNNZInRows processor DeviceOnly rightMatrix @@ -632,7 +631,7 @@ module internal Expand = if generalLength = 0 then None elif generalLength < maxAllocSize then - segmentLengths.Free processor + segmentLengths.Free() runOneStep processor allocationMode leftMatrix rightMatrixRowsNNZ rightMatrix else @@ -647,8 +646,8 @@ module internal Expand = rightMatrixRowsNNZ rightMatrix - rightMatrixRowsNNZ.Free processor - segmentLengths.Free processor + rightMatrixRowsNNZ.Free() + segmentLengths.Free() match result with | _ :: _ -> @@ -665,13 +664,12 @@ module internal Expand = // TODO(overhead: compute result length 3 time) // release resources valuesList - |> List.iter (fun array -> array.Free processor) + |> List.iter (fun array -> array.Free()) columnsList - |> List.iter (fun array -> array.Free processor) + |> List.iter (fun array -> array.Free()) - rowsList - |> List.iter (fun array -> array.Free processor) + rowsList |> List.iter (fun array -> array.Free()) { Context = clContext RowCount = leftMatrix.RowCount diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs index 462d58fb..ab825f7f 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpGeMM/Masked.fs @@ -7,6 +7,7 @@ open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClMatrix open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions module internal Masked = let private calculate @@ -107,7 +108,7 @@ module internal Masked = let program = context.Compile(run) - fun (queue: DeviceCommandQueue<_>) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> + fun (queue: RawCommandQueue) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> let values = context.CreateClArrayWithSpecificAllocationMode<'c>(DeviceOnly, mask.NNZ) @@ -120,24 +121,20 @@ module internal Masked = let ndRange = Range1D.CreateValid(workGroupSize * mask.NNZ, workGroupSize) - queue.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - matrixLeft.RowPointers - matrixLeft.Columns - matrixLeft.Values - matrixRight.Rows - matrixRight.ColumnPointers - matrixRight.Values - mask.Rows - mask.Columns - values - bitmap) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + matrixLeft.RowPointers + matrixLeft.Columns + matrixLeft.Values + matrixRight.Rows + matrixRight.ColumnPointers + matrixRight.Values + mask.Rows + mask.Columns + values + bitmap + + queue.RunKernel(kernel) values, bitmap @@ -160,7 +157,7 @@ module internal Masked = let scanInPlace = Common.PrefixSum.standardExcludeInPlace context workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> + fun (queue: RawCommandQueue) (matrixLeft: ClMatrix.CSR<'a>) (matrixRight: ClMatrix.CSC<'b>) (mask: ClMatrix.COO<_>) -> let values, positions = calculate queue matrixLeft matrixRight mask @@ -176,8 +173,8 @@ module internal Masked = scatter queue positions mask.Columns resultColumns scatterData queue positions values resultValues - queue.Post(Msg.CreateFreeMsg<_>(values)) - queue.Post(Msg.CreateFreeMsg<_>(positions)) + values.Free() + positions.Free() { Context = context RowCount = matrixLeft.RowCount diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs index 691a8905..e4f61fea 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -1,4 +1,4 @@ -namespace GraphBLAS.FSharp.Backend.Operations +namespace GraphBLAS.FSharp.Backend.Operations open Brahma.FSharp open GraphBLAS.FSharp.Backend.Common @@ -33,7 +33,7 @@ module SpMSpV = let collectRows = clContext.Compile collectRows - fun (queue: DeviceCommandQueue<_>) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> + fun (queue: RawCommandQueue) size (vectorIndices: ClArray) (rowOffsets: ClArray) -> let ndRange = Range1D.CreateValid(size * 2 + 1, workGroupSize) @@ -44,11 +44,9 @@ module SpMSpV = let collectRows = collectRows.GetKernel() - queue.Post( - Msg.MsgSetArguments(fun () -> collectRows.KernelFunc ndRange size vectorIndices rowOffsets resultRows) - ) + collectRows.KernelFunc ndRange size vectorIndices rowOffsets resultRows - queue.Post(Msg.CreateRunMsg<_, _>(collectRows)) + queue.RunKernel(collectRows) resultRows @@ -69,15 +67,15 @@ module SpMSpV = let prepareOffsets = clContext.Compile prepareOffsets - fun (queue: DeviceCommandQueue<_>) size (input: ClArray) -> + fun (queue: RawCommandQueue) size (input: ClArray) -> let ndRange = Range1D.CreateValid(size, workGroupSize) let prepareOffsets = prepareOffsets.GetKernel() - queue.Post(Msg.MsgSetArguments(fun () -> prepareOffsets.KernelFunc ndRange size input)) + prepareOffsets.KernelFunc ndRange size input - queue.Post(Msg.CreateRunMsg<_, _>(prepareOffsets)) + queue.RunKernel(prepareOffsets) let resSize = (sum queue input).ToHostAndFree queue @@ -115,7 +113,7 @@ module SpMSpV = let gather = clContext.Compile gather - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> //Collect R[v] and R[v + 1] for each v in vector let collectedRows = @@ -126,7 +124,7 @@ module SpMSpV = computeOffsetsInplace queue (vector.NNZ * 2 + 1) collectedRows if gatherArraySize = 0 then - collectedRows.Free queue + collectedRows.Free() None else let ndRange = @@ -144,25 +142,21 @@ module SpMSpV = clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, gatherArraySize) if gatherArraySize > 0 then - queue.Post( - Msg.MsgSetArguments - (fun () -> - gather.KernelFunc - ndRange - vector.NNZ - collectedRows - matrix.RowPointers - matrix.Columns - matrix.Values - vector.Indices - resultRows - resultIndices - resultValues) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(gather)) - - collectedRows.Free queue + gather.KernelFunc + ndRange + vector.NNZ + collectedRows + matrix.RowPointers + matrix.Columns + matrix.Values + vector.Indices + resultRows + resultIndices + resultValues + + queue.RunKernel gather + + collectedRows.Free() Some(resultRows, resultIndices, resultValues) @@ -185,7 +179,7 @@ module SpMSpV = let multiply = clContext.Compile multiply - fun (queue: DeviceCommandQueue<_>) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> + fun (queue: RawCommandQueue) (columnIndices: ClArray) (matrixValues: ClArray<'a>) (vector: Sparse<'b>) -> let resultLength = columnIndices.Length @@ -197,21 +191,17 @@ module SpMSpV = let multiply = multiply.GetKernel() - queue.Post( - Msg.MsgSetArguments - (fun () -> - multiply.KernelFunc - ndRange - resultLength - vector.NNZ - columnIndices - matrixValues - vector.Indices - vector.Values - result) - ) - - queue.Post(Msg.CreateRunMsg<_, _>(multiply)) + multiply.KernelFunc + ndRange + resultLength + vector.NNZ + columnIndices + matrixValues + vector.Indices + vector.Values + result + + queue.RunKernel(multiply) result @@ -225,9 +215,8 @@ module SpMSpV = //TODO: Common.Gather? let gather = gather clContext workGroupSize - //TODO: Radix sort let sort = - Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + Sort.Bitonic.sortRowsColumnsValuesInplace clContext workGroupSize let multiplyScalar = multiplyScalar clContext mul workGroupSize @@ -235,7 +224,7 @@ module SpMSpV = let segReduce = Reduce.ByKey.Option.segmentSequential add clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> gather queue matrix vector |> Option.map (fun (gatherRows, gatherIndices, gatherValues) -> @@ -246,8 +235,8 @@ module SpMSpV = let multipliedValues = multiplyScalar queue sortedRows sortedValues vector - sortedValues.Free queue - sortedRows.Free queue + sortedValues.Free() + sortedRows.Free() let result = segReduce queue DeviceOnly sortedIndices multipliedValues @@ -259,8 +248,8 @@ module SpMSpV = Values = reducedValues Size = matrix.ColumnCount }) - multipliedValues.Free queue - sortedIndices.Free queue + multipliedValues.Free() + sortedIndices.Free() result) |> Option.bind id @@ -276,7 +265,7 @@ module SpMSpV = let gather = gather clContext workGroupSize let sort = - Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + Sort.Bitonic.sortRowsColumnsValuesInplace clContext workGroupSize let removeDuplicates = GraphBLAS.FSharp.ClArray.removeDuplications clContext workGroupSize @@ -284,7 +273,7 @@ module SpMSpV = let create = GraphBLAS.FSharp.ClArray.create clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) -> gather queue matrix vector |> Option.map @@ -293,9 +282,9 @@ module SpMSpV = let resultIndices = removeDuplicates queue gatherIndices - gatherIndices.Free queue - gatherRows.Free queue - gatherValues.Free queue + gatherIndices.Free() + gatherRows.Free() + gatherValues.Free() { Context = clContext Indices = resultIndices diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs index c31937b7..374a4f7a 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMV.fs @@ -5,6 +5,7 @@ open Microsoft.FSharp.Quotations open GraphBLAS.FSharp.Backend.Common open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ClContextExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions module internal SpMV = let runTo @@ -97,7 +98,7 @@ module internal SpMV = let multiplyValues = clContext.Compile multiplyValues let reduceValuesByRows = clContext.Compile reduceValuesByRows - fun (queue: DeviceCommandQueue<_>) (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) (result: ClArray<'c option>) -> + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) (result: ClArray<'c option>) -> let matrixLength = matrix.Values.Length @@ -112,36 +113,17 @@ module internal SpMV = let multiplyValues = multiplyValues.GetKernel() - queue.Post( - Msg.MsgSetArguments - (fun () -> - multiplyValues.KernelFunc - ndRange1 - matrixLength - matrix.Columns - matrix.Values - vector - intermediateArray) - ) + multiplyValues.KernelFunc ndRange1 matrixLength matrix.Columns matrix.Values vector intermediateArray - queue.Post(Msg.CreateRunMsg<_, _>(multiplyValues)) + queue.RunKernel multiplyValues let reduceValuesByRows = reduceValuesByRows.GetKernel() - queue.Post( - Msg.MsgSetArguments - (fun () -> - reduceValuesByRows.KernelFunc - ndRange2 - matrix.RowCount - intermediateArray - matrix.RowPointers - result) - ) + reduceValuesByRows.KernelFunc ndRange2 matrix.RowCount intermediateArray matrix.RowPointers result - queue.Post(Msg.CreateRunMsg<_, _>(reduceValuesByRows)) + queue.RunKernel reduceValuesByRows - queue.Post(Msg.CreateFreeMsg intermediateArray) + intermediateArray.Free() let run (add: Expr<'c option -> 'c option -> 'c option>) @@ -151,7 +133,7 @@ module internal SpMV = = let runTo = runTo add mul clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) -> + fun (queue: RawCommandQueue) allocationMode (matrix: ClMatrix.CSR<'a>) (vector: ClArray<'b option>) -> let result = clContext.CreateClArrayWithSpecificAllocationMode<'c option>(allocationMode, matrix.RowCount) diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index bfb2ddea..36a74c67 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -8,6 +8,7 @@ open GraphBLAS.FSharp.Backend.Quotes open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Objects.ClCellExtensions +open GraphBLAS.FSharp.Objects.ArraysExtensions module Vector = let map<'a, 'b when 'a: struct and 'b: struct> @@ -18,7 +19,7 @@ module Vector = let map = Map.map op clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClArray<'a option>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClArray<'a option>) -> map processor allocationMode leftVector @@ -31,7 +32,7 @@ module Vector = let map2InPlace = Map.map2InPlace opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> + fun (processor: RawCommandQueue) (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) (resultVector: ClArray<'c option>) -> map2InPlace processor leftVector rightVector resultVector @@ -43,7 +44,7 @@ module Vector = let map2 = Map.map2 opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClArray<'a option>) (rightVector: ClArray<'b option>) -> map2 processor allocationMode leftVector rightVector @@ -66,7 +67,7 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: DeviceCommandQueue<_>) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> + fun (processor: RawCommandQueue) (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(leftVector.Length, workGroupSize) @@ -75,14 +76,11 @@ module Vector = let valueCell = clContext.CreateClCell(value) - processor.Post( - Msg.MsgSetArguments - (fun () -> kernel.KernelFunc ndRange leftVector.Length leftVector maskVector valueCell resultVector) - ) + kernel.KernelFunc ndRange leftVector.Length leftVector maskVector valueCell resultVector - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel kernel - valueCell.Free processor + valueCell.Free() let assignByMask<'a, 'b when 'a: struct and 'b: struct> (maskOp: Expr<'a option -> 'b option -> 'a -> 'a option>) @@ -93,7 +91,7 @@ module Vector = let assignByMask = assignByMaskInPlace maskOp clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClArray<'a option>) (maskVector: ClArray<'b option>) (value: 'a) -> let resultVector = clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, leftVector.Length) @@ -118,7 +116,7 @@ module Vector = let kernel = clContext.Compile(fillSubVectorKernel) - fun (processor: DeviceCommandQueue<_>) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> + fun (processor: RawCommandQueue) (leftVector: ClArray<'a option>) (maskVector: Sparse<'b>) (value: 'a) (resultVector: ClArray<'a option>) -> let ndRange = Range1D.CreateValid(maskVector.NNZ, workGroupSize) @@ -127,22 +125,20 @@ module Vector = let valueCell = clContext.CreateClCell(value) - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - maskVector.NNZ - leftVector - maskVector.Indices - maskVector.Values - valueCell - resultVector) - ) + kernel.KernelFunc + ndRange + maskVector.NNZ + leftVector + maskVector.Indices + maskVector.Values + valueCell + resultVector - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) - valueCell.Free processor + processor.RunKernel kernel + + + valueCell.Free() let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = @@ -164,7 +160,7 @@ module Vector = let allValues = Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClArray<'a option>) -> + fun (processor: RawCommandQueue) allocationMode (vector: ClArray<'a option>) -> let positions = getBitmap processor DeviceOnly vector @@ -181,7 +177,7 @@ module Vector = scatterIndices processor positions allIndices resultIndices - processor.Post <| Msg.CreateFreeMsg<_>(allIndices) + allIndices.Free() // compute result values let resultValues = @@ -191,9 +187,65 @@ module Vector = scatterValues processor positions allValues resultValues - processor.Post <| Msg.CreateFreeMsg<_>(allValues) + allValues.Free() + + positions.Free() + + { Context = clContext + Indices = resultIndices + Values = resultValues + Size = vector.Length } + + let toSparse2<'a when 'a: struct> (clContext: ClContext) workGroupSize = + + let kernel = + <@ fun (ndRange: Range1D) (inputLength: int) (inputValues: ClArray<'a option>) (resultSize: ClCell) (resultIndices: ClArray) (resultValues: ClArray<'a>) -> + + let gid = ndRange.GlobalID0 + + if gid < inputLength then + match inputValues.[gid] with + | Some v -> + let offset = atomic (+) resultSize.Value 1 + resultIndices.[offset] <- gid + resultValues.[offset] <- v + | None -> () @> + + let kernel = clContext.Compile kernel + + let copy = ClArray.copy clContext workGroupSize + let copyValues = ClArray.copy clContext workGroupSize + + fun (processor: RawCommandQueue) allocationMode (vector: ClArray<'a option>) -> + + let tempIndices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vector.Length) + + let tempValues = + clContext.CreateClArrayWithSpecificAllocationMode<'a>(DeviceOnly, vector.Length) + + let resultLengthCell = clContext.CreateClCell(0) + + let ndRange = + Range1D.CreateValid(vector.Length, workGroupSize) + + let kernel = kernel.GetKernel() + + kernel.KernelFunc ndRange vector.Length vector resultLengthCell tempIndices tempValues + + processor.RunKernel kernel + + let resultLength = + resultLengthCell.ToHostAndFree(processor) + + let resultIndices = + copy processor allocationMode tempIndices resultLength + + let resultValues = + copyValues processor allocationMode tempValues resultLength - processor.Post <| Msg.CreateFreeMsg<_>(positions) + tempIndices.Free() + tempValues.Free() { Context = clContext Indices = resultIndices @@ -208,13 +260,13 @@ module Vector = let reduce = Common.Reduce.reduce opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (vector: ClArray<'a option>) -> + fun (processor: RawCommandQueue) (vector: ClArray<'a option>) -> choose processor DeviceOnly vector |> function | Some values -> let result = reduce processor values - processor.Post(Msg.CreateFreeMsg<_>(values)) + values.Free() result | None -> clContext.CreateClCell Unchecked.defaultof<'a> @@ -229,7 +281,7 @@ module Vector = let map = Backend.Common.Map.map <@ Some @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode size (elements: (int * 'a) list) -> + fun (processor: RawCommandQueue) allocationMode size (elements: (int * 'a) list) -> let indices, values = elements |> Array.ofList |> Array.unzip let values = @@ -244,8 +296,8 @@ module Vector = scatter processor indices mappedValues result - processor.Post(Msg.CreateFreeMsg(mappedValues)) - processor.Post(Msg.CreateFreeMsg(indices)) - processor.Post(Msg.CreateFreeMsg(values)) + mappedValues.Free() + indices.Free() + values.Free() result diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs index 00d7c760..ab10edc8 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Common.fs @@ -20,7 +20,7 @@ module internal Common = let indicesScatter = Common.Scatter.lastOccurrence clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> + fun (processor: RawCommandQueue) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) @@ -48,7 +48,7 @@ module internal Common = let indicesScatter = Common.Scatter.lastOccurrence clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> + fun (processor: RawCommandQueue) allocationMode (allValues: ClArray<'a>) (allIndices: ClArray) (positions: ClArray) -> let resultLength = (sum processor positions).ToHostAndFree(processor) @@ -77,7 +77,7 @@ module internal Common = let mapIndices = Common.Map.mapWithValue clContext workGroupSize <@ fun x y -> x + y @> - fun (processor: DeviceCommandQueue<_>) allocationMode (vectors: Sparse<'a> seq) -> + fun (processor: RawCommandQueue) allocationMode (vectors: Sparse<'a> seq) -> let vectorIndices, _ = vectors diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs index bcb874d2..82ba61fe 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map.fs @@ -37,7 +37,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) (size: int) (values: ClArray<'a>) (indices: ClArray) -> + fun (processor: RawCommandQueue) (size: int) (values: ClArray<'a>) (indices: ClArray) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, size) @@ -52,21 +52,9 @@ module internal Map = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - size - values.Length - values - indices - resultBitmap - resultValues - resultIndices) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc ndRange size values.Length values indices resultBitmap resultValues resultIndices + + processor.RunKernel kernel resultBitmap, resultValues, resultIndices @@ -82,7 +70,7 @@ module internal Map = let setPositions = Common.setPositions<'b> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (vector: ClVector.Sparse<'a>) -> + fun (queue: RawCommandQueue) allocationMode (vector: ClVector.Sparse<'a>) -> let bitmap, values, indices = map queue vector.Size vector.Values vector.Indices @@ -90,9 +78,9 @@ module internal Map = let resultValues, resultIndices = setPositions queue allocationMode values indices bitmap - queue.Post(Msg.CreateFreeMsg<_>(bitmap)) - queue.Post(Msg.CreateFreeMsg<_>(values)) - queue.Post(Msg.CreateFreeMsg<_>(indices)) + bitmap.Free() + values.Free() + indices.Free() { Context = clContext Indices = resultIndices @@ -122,7 +110,7 @@ module internal Map = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) (value: ClCell<'a option>) (vector: Sparse<'b>) -> + fun (processor: RawCommandQueue) (value: ClCell<'a option>) (vector: Sparse<'b>) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vector.Size) @@ -138,22 +126,18 @@ module internal Map = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - value - vector.Size - vector.Values.Length - vector.Indices - vector.Values - resultIndices - resultValues - resultBitmap) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + value + vector.Size + vector.Values.Length + vector.Indices + vector.Values + resultIndices + resultValues + resultBitmap + + processor.RunKernel kernel resultIndices, resultValues, resultBitmap @@ -176,21 +160,21 @@ module internal Map = let init = ClArray.init <@ id @> clContext workGroupSize - fun (queue: DeviceCommandQueue<_>) allocationMode (value: 'a option) size -> + fun (queue: RawCommandQueue) allocationMode (value: 'a option) size -> function | Some vector -> let valueClCell = clContext.CreateClCell value let indices, values, bitmap = map queue valueClCell vector - valueClCell.Free queue + valueClCell.Free() let result = setPositions queue allocationMode values indices bitmap - indices.Free queue - values.Free queue - bitmap.Free queue + indices.Free() + values.Free() + bitmap.Free() result |> Option.map diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs index 37fabd50..78fadbe9 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Map2.fs @@ -5,6 +5,7 @@ open FSharp.Quotations open Microsoft.FSharp.Control open GraphBLAS.FSharp.Objects open GraphBLAS.FSharp.Objects.ArraysExtensions +open GraphBLAS.FSharp.Objects.ClCellExtensions open GraphBLAS.FSharp.Objects.ClVector open GraphBLAS.FSharp.Objects.ClContextExtensions open GraphBLAS.FSharp.Backend.Quotes @@ -37,7 +38,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) -> + fun (processor: RawCommandQueue) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) @@ -53,24 +54,20 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - vectorLenght - leftValues.Length - rightValues.Length - leftValues - leftIndices - rightValues - rightIndices - resultBitmap - resultValues - resultIndices) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + kernel.KernelFunc + ndRange + vectorLenght + leftValues.Length + rightValues.Length + leftValues + leftIndices + rightValues + rightIndices + resultBitmap + resultValues + resultIndices + + processor.RunKernel kernel resultBitmap, resultValues, resultIndices @@ -82,7 +79,7 @@ module internal Map2 = let setPositions = Common.setPositionsOption clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> let bitmap, allValues, allIndices = prepare @@ -102,9 +99,9 @@ module internal Map2 = Indices = resultIndices Size = leftVector.Size }) - allIndices.Free processor - allValues.Free processor - bitmap.Free processor + allIndices.Free() + allValues.Free() + bitmap.Free() result @@ -134,7 +131,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions opAdd - fun (processor: DeviceCommandQueue<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> + fun (processor: RawCommandQueue) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b option>) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) @@ -150,21 +147,18 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - vectorLenght - leftValues - leftIndices - rightValues - resultBitmap - resultValues - resultIndices) - ) - - processor.Post(Msg.CreateRunMsg<_, _> kernel) + + kernel.KernelFunc + ndRange + vectorLenght + leftValues + leftIndices + rightValues + resultBitmap + resultValues + resultIndices + + processor.RunKernel kernel resultBitmap, resultValues, resultIndices @@ -181,7 +175,7 @@ module internal Map2 = let setPositions = Common.setPositionsOption clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClArray<'b option>) -> let bitmap, allValues, allIndices = prepare processor leftVector.NNZ leftVector.Values leftVector.Indices rightVector @@ -195,9 +189,9 @@ module internal Map2 = Indices = resultIndices Size = leftVector.Size }) - allIndices.Free processor - allValues.Free processor - bitmap.Free processor + allIndices.Free() + allValues.Free() + bitmap.Free() result @@ -232,7 +226,7 @@ module internal Map2 = let kernel = clContext.Compile <| assign op - fun (processor: DeviceCommandQueue<_>) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) (value: ClCell<'a>) -> + fun (processor: RawCommandQueue) (vectorLenght: int) (leftValues: ClArray<'a>) (leftIndices: ClArray) (rightValues: ClArray<'b>) (rightIndices: ClArray) (value: ClCell<'a>) -> let resultBitmap = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, vectorLenght) @@ -248,25 +242,22 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - vectorLenght - leftValues.Length - rightValues.Length - leftValues - leftIndices - rightValues - rightIndices - value - resultBitmap - resultValues - resultIndices) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + + kernel.KernelFunc + ndRange + vectorLenght + leftValues.Length + rightValues.Length + leftValues + leftIndices + rightValues + rightIndices + value + resultBitmap + resultValues + resultIndices + + processor.RunKernel kernel resultBitmap, resultValues, resultIndices @@ -281,7 +272,7 @@ module internal Map2 = let setPositions = Common.setPositions clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) (value: 'a) -> let valueCell = clContext.CreateClCell(value) @@ -298,10 +289,10 @@ module internal Map2 = let resultValues, resultIndices = setPositions processor allocationMode values indices bitmap - processor.Post(Msg.CreateFreeMsg<_>(valueCell)) - processor.Post(Msg.CreateFreeMsg<_>(indices)) - processor.Post(Msg.CreateFreeMsg<_>(values)) - processor.Post(Msg.CreateFreeMsg<_>(bitmap)) + valueCell.Free() + indices.Free() + values.Free() + bitmap.Free() { Context = clContext Values = resultValues @@ -337,7 +328,7 @@ module internal Map2 = let kernel = clContext.Compile <| preparePositions op - fun (processor: DeviceCommandQueue<_>) (allIndices: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> + fun (processor: RawCommandQueue) (allIndices: ClArray) (leftValues: ClArray<'a>) (rightValues: ClArray<'b>) (isLeft: ClArray) -> let length = allIndices.Length @@ -352,21 +343,9 @@ module internal Map2 = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - length - allIndices - leftValues - rightValues - isLeft - allValues - positions) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc ndRange length allIndices leftValues rightValues isLeft allValues positions + + processor.RunKernel kernel allValues, positions @@ -383,16 +362,16 @@ module internal Map2 = let setPositions = Common.setPositionsOption clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> + fun (processor: RawCommandQueue) allocationMode (leftVector: ClVector.Sparse<'a>) (rightVector: ClVector.Sparse<'b>) -> let allIndices, leftValues, rightValues, isLeft = merge processor leftVector rightVector let allValues, positions = prepare processor allIndices leftValues rightValues isLeft - processor.Post(Msg.CreateFreeMsg<_>(leftValues)) - processor.Post(Msg.CreateFreeMsg<_>(rightValues)) - processor.Post(Msg.CreateFreeMsg<_>(isLeft)) + leftValues.Free() + rightValues.Free() + isLeft.Free() let result = setPositions processor allocationMode allValues allIndices positions @@ -403,8 +382,8 @@ module internal Map2 = Indices = resultIndices Size = max leftVector.Size rightVector.Size }) - processor.Post(Msg.CreateFreeMsg<_>(allIndices)) - processor.Post(Msg.CreateFreeMsg<_>(allValues)) - processor.Post(Msg.CreateFreeMsg<_>(positions)) + allIndices.Free() + allValues.Free() + positions.Free() result diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs index 910fd64c..32e560c3 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Merge.fs @@ -119,7 +119,7 @@ module internal Merge = let kernel = clContext.Compile merge - fun (processor: DeviceCommandQueue<_>) (firstVector: ClVector.Sparse<'a>) (secondVector: ClVector.Sparse<'b>) -> + fun (processor: RawCommandQueue) (firstVector: ClVector.Sparse<'a>) (secondVector: ClVector.Sparse<'b>) -> let firstSide = firstVector.Indices.Length @@ -144,24 +144,20 @@ module internal Merge = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc - ndRange - firstSide - secondSide - sumOfSides - firstVector.Indices - firstVector.Values - secondVector.Indices - secondVector.Values - allIndices - firstValues - secondValues - isLeftBitmap) - ) - - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + kernel.KernelFunc + ndRange + firstSide + secondSide + sumOfSides + firstVector.Indices + firstVector.Values + secondVector.Indices + secondVector.Values + allIndices + firstValues + secondValues + isLeftBitmap + + processor.RunKernel kernel allIndices, firstValues, secondValues, isLeftBitmap diff --git a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs index 02a0419f..e6463634 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Sparse/Vector.fs @@ -15,10 +15,10 @@ module Vector = let copyData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: Sparse<'a>) -> + fun (processor: RawCommandQueue) allocationMode (vector: Sparse<'a>) -> { Context = clContext - Indices = copy processor allocationMode vector.Indices - Values = copyData processor allocationMode vector.Values + Indices = copy processor allocationMode vector.Indices vector.Indices.Length + Values = copyData processor allocationMode vector.Values vector.Values.Length Size = vector.Size } let copyTo (clContext: ClContext) workGroupSize = @@ -26,7 +26,7 @@ module Vector = let copyDataTo = ClArray.copyTo clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (source: Sparse<'a>) (destination: Sparse<'a>) -> + fun (processor: RawCommandQueue) (source: Sparse<'a>) (destination: Sparse<'a>) -> copyTo processor source.Indices destination.Indices copyDataTo processor source.Values destination.Values @@ -59,7 +59,7 @@ module Vector = let create = ClArray.zeroCreate clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector.Sparse<'a>) -> + fun (processor: RawCommandQueue) allocationMode (vector: ClVector.Sparse<'a>) -> let resultVector = create processor allocationMode vector.Size @@ -68,13 +68,9 @@ module Vector = let kernel = kernel.GetKernel() - processor.Post( - Msg.MsgSetArguments - (fun () -> - kernel.KernelFunc ndRange vector.Indices.Length vector.Values vector.Indices resultVector) - ) + kernel.KernelFunc ndRange vector.Indices.Length vector.Values vector.Indices resultVector - processor.Post(Msg.CreateRunMsg<_, _>(kernel)) + processor.RunKernel(kernel) resultVector @@ -83,7 +79,7 @@ module Vector = let reduce = Common.Reduce.reduce opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (vector: ClVector.Sparse<'a>) -> reduce processor vector.Values + fun (processor: RawCommandQueue) (vector: ClVector.Sparse<'a>) -> reduce processor vector.Values let ofList (clContext: ClContext) allocationMode size (elements: (int * 'a) list) = let indices, values = diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index 41a12774..0d10dd08 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -22,7 +22,7 @@ module Vector = let create (clContext: ClContext) workGroupSize = let create = ClArray.create clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode size format value -> + fun (processor: RawCommandQueue) allocationMode size format value -> match format with | Sparse -> failwith "Attempting to create full sparse vector" | Dense -> @@ -37,8 +37,7 @@ module Vector = let zeroCreate (clContext: ClContext) workGroupSize = let create = create clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode size format -> - create processor allocationMode size format None + fun (processor: RawCommandQueue) allocationMode size format -> create processor allocationMode size format None /// /// Builds vector of given format with fixed size and fills it with the values from the given list. @@ -55,7 +54,7 @@ module Vector = let map = Common.Map.map <@ Some @> clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode format size (elements: (int * 'a) list) -> + fun (processor: RawCommandQueue) allocationMode format size (elements: (int * 'a) list) -> match format with | Sparse -> let indices, values = @@ -84,9 +83,9 @@ module Vector = scatter processor indices mappedValues result - processor.Post(Msg.CreateFreeMsg(mappedValues)) - processor.Post(Msg.CreateFreeMsg(indices)) - processor.Post(Msg.CreateFreeMsg(values)) + mappedValues.Dispose() + indices.Dispose() + values.Dispose() ClVector.Dense result @@ -102,14 +101,14 @@ module Vector = let copyOptionData = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) -> + fun (processor: RawCommandQueue) allocationMode (vector: ClVector<'a>) -> match vector with | ClVector.Sparse vector -> ClVector.Sparse <| sparseCopy processor allocationMode vector | ClVector.Dense vector -> ClVector.Dense - <| copyOptionData processor allocationMode vector + <| copyOptionData processor allocationMode vector vector.Length /// /// Sparsifies the given vector if it is in a dense format. @@ -123,7 +122,7 @@ module Vector = let copy = copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) -> + fun (processor: RawCommandQueue) allocationMode (vector: ClVector<'a>) -> match vector with | ClVector.Dense vector -> ClVector.Sparse @@ -142,11 +141,11 @@ module Vector = let copy = ClArray.copy clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) -> + fun (processor: RawCommandQueue) allocationMode (vector: ClVector<'a>) -> match vector with | ClVector.Dense vector -> ClVector.Dense - <| copy processor allocationMode vector + <| copy processor allocationMode vector vector.Length | ClVector.Sparse vector -> ClVector.Dense <| toDense processor allocationMode vector @@ -159,7 +158,7 @@ module Vector = let denseFillVector = Dense.Vector.assignByMask op clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationMode (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> + fun (processor: RawCommandQueue) allocationMode (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> match vector, mask with | ClVector.Sparse vector, ClVector.Sparse mask -> ClVector.Sparse @@ -199,7 +198,7 @@ module Vector = let assignBySparse = Dense.Vector.assignBySparseMaskInPlace op clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> + fun (processor: RawCommandQueue) (vector: ClVector<'a>) (mask: ClVector<'b>) (value: 'a) -> match vector, mask with | ClVector.Dense vector, ClVector.Dense mask -> assignByDense processor vector mask value vector | ClVector.Dense vector, ClVector.Sparse mask -> assignBySparse processor vector mask value vector @@ -229,7 +228,7 @@ module Vector = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor left right left | _ -> failwith "Unsupported vector format" @@ -248,7 +247,7 @@ module Vector = let map2Dense = Dense.Vector.map2InPlace map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> + fun (processor: RawCommandQueue) (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) (resultVector: ClVector<'c>) -> match leftVector, rightVector, resultVector with | ClVector.Dense left, ClVector.Dense right, ClVector.Dense result -> map2Dense processor left right result | _ -> failwith "Unsupported vector format" @@ -267,7 +266,7 @@ module Vector = let map2Dense = Dense.Vector.map2 map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Dense left, ClVector.Dense right -> map2Dense processor allocationFlag left right | _ -> failwith "Unsupported vector format" @@ -289,7 +288,7 @@ module Vector = let map2SparseDense = Sparse.Map2.runSparseDense map clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> + fun (processor: RawCommandQueue) allocationFlag (leftVector: ClVector<'a>) (rightVector: ClVector<'b>) -> match leftVector, rightVector with | ClVector.Sparse left, ClVector.Sparse right -> Option.map ClVector.Sparse (map2Sparse processor allocationFlag left right) @@ -308,7 +307,7 @@ module Vector = let existsDense = ClArray.exists predicate clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (vector: ClVector<'a>) -> + fun (processor: RawCommandQueue) (vector: ClVector<'a>) -> match vector with | ClVector.Dense vector -> existsDense processor vector | _ -> failwith "Unsupported format" @@ -332,7 +331,7 @@ module Vector = let denseReduce = Dense.Vector.reduce opAdd clContext workGroupSize - fun (processor: DeviceCommandQueue<_>) (vector: ClVector<'a>) -> + fun (processor: RawCommandQueue) (vector: ClVector<'a>) -> match vector with | ClVector.Sparse vector -> sparseReduce processor vector | ClVector.Dense vector -> denseReduce processor vector diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs index 0583ddb7..8575af21 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/BFS.fs @@ -76,8 +76,8 @@ let testFixtures (testContext: TestContext) = let resHostSparse = resSparse.ToHost queue let resHostPushPull = resPushPull.ToHost queue - matrix.Dispose queue - matrixBool.Dispose queue + matrix.Dispose() + matrixBool.Dispose() res.Dispose() resSparse.Dispose() resPushPull.Dispose() diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs index 3adad360..af94bbe0 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/MSBFS.fs @@ -51,7 +51,7 @@ let makeLevelsTest context queue bfs (matrix: int [,]) = let actual: ClMatrix = bfs queue matrixDevice source let actual = actual.ToHostAndFree queue - matrixDevice.Dispose queue + matrixDevice.Dispose() match actual, expected with | Matrix.COO a, Matrix.COO e -> Utils.compareCOOMatrix (=) a e @@ -103,7 +103,7 @@ let makeParentsTest context queue bfs (matrix: int [,]) = let actual: ClMatrix = bfs queue matrixDevice source let actual = actual.ToHostAndFree queue - matrixDevice.Dispose queue + matrixDevice.Dispose() match actual, expected with | Matrix.COO a, Matrix.COO e -> Utils.compareCOOMatrix (=) a e diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs index b141cd1e..6495407a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/PageRank.fs @@ -102,8 +102,8 @@ let testFixtures (testContext: TestContext) = let resHost = res.ToHost queue - preparedMatrix.Dispose queue - matrix.Dispose queue + preparedMatrix.Dispose() + matrix.Dispose() res.Dispose() match resHost with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs index 5ddca196..4c3f312d 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Algorithms/SSSP.fs @@ -51,7 +51,7 @@ let testFixtures (testContext: TestContext) = let resHost = resDense.ToHost queue - matrix.Dispose queue + matrix.Dispose() resDense.Dispose() match resHost with diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs index 0d4e3d34..bff29cf8 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs @@ -81,4 +81,4 @@ let tests = testFixtures min <@ min @> System.Byte.MaxValue (=) "byte min" testFixtures (||) <@ (||) @> false (=) "bool logic-or" testFixtures (&&) <@ (&&) @> true (=) "bool logic-and" ] - |> testList "Backend.Common.PrefixSum tests" \ No newline at end of file + |> testList "Backend.Common.PrefixSum tests" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs index 628d33b7..f1533586 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Sort/Bitonic.fs @@ -95,7 +95,7 @@ module Bitonic = $"Values for keys %A{actualRows.[i - 1]}, %A{actualCols.[i - 1]} are not the same" let testFixtures<'a when 'a: equality> = - Sort.Bitonic.sortKeyValuesInplace<'a> context wgSize + Sort.Bitonic.sortRowsColumnsValuesInplace<'a> context wgSize |> makeTest |> testPropertyWithConfig config $"Correctness on %A{typeof<'a>}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs index 28171a72..a34300d5 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Convert.fs @@ -33,8 +33,8 @@ let makeTest context q formatFrom formatTo convertFun isZero (array: 'a [,]) = let mBefore = mtx.ToDevice context let mAfter: ClMatrix<'a> = convertFun q HostInterop mBefore let res = mAfter.ToHost q - mBefore.Dispose q - mAfter.Dispose q + mBefore.Dispose() + mAfter.Dispose() res logger.debug ( diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs index d1137e1b..d4def956 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Intersect.fs @@ -55,8 +55,8 @@ let makeTest<'a when 'a: struct> isZero testFun (leftMatrix: 'a [,], rightMatrix let actual = actual.ToHostAndFree processor - m1.Dispose processor - m2.Dispose processor + m1.Dispose() + m2.Dispose() // Check result "Matrices should be equal" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs index ae224469..c015716a 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Kronecker.fs @@ -52,11 +52,11 @@ let makeTest testContext zero isEqual op kroneckerFun (leftMatrix: 'a [,], right let actual = Option.map (fun (m: ClMatrix<'a>) -> m.ToHost processor) result - m1.Dispose processor - m2.Dispose processor + m1.Dispose() + m2.Dispose() match result with - | Some m -> m.Dispose processor + | Some m -> m.Dispose() | _ -> () // Check result diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs index a01bd2f4..a5303ed8 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map.fs @@ -71,13 +71,13 @@ let correctnessGenericTest let res = addFun q HostInterop m - m.Dispose q + m.Dispose() let (cooRes: ClMatrix<'a>) = toCOOFun q HostInterop res let actual = cooRes.ToHost q - cooRes.Dispose q - res.Dispose q + cooRes.Dispose() + res.Dispose() logger.debug ( eventX "Actual is {actual}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs index c0968c5c..6462e6c7 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Map2.fs @@ -76,14 +76,14 @@ let correctnessGenericTest let res = addFun q HostInterop m1 m2 - m1.Dispose q - m2.Dispose q + m1.Dispose() + m2.Dispose() let (cooRes: ClMatrix<'a>) = toCOOFun q HostInterop res let actual = cooRes.ToHost q - cooRes.Dispose q - res.Dispose q + cooRes.Dispose() + res.Dispose() logger.debug ( eventX "Actual is {actual}" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs index 59053230..cbee2338 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Merge.fs @@ -68,8 +68,8 @@ let makeTestCOO isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = (clIsLeft: ClArray)) = testFun processor clLeftMatrix clRightMatrix - clLeftMatrix.Dispose processor - clRightMatrix.Dispose processor + clLeftMatrix.Dispose() + clRightMatrix.Dispose() let leftValues = clLeftValues.ToHostAndFree processor let rightValues = clRightValues.ToHostAndFree processor @@ -131,8 +131,8 @@ let makeTestCOODisjoint isEqual zero testFun (array: ('a * 'a) [,]) = let actual = actual.ToHostAndFree processor - clLeftMatrix.Dispose processor - clRightMatrix.Dispose processor + clLeftMatrix.Dispose() + clRightMatrix.Dispose() rightArray |> Array2D.iteri @@ -185,8 +185,8 @@ let makeTestCSR isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) = (clIsLeft: ClArray)) = testFun processor clLeftMatrix clRightMatrix - clLeftMatrix.Dispose processor - clRightMatrix.Dispose processor + clLeftMatrix.Dispose() + clRightMatrix.Dispose() let leftValues = clLeftValues.ToHostAndFree processor let rightValues = clRightValues.ToHostAndFree processor diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs index 5b75cdd0..81363f08 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/RowsLengths.fs @@ -26,7 +26,7 @@ let makeTest isZero testFun (array: 'a [,]) = let clMatrix = matrix.ToDevice context let (clActual: ClArray) = testFun processor HostInterop clMatrix - clMatrix.Dispose processor + clMatrix.Dispose() let actual = clActual.ToHostAndFree processor let expected = diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs index 88087fe5..4b4f04dc 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Expand.fs @@ -47,8 +47,8 @@ let makeTest isZero testFun (leftArray: 'a [,], rightArray: 'a [,]) = let actualLength, (clActual: ClArray) = testFun processor clLeftMatrix.Columns clRightMatrix.RowPointers - clLeftMatrix.Dispose processor - clRightMatrix.Dispose processor + clLeftMatrix.Dispose() + clRightMatrix.Dispose() let actualPointers = clActual.ToHostAndFree processor @@ -132,8 +132,8 @@ let makeExpandTest isEqual zero testFun (leftArray: 'a [,], rightArray: 'a [,]) clActualRows: ClArray) = testFun processor length clSegmentPointers clLeftMatrix clRightMatrix - clLeftMatrix.Dispose processor - clRightMatrix.Dispose processor + clLeftMatrix.Dispose() + clRightMatrix.Dispose() clSegmentPointers.Free() let actualLeftValues = @@ -200,7 +200,7 @@ let makeGeneralTest zero isEqual opAdd opMul testFun (leftArray: 'a [,], rightAr | Some clMatrixActual -> let matrixActual = clMatrixActual.ToHost processor - clMatrixActual.Dispose processor + clMatrixActual.Dispose() Utils.compareCOOMatrix isEqual matrixActual expected | None -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs index 916c97a9..c9b51f45 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/ExpandCOO.fs @@ -41,7 +41,7 @@ let makeGeneralTest zero isEqual opAdd opMul testFun (leftArray: 'a [,], rightAr | Some clMatrixActual -> let matrixActual = clMatrixActual.ToHost processor - clMatrixActual.Dispose processor + clMatrixActual.Dispose() Utils.compareCOOMatrix isEqual matrixActual expected | None -> diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs index d568bbc0..188f9bcd 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/SpGeMM/Masked.fs @@ -50,10 +50,10 @@ let makeTest context q zero isEqual plus mul mxmFun (leftMatrix: 'a [,], rightMa let (result: ClMatrix<'a>) = mxmFun q m1 m2 matrixMask let actual = result.ToHost q - m1.Dispose q - m2.Dispose q - matrixMask.Dispose q - result.Dispose q + m1.Dispose() + m2.Dispose() + matrixMask.Dispose() + result.Dispose() // Check result "Matrices should be equal" diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs index daefc11a..8408daab 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Matrix/Transpose.fs @@ -89,8 +89,8 @@ let makeTestRegular context q transposeFun hostTranspose isEqual zero case (arra let m = mtx.ToDevice context let (mT: ClMatrix<'a>) = transposeFun q HostInterop m let res = mT.ToHost q - m.Dispose q - mT.Dispose q + m.Dispose() + mT.Dispose() res logger.debug ( diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs index 05147079..20243b01 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMSpV.fs @@ -86,7 +86,7 @@ let correctnessGenericTest match spMV testContext.Queue m v with | Some (ClVector.Sparse res) -> - m.Dispose q + m.Dispose() v.Dispose() let hostResIndices = res.Indices.ToHost q let hostResValues = res.Values.ToHost q diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs index 334d0b6e..d18c7f7c 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/SpMV.fs @@ -72,7 +72,7 @@ let correctnessGenericTest let res = spMV testContext.Queue HostInterop m v - m.Dispose q + m.Dispose() v.Dispose() match res with From 54c0c003893f1ce1cb6bcf5a1b85faf6e81ee0c4 Mon Sep 17 00:00:00 2001 From: kirillgarbar Date: Fri, 10 May 2024 22:27:09 +0300 Subject: [PATCH 094/102] RawCommanQueue 4 --- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 78db3bae..2c2e3011 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -195,14 +195,14 @@ module internal BFS = frontier.Dispose() stop <- true | Some newFrontier -> - frontier.Dispose queue + frontier.Dispose() //Filtering visited vertices match maskComplemented queue DeviceOnly newFrontier levels with | None -> stop <- true - newFrontier.Dispose queue + newFrontier.Dispose() | Some newMaskedFrontier -> - newFrontier.Dispose queue + newFrontier.Dispose() //Push/pull let NNZ = getNNZ queue newMaskedFrontier @@ -211,7 +211,7 @@ module internal BFS = frontier <- newMaskedFrontier else frontier <- toDense queue DeviceOnly newMaskedFrontier - newMaskedFrontier.Dispose queue + newMaskedFrontier.Dispose() | ClVector.Dense oldFrontier -> //Getting new frontier spMVInPlace queue matrix frontier frontier @@ -227,8 +227,8 @@ module internal BFS = if not stop then if (push NNZ frontier.Size) then frontier <- toSparse queue DeviceOnly frontier - oldFrontier.Free queue + oldFrontier.Free() else - frontier.Dispose queue + frontier.Dispose() levels From 20a10e9a1926429bca18a7db15ad09efd9e34201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 1 Jun 2024 17:30:46 +0300 Subject: [PATCH 095/102] Fix build --- paket.dependencies | 4 +- paket.lock | 610 +++++++----------- .../Common/Sort/Radix.fs | 18 +- 3 files changed, 259 insertions(+), 373 deletions(-) diff --git a/paket.dependencies b/paket.dependencies index b427b65e..41db4390 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -9,7 +9,7 @@ nuget YoloDev.Expecto.TestSdk 0.13.3 nuget Microsoft.NET.Test.Sdk 16.8.0 nuget altcover ~> 7 -nuget System.Collections.Immutable 8.0 +nuget System.Collections.Immutable 7.0 nuget ExtraConstraints.Fody 1.14.0 nuget Microsoft.Build.Framework 16.10 nuget System.CodeDom >= 7.0 @@ -59,4 +59,4 @@ group Docs group Analyzers source https://www.nuget.org/api/v2 source https://api.nuget.org/v3/index.json - nuget BinaryDefense.FSharp.Analyzers.Hashing 0.2.2 \ No newline at end of file + nuget BinaryDefense.FSharp.Analyzers.Hashing 0.2.2 diff --git a/paket.lock b/paket.lock index 4dbd56ff..9f567142 100644 --- a/paket.lock +++ b/paket.lock @@ -2,8 +2,8 @@ STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 altcover (7.6.812) - BenchmarkDotNet (0.13.12) - BenchmarkDotNet.Annotations (>= 0.13.12) - restriction: >= netstandard2.0 + BenchmarkDotNet (0.13.9) + BenchmarkDotNet.Annotations (>= 0.13.9) - restriction: >= netstandard2.0 CommandLineParser (>= 2.9.1) - restriction: >= netstandard2.0 Gee.External.Capstone (>= 2.3) - restriction: >= netstandard2.0 Iced (>= 1.17) - restriction: >= netstandard2.0 @@ -18,7 +18,7 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Reflection.Emit.Lightweight (>= 4.7) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - BenchmarkDotNet.Annotations (0.13.12) - restriction: >= netstandard2.0 + BenchmarkDotNet.Annotations (0.13.9) - restriction: >= netstandard2.0 Brahma.FSharp (3.0.0-alpha1.5) Brahma.FSharp.OpenCL.Printer (>= 3.0.0-alpha1.5) - restriction: >= net7.0 Brahma.FSharp.OpenCL.Shared (>= 3.0.0-alpha1.5) - restriction: >= net7.0 @@ -63,7 +63,7 @@ NUGET FSharpx.Text.StructuredFormat (3.1) FSharp.Core (>= 4.6.2) - restriction: || (>= net452) (>= netstandard2.0) Gee.External.Capstone (2.3) - restriction: >= netstandard2.0 - Iced (1.21) - restriction: >= netstandard2.0 + Iced (1.20) - restriction: >= netstandard2.0 MathNet.Numerics (5.0) - restriction: || (>= net45) (>= netstandard1.6) System.ValueTuple (>= 4.4) - restriction: && (>= net461) (< net48) MathNet.Numerics.FSharp (4.0) @@ -77,75 +77,59 @@ NUGET System.Runtime.Serialization.Xml (>= 4.3) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: && (< net45) (>= netstandard1.6) (< netstandard2.0) MathNet.Numerics.MKL.Win-x64 (2.5) - Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Bcl.AsyncInterfaces (7.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) Microsoft.Build.Framework (16.10) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Tasks.Git (8.0) - copy_local: true + Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true Microsoft.CodeAnalysis.Analyzers (3.3.4) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.9.2) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 Microsoft.CodeAnalysis.Analyzers (>= 3.3.4) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: && (< net6.0) (>= netstandard2.0) - System.Reflection.Metadata (>= 8.0) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Text.Encoding.CodePages (>= 8.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.CodeAnalysis.CSharp (4.9.2) - restriction: >= netstandard2.0 - Microsoft.CodeAnalysis.Common (4.9.2) - restriction: >= netstandard2.0 - Microsoft.CodeCoverage (17.9) - restriction: || (>= net45) (>= netcoreapp2.1) + Microsoft.CodeAnalysis.CSharp (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeAnalysis.Common (4.7) - restriction: >= netstandard2.0 + Microsoft.CodeCoverage (17.7.2) - restriction: || (>= net45) (>= netcoreapp2.1) Microsoft.CSharp (4.7) - restriction: || (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) - Microsoft.Diagnostics.NETCore.Client (0.2.510501) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.NETCore.Client (0.2.447801) - restriction: >= netstandard2.0 Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) Microsoft.Extensions.Logging (>= 6.0) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Diagnostics.Runtime (3.1.512801) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Runtime (3.0.442202) - restriction: >= netstandard2.0 Microsoft.Diagnostics.NETCore.Client (>= 0.2.410101) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: && (< net6.0) (>= netstandard2.0) - Microsoft.Diagnostics.Tracing.TraceEvent (3.1.9) - restriction: >= netstandard2.0 - Microsoft.NETCore.Portable.Compatibility (>= 1.0.2) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 - System.Diagnostics.Process (>= 4.3) - restriction: >= netstandard2.0 - System.Diagnostics.TraceSource (>= 4.3) - restriction: >= netstandard2.0 - System.IO.Compression (>= 4.3) - restriction: >= netstandard2.0 - System.IO.UnmanagedMemoryStream (>= 4.3) - restriction: >= netstandard2.0 - System.Net.NameResolution (>= 4.3) - restriction: >= netstandard2.0 - System.Net.Requests (>= 4.3) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 8.0) - restriction: >= netstandard2.0 - System.Reflection.TypeExtensions (>= 4.7) - restriction: >= netstandard2.0 - System.Runtime (>= 4.3.1) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 6.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: >= netstandard2.0 - System.Threading.Tasks.Parallel (>= 4.3) - restriction: >= netstandard2.0 - System.Threading.Thread (>= 4.3) - restriction: >= netstandard2.0 + Microsoft.Diagnostics.Tracing.TraceEvent (3.1.5) - restriction: >= netstandard2.0 + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= netstandard2.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: || (>= net45) (&& (>= netstandard1.3) (< netstandard2.0)) - Microsoft.Extensions.DependencyInjection (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.DependencyInjection (7.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection.Abstractions (8.0.1) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.DependencyInjection.Abstractions (7.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.Logging (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Diagnostics.DiagnosticSource (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.Logging (7.0) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (>= 7.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Extensions.DependencyInjection (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Logging.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Options (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Diagnostics.DiagnosticSource (>= 7.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Logging.Abstractions (8.0.1) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Logging.Abstractions (7.0.1) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.Options (8.0.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.ComponentModel.Annotations (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Primitives (8.0) - restriction: >= netstandard2.0 + Microsoft.Extensions.Options (7.0.1) - restriction: >= netstandard2.0 + Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.Primitives (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.ComponentModel.Annotations (>= 5.0) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) + Microsoft.Extensions.Primitives (7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) Microsoft.NET.Test.Sdk (16.8) @@ -155,31 +139,28 @@ NUGET System.ComponentModel.Primitives (>= 4.1) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (>= 4.1) - restriction: >= uap10.0 System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - restriction: >= uap10.0 - Microsoft.NETCore.Jit (2.0.8) - restriction: && (< net45) (>= netstandard2.0) (< win8) (< wpa81) - Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) - Microsoft.NETCore.Portable.Compatibility (1.0.2) - restriction: >= netstandard2.0 - Microsoft.NETCore.Runtime.CoreCLR (>= 1.0.2) - restriction: && (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) - Microsoft.NETCore.Runtime.CoreCLR (2.0.8) - restriction: && (< net45) (>= netstandard2.0) (< win8) (< wpa81) - Microsoft.NETCore.Jit (>= 2.0.8) - Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) - Microsoft.SourceLink.Common (8.0) - copy_local: true + Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netcoreapp2.0) (< netstandard2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netstandard1.0) (>= netstandard1.6) (< portable-net45+win8)) (&& (< netstandard1.0) (>= netstandard1.6) (>= win8)) (&& (< netstandard1.0) (>= netstandard1.6) (< win8)) (&& (< netstandard1.1) (>= netstandard1.6) (>= uap10.0) (< win8)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard1.6) (>= uap10.1)) (&& (>= netstandard1.6) (>= wp8)) + Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< 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)) + Microsoft.SourceLink.Common (1.1.1) - copy_local: true Microsoft.SourceLink.GitHub (1.0) - copy_local: true Microsoft.Build.Tasks.Git (>= 1.0) Microsoft.SourceLink.Common (>= 1.0) - Microsoft.TestPlatform.ObjectModel (17.9) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.ObjectModel (17.7.2) - restriction: >= netcoreapp3.1 + NuGet.Frameworks (>= 6.5) - restriction: || (>= net462) (>= netstandard2.0) System.Reflection.Metadata (>= 1.6) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.TestPlatform.TestHost (17.9) - restriction: >= netcoreapp2.1 - Microsoft.TestPlatform.ObjectModel (>= 17.9) - restriction: >= netcoreapp3.1 + Microsoft.TestPlatform.TestHost (17.7.2) - restriction: >= netcoreapp2.1 + Microsoft.TestPlatform.ObjectModel (>= 17.7.2) - restriction: >= netcoreapp3.1 Newtonsoft.Json (>= 13.0.1) - restriction: >= netcoreapp3.1 - Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.Win32.Registry (5.0) - restriction: >= netstandard2.0 + Microsoft.Win32.Registry (5.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Cecil (0.11.5) - restriction: || (>= net461) (>= netstandard2.0) NETStandard.Library (2.0.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard2.0)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0)) (&& (< net452) (>= netstandard1.4)) (&& (< netstandard1.3) (>= uap10.0)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (>= net45) (< netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.4) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.4) (< netstandard1.5) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4)) (>= net461) (>= netcoreapp2.0) (&& (>= netstandard1.0) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8) (< win8)) (&& (< netstandard1.0) (< portable-net45+win8) (>= portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< portable-net45+win8+wpa81)) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard1.3) (< win8) (>= wpa81)) (&& (< netstandard1.5) (>= uap10.0)) (>= uap10.1) (>= wp8) @@ -233,6 +214,7 @@ NUGET System.Runtime.Serialization.Formatters (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< net20) (>= netstandard1.0) (< netstandard1.3)) (&& (< net20) (>= netstandard1.3) (< netstandard2.0)) System.Xml.XmlDocument (>= 4.3) - restriction: && (< net20) (>= netstandard1.3) (< netstandard2.0) + NuGet.Frameworks (6.7) - restriction: >= netcoreapp3.1 Perfolizer (0.2.1) - restriction: >= netstandard2.0 System.Memory (>= 4.5.3) - restriction: >= netstandard2.0 QuikGraph (2.5) @@ -243,10 +225,10 @@ NUGET runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) - runtime.native.System (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + runtime.native.System (4.3.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.IO.Compression (4.3.2) - restriction: && (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + runtime.native.System.IO.Compression (4.3.2) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) Microsoft.NETCore.Platforms (>= 1.1.1) Microsoft.NETCore.Targets (>= 1.1.3) runtime.native.System.Net.Http (4.3.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) @@ -282,13 +264,13 @@ NUGET runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos) System.AppContext (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) - System.CodeDom (8.0) - System.Collections (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) + System.CodeDom (7.0) + System.Collections (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Collections.Concurrent (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Collections.Concurrent (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -299,10 +281,10 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Collections.Immutable (8.0) + System.Collections.Immutable (7.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.ComponentModel.Annotations (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) + System.ComponentModel.Annotations (5.0) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.ComponentModel.Primitives (4.3) - restriction: >= uap10.0 System.ComponentModel.TypeConverter (4.3) - restriction: >= uap10.0 System.ComponentModel.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.5) (< win8)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net45) (< netstandard1.5)) (>= net462) (&& (< netstandard1.0) (>= win8)) (>= wp8) (>= wpa81) @@ -312,52 +294,22 @@ NUGET System.IO (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Debug (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Diagnostics.Debug (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Diagnostics.DiagnosticSource (8.0.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) - System.Diagnostics.Process (4.3) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.Win32.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.Win32.Registry (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - runtime.native.System (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Collections (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Debug (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Globalization (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.IO.FileSystem (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.FileSystem.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.Handles (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Runtime.InteropServices (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Text.Encoding.Extensions (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.Tasks (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.Thread (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.ThreadPool (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Diagnostics.Tools (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.TraceSource (4.3) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - runtime.native.System (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Tracing (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Diagnostics.Tracing (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) - System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Drawing.Common (7.0) - restriction: >= net6.0 + Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 + System.Globalization (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) @@ -373,13 +325,13 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.IO (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.IO.Compression (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (>= netstandard2.0) + System.IO.Compression (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.IO.Compression (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -405,7 +357,7 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.FileSystem (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.IO.FileSystem (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.IO (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -414,18 +366,8 @@ NUGET System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.FileSystem.Primitives (4.3) - restriction: || (&& (< monoandroid) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (>= net46) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) - System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.UnmanagedMemoryStream (4.3) - restriction: >= netstandard2.0 - System.Buffers (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO.FileSystem.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net46) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO.FileSystem.Primitives (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Linq (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) System.Collections (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.6) (< win8) (< wp8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Diagnostics.Debug (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -450,14 +392,14 @@ NUGET System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Management (8.0) - restriction: >= netstandard2.0 - System.CodeDom (>= 8.0) - restriction: >= netstandard2.0 + System.Management (7.0.2) - restriction: >= netstandard2.0 + System.CodeDom (>= 7.0) - restriction: >= netstandard2.0 System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Net.Http (4.3.4) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Net.Http (4.3.4) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) runtime.native.System (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Net.Http (>= 4.3) - restriction: && (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -484,40 +426,11 @@ NUGET System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Threading (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Net.NameResolution (4.3) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - runtime.native.System (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Net.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Principal.Windows (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Net.Primitives (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Net.Primitives (4.3.1) - restriction: || (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) System.Runtime (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Net.Requests (4.3) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) - System.Net.Http (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Net.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) - System.Net.WebHeaderCollection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (>= netstandard1.0) (< netstandard1.1) (< win8) (< wp8)) - System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) System.Net.Sockets (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -525,11 +438,6 @@ NUGET System.Net.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Net.WebHeaderCollection (4.3) - restriction: && (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (4.5) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.ObjectModel (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -579,33 +487,36 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.Metadata (8.0) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Reflection.Metadata (7.0.2) - restriction: >= netstandard2.0 + System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Reflection.TypeExtensions (4.7) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (>= netstandard1.6)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (>= netstandard2.0) - System.Resources.ResourceManager (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Reflection.TypeExtensions (4.7) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (>= netstandard1.6) (< netstandard2.0)) (&& (< 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)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.5) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.5) (< uap10.1)) + System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.5) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.5) (< uap10.1)) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.5) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.5) (< uap10.1)) + System.Resources.ResourceManager (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Globalization (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< netstandard1.1) (>= netstandard1.6) (< win8)) (&& (< net45) (>= netstandard1.6)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (>= netstandard2.0) (>= uap10.0) + 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)) 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)) 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)) 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) - System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (>= 4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Runtime.Handles (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Runtime.Handles (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.InteropServices (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) + System.Runtime.InteropServices (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Reflection (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -634,9 +545,9 @@ NUGET System.Runtime.Serialization.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net46) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Xml.ReaderWriter (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< net45) (>= netstandard1.6)) (&& (< netstandard1.4) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (>= netstandard2.0) + System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.2) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net461) (< netstandard1.5) (>= netstandard1.6)) (&& (< net45) (>= net462) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net462) (< netstandard1.5) (>= netstandard1.6)) (&& (< net45) (>= net47) (< netstandard1.4) (>= netstandard1.6)) (&& (< net45) (>= net47) (< netstandard1.5) (>= netstandard1.6)) (&& (< 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.4) (>= netstandard1.6) (>= uap10.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -736,19 +647,19 @@ NUGET System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Permissions (8.0) - restriction: && (< net472) (>= netstandard2.0) + System.Security.Permissions (7.0) - restriction: && (< net472) (>= netstandard2.0) System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Windows.Extensions (>= 8.0) - restriction: >= net6.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net6.0) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (< net472) (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= netstandard2.0) (>= xamarintvos)) (&& (< net6.0) (>= netstandard2.0) (>= xamarinwatchos)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (>= netstandard2.0) (>= uap10.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Text.Encoding (4.3) - restriction: || (&& (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (8.0) - restriction: && (< net6.0) (>= netstandard2.0) + System.Text.Encoding.CodePages (7.0) - restriction: && (< net6.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) @@ -760,35 +671,22 @@ NUGET System.Runtime (>= 4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.6) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.Extensions (>= 4.3.1) - restriction: && (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) + System.Threading (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Threading.Tasks (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) + System.Threading.Tasks (4.3) - restriction: || (&& (< net45) (>= net46) (< netstandard1.3) (>= netstandard1.6)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.3) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.6) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard1.6) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard1.6) (< win8) (< wpa81)) (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (>= netstandard2.0) (< netstandard2.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) - System.Threading.Tasks.Parallel (4.3) - restriction: >= netstandard2.0 - System.Collections.Concurrent (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Diagnostics.Tracing (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Threading.Thread (4.3) - restriction: >= netstandard2.0 - System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Threading.ThreadPool (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Timer (4.3) - restriction: || (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net451) (>= netstandard1.2) (< win81) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.ValueTuple (4.5) - restriction: || (&& (>= net461) (< net48)) (&& (>= net462) (>= netstandard2.0)) - System.Windows.Extensions (8.0) - restriction: >= net6.0 + System.Windows.Extensions (7.0) - restriction: >= net6.0 + System.Drawing.Common (>= 7.0) - restriction: >= net6.0 System.Xml.ReaderWriter (4.3.1) - restriction: || (&& (< net45) (>= net46) (< netstandard1.4) (>= netstandard1.6)) (&& (< 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) (< win8) (< wpa81)) (&& (< netstandard1.5) (>= netstandard1.6) (>= uap10.0)) (&& (>= netstandard1.6) (< portable-net45+win8+wpa81)) (&& (< netstandard2.0) (>= uap10.0)) System.Collections (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Diagnostics.Debug (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -849,7 +747,7 @@ NUGET System.Xml.XmlDocument (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) TypeShape (9.0) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 - YC.OpenCL.NET (3.0.0-alpha1.5) - restriction: >= net7.0 + YC.OpenCL.NET (2.0.5) - restriction: >= net7.0 ExtraConstraints.Fody (1.14) - restriction: >= net7.0 Microsoft.Build.Framework (16.10) - restriction: >= net7.0 System.CodeDom (>= 7.0) - restriction: >= net7.0 @@ -864,13 +762,12 @@ NUGET BinaryDefense.FSharp.Analyzers.Hashing (0.2.2) FSharp.Analyzers.SDK (>= 0.8) - restriction: >= net5.0 FSharp.Core (>= 5.0.1) - restriction: >= net5.0 - FSharp.Analyzers.SDK (0.25) - restriction: >= net5.0 - FSharp.Compiler.Service (43.8.200) - restriction: >= net6.0 - FSharp.Core (8.0.200) - restriction: >= net6.0 + FSharp.Analyzers.SDK (0.14.1) - restriction: >= net5.0 + FSharp.Compiler.Service (>= 43.7.400) - restriction: >= net6.0 + FSharp.Core (>= 7.0.400) - restriction: >= net6.0 McMaster.NETCore.Plugins (>= 1.4) - restriction: >= net6.0 - Microsoft.Extensions.Logging.Abstractions (>= 6.0) - restriction: >= net6.0 - FSharp.Compiler.Service (43.8.200) - restriction: >= net6.0 - FSharp.Core (8.0.200) - restriction: >= netstandard2.0 + FSharp.Compiler.Service (43.7.400) - restriction: >= net6.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 @@ -878,40 +775,37 @@ NUGET System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Core (8.0.200) - restriction: >= net5.0 + FSharp.Core (7.0.400) - restriction: >= net5.0 McMaster.NETCore.Plugins (1.4) - restriction: >= net6.0 Microsoft.DotNet.PlatformAbstractions (>= 3.1.6) - restriction: >= netcoreapp2.1 Microsoft.Extensions.DependencyModel (>= 5.0) - restriction: >= netcoreapp2.1 Microsoft.DotNet.PlatformAbstractions (3.1.6) - restriction: >= net6.0 - Microsoft.Extensions.DependencyInjection.Abstractions (8.0.1) - restriction: >= net6.0 - Microsoft.Extensions.DependencyModel (8.0) - restriction: >= net6.0 - System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Text.Json (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (8.0.1) - restriction: >= net6.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0) + Microsoft.Extensions.DependencyModel (7.0) - restriction: >= net6.0 + System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Text.Json (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Buffers (4.5.1) - restriction: >= net6.0 - System.Collections.Immutable (8.0) - restriction: >= net6.0 + System.Collections.Immutable (7.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.DiagnosticSource (8.0.1) - restriction: >= net6.0 + System.Diagnostics.DiagnosticSource (7.0.2) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Memory (4.5.5) - restriction: >= net6.0 System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Reflection.Emit (4.7) - restriction: >= net6.0 - System.Reflection.Metadata (8.0) - restriction: >= net6.0 - System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Reflection.Metadata (7.0.2) - restriction: >= net6.0 + System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Runtime.CompilerServices.Unsafe (6.0) - restriction: >= net6.0 - System.Text.Encodings.Web (8.0) - restriction: >= net6.0 + System.Text.Encodings.Web (7.0) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (8.0.3) - restriction: >= net6.0 + System.Text.Json (7.0.3) - restriction: >= net6.0 System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Text.Encodings.Web (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) GROUP Build STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 - Argu (6.2.3) + Argu (6.1.1) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 System.Configuration.ConfigurationManager (>= 4.4) - restriction: >= netstandard2.0 BlackFox.VsWhere (1.1) - restriction: >= netstandard2.0 @@ -1038,71 +932,77 @@ NUGET FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (8.0.200) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Build.Framework (17.9.5) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.9.5) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.9.5) - restriction: >= netstandard2.0 + FSharp.Core (7.0.400) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.9.5) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 8.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (>= netstandard2.0) + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.9.5) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) - Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) + Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.2.235) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.9.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.9.1) - restriction: >= netstandard2.0 - NuGet.Configuration (6.9.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.9.1) - restriction: >= netstandard2.0 - NuGet.Packaging (6.9.1) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.9.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.9.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.9.1) - restriction: >= netstandard2.0 - System.Text.Json (>= 7.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) - NuGet.Versioning (6.9.1) - restriction: >= netstandard2.0 + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 Octokit (0.48) - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net5.0) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.Collections.Immutable (8.0) - restriction: >= netstandard2.0 + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.1)) (&& (< net462) (< net6.0) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Collections.Immutable (7.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Configuration.ConfigurationManager (8.0) - restriction: >= netstandard2.0 - System.Diagnostics.EventLog (>= 8.0) - restriction: >= net7.0 - System.Security.Cryptography.ProtectedData (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) - System.Diagnostics.EventLog (8.0) - restriction: >= net7.0 - System.Formats.Asn1 (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Configuration.ConfigurationManager (7.0) - restriction: >= netstandard2.0 + System.Diagnostics.EventLog (>= 7.0) - restriction: >= net7.0 + System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) + System.Security.Permissions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 + System.Drawing.Common (7.0) - restriction: >= net6.0 + Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netstandard2.1)) (>= netstandard2.0) + System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (>= net472) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.4) - restriction: && (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 @@ -1114,74 +1014,67 @@ NUGET System.Runtime (4.3.1) - restriction: && (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (&& (< net5.0) (>= net6.0)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netcoreapp2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (>= net462) (>= xamarinios)) (&& (>= net462) (>= xamarinmac)) (>= net472) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (8.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - System.Formats.Asn1 (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) + System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.Security.Cryptography.ProtectedData (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) + System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Permissions (7.0) - restriction: >= netstandard2.0 + System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - System.Text.Encoding.CodePages (8.0) - restriction: && (< net472) (>= netstandard2.0) + System.Text.Encoding.CodePages (7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (8.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.ValueTuple (>= 4.5) - restriction: >= net462 - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) - System.ValueTuple (4.5) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) + System.ValueTuple (4.5) - restriction: && (>= net45) (>= netstandard2.0) + System.Windows.Extensions (7.0) - restriction: >= net6.0 + System.Drawing.Common (>= 7.0) - restriction: >= net6.0 GROUP Docs STORAGE: NONE NUGET remote: https://www.nuget.org/api/v2 - Argu (6.2.3) + Argu (6.1.1) FSharp.Core (>= 4.3.2) - restriction: >= netstandard2.0 System.Configuration.ConfigurationManager (>= 4.4) - restriction: >= netstandard2.0 BlackFox.VsWhere (1.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.0.0.1) - restriction: >= net45 FSharp.Core (>= 4.2.3) - restriction: && (< net45) (>= netstandard2.0) Microsoft.Win32.Registry (>= 4.7) - restriction: && (< net45) (>= netstandard2.0) - Fable.Browser.Blob (1.4) - restriction: >= netstandard2.0 - Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 + Fable.Browser.Blob (1.3) - restriction: >= netstandard2.0 + Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.Dom (2.16) - restriction: >= netstandard2.0 + Fable.Browser.Dom (2.14) - restriction: >= netstandard2.0 Fable.Browser.Blob (>= 1.3) - restriction: >= netstandard2.0 Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 Fable.Browser.WebStorage (>= 1.2) - restriction: >= netstandard2.0 Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.Event (1.6) - restriction: >= netstandard2.0 - Fable.Browser.Gamepad (>= 1.3) - restriction: >= netstandard2.0 - Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 + Fable.Browser.Event (1.5) - restriction: >= netstandard2.0 + Fable.Browser.Gamepad (>= 1.1) - restriction: >= netstandard2.0 + Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.Gamepad (1.3) - restriction: >= netstandard2.0 - Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 + Fable.Browser.Gamepad (1.2) - restriction: >= netstandard2.0 + Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Browser.WebStorage (1.3) - restriction: >= netstandard2.0 - Fable.Browser.Event (>= 1.6) - restriction: >= netstandard2.0 - Fable.Core (>= 3.2.8) - restriction: >= netstandard2.0 + Fable.Browser.WebStorage (1.2) - restriction: >= netstandard2.0 + Fable.Browser.Event (>= 1.5) - restriction: >= netstandard2.0 + Fable.Core (>= 3.0) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fable.Core (4.3) - restriction: >= netstandard2.0 + Fable.Core (4.1) - restriction: >= netstandard2.0 Fable.React (9.3) Fable.React.Types (>= 18.3) - restriction: >= netstandard2.0 Fable.ReactDom.Types (>= 18.2) - restriction: >= netstandard2.0 @@ -1274,67 +1167,70 @@ NUGET System.Runtime.Loader (>= 4.0) - restriction: && (< net461) (>= netstandard2.0) System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (< net461) (>= netstandard2.0) System.ValueTuple (>= 4.4) - restriction: >= net461 - FSharp.Core (7.0.403) + FSharp.Core (7.0.400) FSharp.Formatting (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Literate (4.0.0-rc1) FSharp.Compiler.Service (>= 34.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Build.Framework (17.9.5) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.9.5) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.9.5) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (17.7.2) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: >= net472 + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Memory (>= 4.5.5) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net7.0) + System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + Microsoft.Build.Utilities.Core (17.7.2) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 17.7.2) - restriction: >= netstandard2.0 Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.9.5) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 8.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (>= netstandard2.0) + Microsoft.NET.StringTools (>= 17.7.2) - restriction: >= netstandard2.0 + Microsoft.VisualStudio.Setup.Configuration.Interop (>= 3.2.2146) - restriction: || (>= net472) (>= net7.0) + Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 + System.Configuration.ConfigurationManager (>= 7.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Security.Permissions (>= 7.0) - restriction: >= netstandard2.0 + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) Microsoft.IO.Redist (6.0) - restriction: >= net472 System.Buffers (>= 4.5.1) - restriction: >= net472 System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.NET.StringTools (17.9.5) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 + Microsoft.NET.StringTools (17.7.2) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net7.0) (>= netstandard2.0)) Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (>= monoandroid) (>= netcoreapp2.1) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (>= uap10.1)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.VisualStudio.Setup.Configuration.Interop (3.7.2175) - restriction: || (>= net472) (>= net7.0) Microsoft.Win32.Primitives (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (>= netstandard2.0)) + Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (< net7.0) (>= netstandard2.0)) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + Microsoft.Win32.SystemEvents (7.0) - restriction: >= net6.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.2.235) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.858) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.9.1) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.9.1) - restriction: >= netstandard2.0 - NuGet.Configuration (6.9.1) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Common (6.7) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Configuration (6.7) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.9.1) - restriction: >= netstandard2.0 - NuGet.Packaging (6.9.1) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.9.1) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.9.1) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (6.7) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.7) - restriction: >= netstandard2.0 System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.9.1) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.9.1) - restriction: >= netstandard2.0 - System.Text.Json (>= 7.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) - NuGet.Versioning (6.9.1) - restriction: >= netstandard2.0 + NuGet.Protocol (6.7) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.7) - restriction: >= netstandard2.0 + NuGet.Versioning (6.7) - restriction: >= netstandard2.0 runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1388,17 +1284,18 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) - System.Collections.Immutable (8.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Collections.Immutable (7.0) - restriction: || (>= net461) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Configuration.ConfigurationManager (8.0) - restriction: >= netstandard2.0 - System.Diagnostics.EventLog (>= 8.0) - restriction: >= net7.0 - System.Security.Cryptography.ProtectedData (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) + System.Configuration.ConfigurationManager (7.0) - restriction: >= netstandard2.0 + System.Diagnostics.EventLog (>= 7.0) - restriction: >= net7.0 + System.Security.Cryptography.ProtectedData (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) + System.Security.Permissions (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Diagnostics.Debug (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Diagnostics.EventLog (8.0) - restriction: >= net7.0 + System.Diagnostics.EventLog (7.0) - restriction: >= net7.0 System.Diagnostics.Process (4.3) - restriction: && (< net461) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.Win32.Primitives (>= 4.3) - restriction: && (< monotouch) (< net46) (>= netstandard1.4) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1435,7 +1332,9 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.2) (< win8)) (&& (< 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)) - System.Formats.Asn1 (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Drawing.Common (7.0) - restriction: >= net6.0 + Microsoft.Win32.SystemEvents (>= 7.0) - restriction: >= net6.0 + System.Formats.Asn1 (7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Globalization (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1480,8 +1379,8 @@ NUGET System.Reflection.Emit (4.7) - restriction: && (< net461) (>= netstandard2.0) System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Reflection.Metadata (8.0) - restriction: || (>= net461) (>= netstandard2.0) - System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) + System.Reflection.Metadata (7.0.2) - restriction: || (>= net461) (>= netstandard2.0) + System.Collections.Immutable (>= 7.0) - restriction: || (>= net462) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Reflection.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1497,7 +1396,7 @@ NUGET System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) 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)) 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)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (>= net461) (&& (< net5.0) (>= net6.0)) (&& (>= net6.0) (< net7.0)) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.1) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (< netstandard1.1) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.Runtime.Extensions (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) @@ -1522,7 +1421,7 @@ NUGET System.Resources.ResourceManager (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard1.3) (< win8) (< wpa81)) System.Runtime.Extensions (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.AccessControl (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.AccessControl (6.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) System.Security.Cryptography.Algorithms (4.3.1) - restriction: && (< net461) (>= netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1555,9 +1454,9 @@ NUGET System.Runtime.InteropServices (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Text.Encoding (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (8.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - System.Formats.Asn1 (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) + System.Formats.Asn1 (>= 7.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net463) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net461) (>= net463) (>= netstandard2.0)) @@ -1568,15 +1467,18 @@ NUGET System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.Tasks (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.ProtectedData (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) + System.Security.Cryptography.ProtectedData (7.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (>= net461) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (< net472) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Security.Permissions (7.0) - restriction: >= netstandard2.0 + System.Security.AccessControl (>= 6.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) + System.Windows.Extensions (>= 7.0) - restriction: >= net6.0 + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net6.0) (>= netstandard2.0)) (&& (< net7.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.4) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.6) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (8.0) - restriction: && (< net472) (>= netstandard2.0) + System.Text.Encoding.CodePages (7.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0) System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) System.Text.Encoding.Extensions (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -1584,18 +1486,6 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encodings.Web (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (8.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.ValueTuple (>= 4.5) - restriction: >= net462 System.Threading (4.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net463) (>= netstandard2.0)) (&& (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) @@ -1603,11 +1493,11 @@ NUGET Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net462) (>= netstandard2.0)) (>= net472) (&& (< net5.0) (>= netstandard2.0)) (&& (>= netstandard2.0) (< netstandard2.1)) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) System.Threading.Thread (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Threading.ThreadPool (4.3) - restriction: && (< net46) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime.Handles (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.ValueTuple (4.5) - restriction: || (>= net461) (&& (>= net462) (>= netstandard2.0)) + System.ValueTuple (4.5) - restriction: >= net461 + System.Windows.Extensions (7.0) - restriction: >= net6.0 + System.Drawing.Common (>= 7.0) - restriction: >= net6.0 diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs index 9bac182b..11cb9d81 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Radix.fs @@ -92,14 +92,7 @@ module internal Radix = let kernel = kernel.GetKernel() - kernel.KernelFunc - ndRange - indices.Length - indices - clWorkGroupCount - shift - globalOffsets - localOffsets + kernel.KernelFunc ndRange indices.Length indices clWorkGroupCount shift globalOffsets localOffsets processor.RunKernel kernel @@ -156,7 +149,8 @@ module internal Radix = if keys.Length <= 1 then copy processor DeviceOnly keys keys.Length else - let firstKeys = copy processor DeviceOnly keys keys.Length + let firstKeys = + copy processor DeviceOnly keys keys.Length let secondKeys = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, keys.Length) @@ -259,12 +253,14 @@ module internal Radix = if values.Length <= 1 then copy processor DeviceOnly keys keys.Length, dataCopy processor DeviceOnly values values.Length else - let firstKeys = copy processor DeviceOnly keys keys.Length + let firstKeys = + copy processor DeviceOnly keys keys.Length let secondKeys = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, keys.Length) - let firstValues = dataCopy processor DeviceOnly values values.Length + let firstValues = + dataCopy processor DeviceOnly values values.Length let secondValues = clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, values.Length) From 2f7ffe84b1b70520604de0042d65a883fcf87d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 1 Jun 2024 18:21:27 +0300 Subject: [PATCH 096/102] Fix prefix sum test --- tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs index a7f35516..d7379ac9 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Common/Scan/PrefixSum.fs @@ -63,7 +63,7 @@ let makeTest plus zero isEqual scanInclude scanExclude (array: 'a []) = |> Array.mapFold (fun s t -> let a = plus s t - s, a) + a, a) zero "Total sums for include should be equal" From a4da73dc43c25800b944b43695df23878f9634c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 1 Jun 2024 19:18:16 +0300 Subject: [PATCH 097/102] Count atomic --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 36 ++++++++++++++----- src/GraphBLAS-sharp.Backend/Common/Utils.fs | 4 +++ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 9c21781e..7c3d5594 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -902,22 +902,40 @@ module ClArray = let count<'a> (predicate: Expr<'a -> bool>) (clContext: ClContext) workGroupSize = - let sum = - Reduce.reduce <@ (+) @> clContext workGroupSize + let count = + <@ fun (ndRange: Range1D) (length: int) (array: ClArray<'a>) (count: ClCell) -> + let gid = ndRange.GlobalID0 + let mutable countLocal = 0 + let gSize = ndRange.GlobalWorkSize - let getBitmap = - Map.map<'a, int> (Map.predicateBitmap predicate) clContext workGroupSize + let mutable i = gid + + while i < length do + let res = (%predicate) array.[i] + if res then countLocal <- countLocal + 1 + i <- i + gSize + + atomic (+) count.Value countLocal |> ignore @> + + let count = clContext.Compile count fun (processor: RawCommandQueue) (array: ClArray<'a>) -> - let bitmap = getBitmap processor DeviceOnly array + let result = clContext.CreateClCell(0) - let result = - (sum processor bitmap).ToHostAndFree processor + let numberOfGroups = + Utils.divUpClamp array.Length workGroupSize 1 1024 - bitmap.Free() + let ndRange = + Range1D.CreateValid(workGroupSize * numberOfGroups, workGroupSize) - result + let kernel = count.GetKernel() + + kernel.KernelFunc ndRange array.Length array result + + processor.RunKernel kernel + + result.ToHostAndFree processor /// /// Builds a new array whose elements are the results of applying the given function diff --git a/src/GraphBLAS-sharp.Backend/Common/Utils.fs b/src/GraphBLAS-sharp.Backend/Common/Utils.fs index 3ef10555..ef4c3371 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Utils.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Utils.fs @@ -19,6 +19,10 @@ module internal Utils = >> fun x -> x ||| (x >>> 16) >> fun x -> x + 1 + let divUp x y = x / y + (if x % y = 0 then 0 else 1) + + let divUpClamp x y left right = min (max (divUp x y) left) right + let floorToMultiple multiple x = x / multiple * multiple let ceilToMultiple multiple x = ((x - 1) / multiple + 1) * multiple From b6e13fd5af1cbc60f118b4053fdda032c45422dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 1 Jun 2024 19:54:17 +0300 Subject: [PATCH 098/102] SpMSpVMasked --- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 34 +-- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 4 +- .../Operations/Operations.fs | 46 +++- .../Operations/SpMSpV.fs | 215 ++++++++++++++++++ .../Vector/Dense/Vector.fs | 56 ----- 5 files changed, 274 insertions(+), 81 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index 2c2e3011..f5387bb0 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -135,7 +135,7 @@ module internal BFS = Operations.SpMVInPlace add mul clContext workGroupSize let spMSpV = - Operations.SpMSpVBool add mul clContext workGroupSize + Operations.SpMSpVMaskedBool add mul clContext workGroupSize let zeroCreate = Vector.zeroCreate clContext workGroupSize @@ -145,9 +145,6 @@ module internal BFS = let maskComplementedInPlace = Vector.map2InPlace Mask.complementedOp clContext workGroupSize - let maskComplemented = - Vector.map2Sparse Mask.complementedOp clContext workGroupSize - let fillSubVectorInPlace = Vector.assignByMaskInPlace (Mask.assign) clContext workGroupSize @@ -190,28 +187,21 @@ module internal BFS = match frontier with | ClVector.Sparse _ -> //Getting new frontier - match spMSpV queue matrix frontier with + match spMSpV queue matrix frontier levels with | None -> frontier.Dispose() stop <- true - | Some newFrontier -> + | Some newMaskedFrontier -> frontier.Dispose() - //Filtering visited vertices - match maskComplemented queue DeviceOnly newFrontier levels with - | None -> - stop <- true - newFrontier.Dispose() - | Some newMaskedFrontier -> - newFrontier.Dispose() - - //Push/pull - let NNZ = getNNZ queue newMaskedFrontier - - if (push NNZ newMaskedFrontier.Size) then - frontier <- newMaskedFrontier - else - frontier <- toDense queue DeviceOnly newMaskedFrontier - newMaskedFrontier.Dispose() + + //Push/pull + let NNZ = getNNZ queue newMaskedFrontier + + if (push NNZ newMaskedFrontier.Size) then + frontier <- newMaskedFrontier + else + frontier <- toDense queue DeviceOnly newMaskedFrontier + newMaskedFrontier.Dispose() | ClVector.Dense oldFrontier -> //Getting new frontier spMVInPlace queue matrix frontier frontier diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index 7c3d5594..d48863ae 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -906,14 +906,14 @@ module ClArray = <@ fun (ndRange: Range1D) (length: int) (array: ClArray<'a>) (count: ClCell) -> let gid = ndRange.GlobalID0 let mutable countLocal = 0 - let gSize = ndRange.GlobalWorkSize + let step = ndRange.GlobalWorkSize let mutable i = gid while i < length do let res = (%predicate) array.[i] if res then countLocal <- countLocal + 1 - i <- i + gSize + i <- i + step atomic (+) count.Value countLocal |> ignore @> diff --git a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs index ff06f1d5..bc0f2c1d 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/Operations.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/Operations.fs @@ -331,7 +331,7 @@ module Operations = | _ -> failwith "Not implemented yet" /// - /// CSR Matrix - sparse vector multiplication. Optimized for bool OR and AND operations. + /// CSR Matrix - sparse vector multiplication. Optimized for bool OR and AND operations by skipping reduction stage. /// /// Type of binary function to reduce entries. /// Type of binary function to combine entries. @@ -352,6 +352,50 @@ module Operations = | ClMatrix.CSR m, ClVector.Sparse v -> Option.map ClVector.Sparse (run queue m v) | _ -> failwith "Not implemented yet" + /// + /// CSR Matrix - sparse vector multiplication with mask. Mask is complemented. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMSpVMasked + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpMSpV.Masked.runMasked add mul clContext workGroupSize + + fun (queue: RawCommandQueue) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) (mask: ClVector<'d>) -> + match matrix, vector, mask with + | ClMatrix.CSR m, ClVector.Sparse v, ClVector.Dense mask -> Option.map ClVector.Sparse (run queue m v mask) + | _ -> failwith "Not implemented yet" + + /// + /// CSR Matrix - sparse vector multiplication with mask. Mask is complemented. Optimized for bool OR and AND operations by skipping reduction stage. + /// + /// Type of binary function to reduce entries. + /// Type of binary function to combine entries. + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let SpMSpVMaskedBool + (add: Expr bool option -> bool option>) + (mul: Expr bool option -> bool option>) + (clContext: ClContext) + workGroupSize + = + + let run = + SpMSpV.Masked.runMaskedBoolStandard add mul clContext workGroupSize + + fun (queue: RawCommandQueue) (matrix: ClMatrix<'a>) (vector: ClVector<'b>) (mask: ClVector<'d>) -> + match matrix, vector, mask with + | ClMatrix.CSR m, ClVector.Sparse v, ClVector.Dense mask -> Option.map ClVector.Sparse (run queue m v mask) + | _ -> failwith "Not implemented yet" + /// /// CSR Matrix - sparse vector multiplication. /// diff --git a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs index e4f61fea..3f6f0908 100644 --- a/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs +++ b/src/GraphBLAS-sharp.Backend/Operations/SpMSpV.fs @@ -290,3 +290,218 @@ module SpMSpV = Indices = resultIndices Values = create queue DeviceOnly resultIndices.Length true Size = matrix.ColumnCount }) + + module Masked = + + let private count (clContext: ClContext) workGroupSize = + + let count = + <@ fun (ndRange: Range1D) vectorLength (vectorIndices: ClArray) (vectorMask: ClArray<'d option>) (matrixRowPointers: ClArray) (matrixColumns: ClArray) (result: ClCell) -> + let gid = ndRange.GlobalID0 + let step = ndRange.GlobalWorkSize + + let mutable idx = gid + + while idx < vectorLength do + let vectorIndex = vectorIndices.[idx] + + let rowStart = matrixRowPointers.[vectorIndex] + let rowEnd = matrixRowPointers.[vectorIndex + 1] + + let mutable count = 0 + + for i in rowStart .. rowEnd - 1 do + match vectorMask.[matrixColumns.[i]] with + | None -> count <- count + 1 + | Some _ -> () + + atomic (+) result.Value count |> ignore + + idx <- idx + step @> + + let count = clContext.Compile count + + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) (vectorMask: ClArray<'d option>) -> + + let length = vector.NNZ + + let numberOfGroups = + Utils.divUpClamp length workGroupSize 1 1024 + + let result = clContext.CreateClCell(0) + + let ndRange = + Range1D.CreateValid(numberOfGroups * workGroupSize, workGroupSize) + + let count = count.GetKernel() + + count.KernelFunc ndRange length vector.Indices vectorMask matrix.RowPointers matrix.Columns result + + queue.RunKernel count + + result.ToHostAndFree queue + + let private multiplyValues + (clContext: ClContext) + (mul: Expr<'a option -> 'b option -> 'c option>) + workGroupSize + = + + let multiply = + <@ fun (ndRange: Range1D) resultLength (vectorIndices: ClArray) (vectorValues: ClArray<'b>) (vectorMask: ClArray<'d option>) (matrixRowPointers: ClArray) (matrixColumns: ClArray) (matrixValues: ClArray<'a>) (resultOffset: ClCell) (resultIndices: ClArray) (resultValues: ClArray<'c option>) -> + let gid = ndRange.GlobalID0 + let step = ndRange.GlobalWorkSize + + let mutable i = gid + + while i < resultLength do + let vectorIndex = vectorIndices.[i] + let vectorValue = vectorValues.[i] + + let rowStart = matrixRowPointers.[vectorIndex] + let rowEnd = matrixRowPointers.[vectorIndex + 1] + + let mutable count = 0 + + for i in rowStart .. rowEnd - 1 do + match vectorMask.[matrixColumns.[i]] with + | None -> count <- count + 1 + | Some _ -> () + + let mutable offset = atomic (+) resultOffset.Value count + + for i in rowStart .. rowEnd - 1 do + let columnIndex = matrixColumns.[i] + + // TODO: Pass mask operation + match vectorMask.[columnIndex] with + | None -> + resultIndices.[offset] <- columnIndex + resultValues.[offset] <- (%mul) (Some matrixValues.[i]) (Some vectorValue) + offset <- offset + 1 + | Some _ -> () + + i <- i + step @> + + let kernel = clContext.Compile multiply + + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) (vectorMask: ClArray<'d option>) (resultSize: int) -> + + let multipliedIndices = + clContext.CreateClArrayWithSpecificAllocationMode(DeviceOnly, resultSize) + + let multipliedValues = + clContext.CreateClArrayWithSpecificAllocationMode<'c option>(DeviceOnly, resultSize) + + let offset = clContext.CreateClCell 0 + + let numberOfGroups = + Utils.divUpClamp vector.NNZ workGroupSize 1 1024 + + let ndRange = + Range1D.CreateValid(numberOfGroups * workGroupSize, workGroupSize) + + let kernel = kernel.GetKernel() + + kernel.KernelFunc + ndRange + vector.NNZ + vector.Indices + vector.Values + vectorMask + matrix.RowPointers + matrix.Columns + matrix.Values + offset + multipliedIndices + multipliedValues + + queue.RunKernel kernel + + offset.Free() + + multipliedIndices, multipliedValues + + let runMasked + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let count = count clContext workGroupSize + + let multiplyValues = + multiplyValues clContext mul workGroupSize + + let sort = + Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + + let segReduce = + Reduce.ByKey.Option.segmentSequential add clContext workGroupSize + + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) (mask: ClArray<'d option>) -> + + match count queue matrix vector mask with + | 0 -> None + | resultSize -> + let multipliedIndices, multipliedValues = + multiplyValues queue matrix vector mask resultSize + + sort queue multipliedIndices multipliedValues + + let result = + segReduce queue DeviceOnly multipliedIndices multipliedValues + |> Option.map + (fun (reducedValues, reducedKeys) -> + { Context = clContext + Indices = reducedKeys + Values = reducedValues + Size = matrix.ColumnCount }) + + multipliedIndices.Free() + multipliedValues.Free() + + result + + let runMaskedBoolStandard + (add: Expr<'c option -> 'c option -> 'c option>) + (mul: Expr<'a option -> 'b option -> 'c option>) + (clContext: ClContext) + workGroupSize + = + + let count = count clContext workGroupSize + + let multiplyValues = + multiplyValues clContext mul workGroupSize + + let sort = + Sort.Bitonic.sortKeyValuesInplace clContext workGroupSize + + let removeDuplicates = + GraphBLAS.FSharp.ClArray.removeDuplications clContext workGroupSize + + let create = + GraphBLAS.FSharp.ClArray.create clContext workGroupSize + + fun (queue: RawCommandQueue) (matrix: ClMatrix.CSR<'a>) (vector: ClVector.Sparse<'b>) (mask: ClArray<'d option>) -> + + match count queue matrix vector mask with + | 0 -> None + | resultSize -> + let multipliedIndices, multipliedValues = + multiplyValues queue matrix vector mask resultSize + + sort queue multipliedIndices multipliedValues + + let resultIndices = removeDuplicates queue multipliedIndices + + multipliedIndices.Free() + multipliedValues.Free() + + Some + <| { Context = clContext + Indices = resultIndices + Values = create queue DeviceOnly resultIndices.Length true + Size = matrix.ColumnCount } diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 36a74c67..36dc6835 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -142,62 +142,6 @@ module Vector = let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = - let scatterValues = - Common.Scatter.lastOccurrence clContext workGroupSize - - let scatterIndices = - Common.Scatter.lastOccurrence clContext workGroupSize - - let getBitmap = - Map.map (Map.option 1 0) clContext workGroupSize - - let prefixSum = - Common.PrefixSum.standardExcludeInPlace clContext workGroupSize - - let allIndices = - ClArray.init Map.id clContext workGroupSize - - let allValues = - Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize - - fun (processor: RawCommandQueue) allocationMode (vector: ClArray<'a option>) -> - - let positions = getBitmap processor DeviceOnly vector - - let resultLength = - (prefixSum processor positions) - .ToHostAndFree(processor) - - // compute result indices - let resultIndices = - clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) - - let allIndices = - allIndices processor DeviceOnly vector.Length - - scatterIndices processor positions allIndices resultIndices - - allIndices.Free() - - // compute result values - let resultValues = - clContext.CreateClArrayWithSpecificAllocationMode<'a>(allocationMode, resultLength) - - let allValues = allValues processor DeviceOnly vector - - scatterValues processor positions allValues resultValues - - allValues.Free() - - positions.Free() - - { Context = clContext - Indices = resultIndices - Values = resultValues - Size = vector.Length } - - let toSparse2<'a when 'a: struct> (clContext: ClContext) workGroupSize = - let kernel = <@ fun (ndRange: Range1D) (inputLength: int) (inputValues: ClArray<'a option>) (resultSize: ClCell) (resultIndices: ClArray) (resultValues: ClArray<'a>) -> From 83ab36702fa2cb504f942a847e1f8544deb080ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 1 Jun 2024 20:08:01 +0300 Subject: [PATCH 099/102] Small fixes --- src/GraphBLAS-sharp.Backend/Common/ClArray.fs | 2 +- src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs index d48863ae..bc324850 100644 --- a/src/GraphBLAS-sharp.Backend/Common/ClArray.fs +++ b/src/GraphBLAS-sharp.Backend/Common/ClArray.fs @@ -362,7 +362,7 @@ module ClArray = let gid = ndRange.GlobalID0 - if gid < length then + if gid < length && not result.Value then let isExist = (%predicate) vector.[gid] if isExist then result.Value <- true @> diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs index 724de235..c12538b2 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs @@ -257,6 +257,7 @@ module Bitonic = int (clContext.ClDevice.LocalMemSize) / (sizeof + sizeof<'a>) ) + / 2 let maxThreadsPerBlock = min (clContext.ClDevice.MaxWorkGroupSize) (localSize / 2) @@ -476,4 +477,4 @@ module Bitonic = kernelGlobal.KernelFunc ndRangeGlobal rows values values.Length (localSize * 2) - queue.RunKernel(kernelGlobal) \ No newline at end of file + queue.RunKernel(kernelGlobal) From fc0acd18d0cbba20344be9c1b28be15cc56e98b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sat, 1 Jun 2024 20:14:06 +0300 Subject: [PATCH 100/102] Small fixes 2 --- src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs index c12538b2..bf3572b7 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs @@ -10,8 +10,9 @@ module Bitonic = let localSize = Common.Utils.floorToPower2 ( int (clContext.ClDevice.LocalMemSize) - / (sizeof + sizeof<'a>) + / (sizeof + sizeof<'a>) ) + / 2 let maxThreadsPerBlock = min (clContext.ClDevice.MaxWorkGroupSize) (localSize / 2) From 050df59fecc500a1de5c8115def8dc9c6e310393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=93=D0=B0=D1=80?= =?UTF-8?q?=D0=B1=D0=B0=D1=80?= Date: Sun, 2 Jun 2024 19:31:41 +0300 Subject: [PATCH 101/102] toSparse unsorted and tests --- src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs | 3 +- .../Vector/Dense/Vector.fs | 56 +++++++++++++++++++ src/GraphBLAS-sharp.Backend/Vector/Vector.fs | 20 +++++++ .../Backend/Vector/Convert.fs | 34 +++++++++-- 4 files changed, 107 insertions(+), 6 deletions(-) diff --git a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs index f5387bb0..2b9a3a83 100644 --- a/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs +++ b/src/GraphBLAS-sharp.Backend/Algorithms/BFS.fs @@ -148,7 +148,8 @@ module internal BFS = let fillSubVectorInPlace = Vector.assignByMaskInPlace (Mask.assign) clContext workGroupSize - let toSparse = Vector.toSparse clContext workGroupSize + let toSparse = + Vector.toSparseUnsorted clContext workGroupSize let toDense = Vector.toDense clContext workGroupSize diff --git a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs index 36dc6835..6d910afd 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Dense/Vector.fs @@ -140,7 +140,63 @@ module Vector = valueCell.Free() + // TODO: toSparseUnsorted + bitonic probably would work faster let toSparse<'a when 'a: struct> (clContext: ClContext) workGroupSize = + let scatterValues = + Common.Scatter.lastOccurrence clContext workGroupSize + + let scatterIndices = + Common.Scatter.lastOccurrence clContext workGroupSize + + let getBitmap = + Map.map (Map.option 1 0) clContext workGroupSize + + let prefixSum = + Common.PrefixSum.standardExcludeInPlace clContext workGroupSize + + let allIndices = + ClArray.init Map.id clContext workGroupSize + + let allValues = + Map.map (Map.optionToValueOrZero Unchecked.defaultof<'a>) clContext workGroupSize + + fun (processor: RawCommandQueue) allocationMode (vector: ClArray<'a option>) -> + + let positions = getBitmap processor DeviceOnly vector + + let resultLength = + (prefixSum processor positions) + .ToHostAndFree(processor) + + // compute result indices + let resultIndices = + clContext.CreateClArrayWithSpecificAllocationMode(allocationMode, resultLength) + + let allIndices = + allIndices processor DeviceOnly vector.Length + + scatterIndices processor positions allIndices resultIndices + + allIndices.Free() + + // compute result values + let resultValues = + clContext.CreateClArrayWithSpecificAllocationMode<'a>(allocationMode, resultLength) + + let allValues = allValues processor DeviceOnly vector + + scatterValues processor positions allValues resultValues + + allValues.Free() + + positions.Free() + + { Context = clContext + Indices = resultIndices + Values = resultValues + Size = vector.Length } + + let toSparseUnsorted<'a when 'a: struct> (clContext: ClContext) workGroupSize = let kernel = <@ fun (ndRange: Range1D) (inputLength: int) (inputValues: ClArray<'a option>) (resultSize: ClCell) (resultIndices: ClArray) (resultValues: ClArray<'a>) -> diff --git a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs index 0d10dd08..1c9f05c4 100644 --- a/src/GraphBLAS-sharp.Backend/Vector/Vector.fs +++ b/src/GraphBLAS-sharp.Backend/Vector/Vector.fs @@ -129,6 +129,26 @@ module Vector = <| toSparse processor allocationMode vector | ClVector.Sparse _ -> copy processor allocationMode vector + /// + /// Sparsifies the given vector if it is in a dense format. + /// If the given vector is already sparse, copies it. + /// Works faster than regular version, but indices of the sparse vector are unsorted. + /// + /// OpenCL context. + /// Should be a power of 2 and greater than 1. + let toSparseUnsorted (clContext: ClContext) workGroupSize = + let toSparse = + Dense.Vector.toSparseUnsorted clContext workGroupSize + + let copy = copy clContext workGroupSize + + fun (processor: RawCommandQueue) allocationMode (vector: ClVector<'a>) -> + match vector with + | ClVector.Dense vector -> + ClVector.Sparse + <| toSparse processor allocationMode vector + | ClVector.Sparse _ -> copy processor allocationMode vector + /// /// Densifies the given vector if it is in a sparse format. /// If the given vector is already dense, copies it. diff --git a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs index a755be58..a53691e1 100644 --- a/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs +++ b/tests/GraphBLAS-sharp.Tests/Backend/Vector/Convert.fs @@ -22,6 +22,7 @@ let wgSize = Constants.Common.defaultWorkGroupSize let makeTest formatFrom (convertFun: RawCommandQueue -> AllocationFlag -> ClVector<'a> -> ClVector<'a>) + (convertFunUnsorted: option AllocationFlag -> ClVector<'a> -> ClVector<'a>>) isZero case (array: 'a []) @@ -37,7 +38,7 @@ let makeTest let actual = let clVector = vector.ToDevice context - let convertedVector = convertFun q HostInterop clVector + let convertedVector = convertFun q DeviceOnly clVector let res = convertedVector.ToHost q @@ -56,6 +57,27 @@ let makeTest Expect.equal actual expected "Vectors must be the same" + match convertFunUnsorted with + | None -> () + | Some convertFunUnsorted -> + let clVector = vector.ToDevice context + let convertedVector = convertFunUnsorted q DeviceOnly clVector + + let res = convertedVector.ToHost q + + match res, expected with + | Vector.Sparse res, Vector.Sparse expected -> + let iv = Array.zip res.Indices res.Values + let resSorted = Array.sortBy (fun (i, v) -> i) iv + let indices, values = Array.unzip resSorted + Expect.equal indices expected.Indices "Indices must be the same" + Expect.equal values expected.Values "Values must be the same" + Expect.equal res.Size expected.Size "Size must be the same" + | _ -> () + + clVector.Dispose() + convertedVector.Dispose() + let testFixtures case = let getCorrectnessTestName datatype formatFrom = sprintf $"Correctness on %s{datatype}, %A{formatFrom} -> %A{case.Format}" @@ -68,19 +90,21 @@ let testFixtures case = match case.Format with | Sparse -> [ let convertFun = Vector.toSparse context wgSize + let convertFunUnsorted = Vector.toSparseUnsorted context wgSize Utils.listOfUnionCases |> List.map (fun formatFrom -> - makeTest formatFrom convertFun ((=) 0) case + makeTest formatFrom convertFun (Some convertFunUnsorted) ((=) 0) case |> testPropertyWithConfig config (getCorrectnessTestName "int" formatFrom)) let convertFun = Vector.toSparse context wgSize + let convertFunUnsorted = Vector.toSparseUnsorted context wgSize Utils.listOfUnionCases |> List.map (fun formatFrom -> - makeTest formatFrom convertFun ((=) false) case + makeTest formatFrom convertFun (Some convertFunUnsorted) ((=) false) case |> testPropertyWithConfig config (getCorrectnessTestName "bool" formatFrom)) ] |> List.concat | Dense -> @@ -89,7 +113,7 @@ let testFixtures case = Utils.listOfUnionCases |> List.map (fun formatFrom -> - makeTest formatFrom convertFun ((=) 0) case + makeTest formatFrom convertFun None ((=) 0) case |> testPropertyWithConfig config (getCorrectnessTestName "int" formatFrom)) let convertFun = Vector.toDense context wgSize @@ -97,7 +121,7 @@ let testFixtures case = Utils.listOfUnionCases |> List.map (fun formatFrom -> - makeTest formatFrom convertFun ((=) false) case + makeTest formatFrom convertFun None ((=) false) case |> testPropertyWithConfig config (getCorrectnessTestName "bool" formatFrom)) ] |> List.concat From 12e733f3e456891b5910e9d18376d4768c04daab Mon Sep 17 00:00:00 2001 From: Kirill <71129570+kirillgarbar@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:31:36 +0300 Subject: [PATCH 102/102] Fix bitonic localSize --- src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs index bf3572b7..11b6b62e 100644 --- a/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs +++ b/src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs @@ -10,7 +10,7 @@ module Bitonic = let localSize = Common.Utils.floorToPower2 ( int (clContext.ClDevice.LocalMemSize) - / (sizeof + sizeof<'a>) + / (sizeof + sizeof<'a>) ) / 2