-
Notifications
You must be signed in to change notification settings - Fork 7
BFS Push-pull, SSSP, SpMSpV #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
c45d651
add BFS (benchmarkdotnet) benchmark result for b9ef28731a1f9a4549e7b8…
ec833fb
add BFS (benchmarkdotnet) benchmark result for b9ef28731a1f9a4549e7b8…
df59d19
add BFS (benchmarkdotnet) benchmark result for c7bb9b1addaf82693381e3…
fdebf18
add BFS (benchmarkdotnet) benchmark result for abdb353aa170e7693660ff…
9359530
add BFS (benchmarkdotnet) benchmark result for 7885e8ae7c843c91d05171…
346846f
add BFS (benchmarkdotnet) benchmark result for e850a49b54523883645408…
97d7743
add BFS (benchmarkdotnet) benchmark result for e0485c52128b16b0ba4668…
578c537
add BFS (benchmarkdotnet) benchmark result for cb8a79181709f3d138b077…
8d28782
Merge pull request #81 from YaccConstructor/dev
gsvgit f1dfc23
Turn API docs generation on.
gsvgit af19a02
Dependencies updated in order to fix CI buid (log file format problem)
gsvgit 564acf9
Release branch is master not main.
gsvgit be3395a
Documentation release of version 0.1.0
gsvgit 1584013
Automate Release and Publish process (publish on CI)
gsvgit 0305361
Bump version to 0.1.0-alpha1
gsvgit c5a0406
Fix misprint.
gsvgit cf49e7a
Configure separated builds in both debug and release modes.
gsvgit 8a3b796
Correct misprint in workflow configuration yaml.
gsvgit 41cdc46
Updated names of jobs (Release - Debug modes)
gsvgit f02ef72
Release docks on CI
gsvgit 6f08dad
SSSP dense
kirillgarbar 38ceee3
Radix returns sorted keys
kirillgarbar 0d09177
SpMSpV bool only
kirillgarbar a97631a
Choose with keys
kirillgarbar a87949e
SegReduce without offsets
kirillgarbar 7c22108
SpMSpV general
kirillgarbar d3bc08c
None on empty vectors
kirillgarbar d6b9fb5
BFS Push-pull and push
kirillgarbar 808ea01
Paket lock update
kirillgarbar 91513e1
Option.map
kirillgarbar 9b6fd09
Radix version returning values only
kirillgarbar 5a62156
Remove unused methods
kirillgarbar 90fe441
ClArray.count uses map
kirillgarbar 1f54823
Free
kirillgarbar c2db0de
Upper case in error messages
kirillgarbar 8358a15
Fix comments in Arithmetic
kirillgarbar 53fba87
Dataset folder set to default
kirillgarbar 56f8097
Merge branch 'dev' into dev
kirillgarbar 90a1efe
Paket lock fix
kirillgarbar 0c5db3f
refactor: comments; common api
artemiipatov 7ec498d
wip: refactor
artemiipatov 5d900f5
refactor: namespace/module names
artemiipatov 4c21e7e
refactor: add comments
artemiipatov be8c888
refactor: namespace/module names
artemiipatov 40e3e3a
refactor: assembly attributes
artemiipatov d587397
refactor: readme.md
artemiipatov 4c5dede
refactor: objects comments
artemiipatov 45baacd
refactor: move Matrix.map, Vector.map; add: Vector.map tests
artemiipatov 4841a03
refactor: vector.map tests
artemiipatov da2d1bd
fix: exception related to the use of bitonic
artemiipatov 203d641
refactor: returned internal comments
artemiipatov 04efa1e
fix: common
artemiipatov b9d202f
refactor: common; docs for matrix
artemiipatov 6c0a71f
refactor: formatting
artemiipatov 2d86b35
fix: blit, choose2 tests exception
artemiipatov 51bb2b4
fix: kronecker memory leaks
artemiipatov 779c8de
refactor: maxAllocSize: unit64
artemiipatov bb708d0
refactor: tests count
artemiipatov 3ceb397
Move Map and Bitmap methods to separate modules to ease dependencies
kirillgarbar 3616f94
SSSP optimization, using front as mask
kirillgarbar 77d6fe5
Reduce instead of prefixSum
kirillgarbar a6a068d
Release collectedRows, Option.bind
kirillgarbar 2f38f74
Non-blocking dispose
kirillgarbar 1302d8e
Paket lock update
kirillgarbar eb82c53
refactor: matrix, vector comments
artemiipatov e187916
fix: spgemm negative maxAllocSize
artemiipatov 441a2f9
fix: spgemm maxAllocSize calculation
artemiipatov 8a79b41
Merge pull request #84 from artemiipatov/refactor
gsvgit 48404f9
Merge remote-tracking branch 'YaccConstructor/master' into pr
kirillgarbar 60500e9
Merge finish
kirillgarbar f4484a9
Enable all tests
kirillgarbar c6232d3
Format Program.fs
kirillgarbar ca7b275
paket.lock update
kirillgarbar 53c6715
Encapsulate ClCell management inside operation
kirillgarbar d2951d4
mkNumericSumAsMul allow max length paths
kirillgarbar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<int> | ||
let min = ArithmeticOperations.min<int> | ||
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<Msg>) (matrix: ClMatrix.CSR<int>) (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" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A large number of releases, which, if I'm not mistaken, are blocking. Can this cause a loss in performance?