{"id":21246889,"url":"https://github.com/sparselinearalgebra/graphblas-sharp","last_synced_at":"2025-10-16T08:55:39.360Z","repository":{"id":40475928,"uuid":"297080284","full_name":"SparseLinearAlgebra/GraphBLAS-sharp","owner":"SparseLinearAlgebra","description":"GPGPU-based GraphBLAS-like API implementation in F# (using Brahma.FSharp and OpenCL)","archived":false,"fork":false,"pushed_at":"2025-03-22T05:50:14.000Z","size":17439,"stargazers_count":4,"open_issues_count":1,"forks_count":7,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-09-06T05:45:17.903Z","etag":null,"topics":["dotnet","fsharp","gpu","graph-algorithms","graphblas","linear-algebra","matrix","sparse-linear-algebra","sparse-matrix"],"latest_commit_sha":null,"homepage":"https://yaccconstructor.github.io/GraphBLAS-sharp/","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SparseLinearAlgebra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-20T13:18:07.000Z","updated_at":"2024-10-31T10:39:50.000Z","dependencies_parsed_at":"2023-02-19T05:16:04.078Z","dependency_job_id":"eec7d251-bf96-48f8-86bc-664124d65d38","html_url":"https://github.com/SparseLinearAlgebra/GraphBLAS-sharp","commit_stats":null,"previous_names":["sparselinearalgebra/graphblas-sharp","yaccconstructor/graphblas-sharp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SparseLinearAlgebra/GraphBLAS-sharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparseLinearAlgebra%2FGraphBLAS-sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparseLinearAlgebra%2FGraphBLAS-sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparseLinearAlgebra%2FGraphBLAS-sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparseLinearAlgebra%2FGraphBLAS-sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparseLinearAlgebra","download_url":"https://codeload.github.com/SparseLinearAlgebra/GraphBLAS-sharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparseLinearAlgebra%2FGraphBLAS-sharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279170930,"owners_count":26118662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","fsharp","gpu","graph-algorithms","graphblas","linear-algebra","matrix","sparse-linear-algebra","sparse-matrix"],"created_at":"2024-11-21T02:09:06.912Z","updated_at":"2025-10-16T08:55:39.343Z","avatar_url":"https://github.com/SparseLinearAlgebra.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphBLAS-sharp\n\n[![FAKE Build](https://github.com/YaccConstructor/GraphBLAS-sharp/actions/workflows/build-on-push.yml/badge.svg)](https://github.com/YaccConstructor/GraphBLAS-sharp/actions/workflows/build-on-push.yml) \n[![NuGet Badge](https://buildstats.info/nuget/GraphBLAS-sharp)](https://www.nuget.org/packages/GraphBLAS-sharp/)\n[![License](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT)\n\n\n\n\n\nGraphBLAS# is a GPGPU-based [GraphBLAS](https://graphblas.org/)-like API implementation in F#. To utilize GPGPUs we use [Brahma.FSharp](https://github.com/YaccConstructor/Brahma.FSharp). So, GraphBLAS# can utilize any OpenCL-compatible device.\n\n### Features\n- ```Option\u003c't\u003e``` to solve [explicit/implicit zeroes problem](https://github.com/GraphBLAS/LAGraph/issues/28#issuecomment-542952115). If graph has labels of type ```'t``` then adjacency matrix is ```Matrix\u003cOption\u003c't\u003e\u003e```. Sparse storage contains only values for ```Some\u003c't\u003e``` cells. \n- Elementwise operations have type ```AtLeastOne\u003c't1,'t2\u003e -\u003e Option\u003c't3\u003e``` to be shure that ```None op None``` is ```None```. Also developer explicitly controls what should be ```None```. ```AtLeastOne``` defined as fallows:\n  ```fsharp\n  type AtLeastOne\u003c't1, 't2\u003e =\n     | Both of 't1*'t2\n     | Left of 't1\n     | Right of 't2\n  ```\n  So, type of matrix-matrix elementwise operation is ```Matrix\u003cOption\u003c't1\u003e\u003e -\u003e Matrix\u003cOption\u003c't2\u003e\u003e -\u003e (AtLeastOne\u003c't1,'t2\u003e -\u003e Option\u003c't3\u003e) -\u003e Matrix\u003cOption\u003c't3\u003e\u003e```. \n- No semirings. Just functions. Of course one can implement semirings on the top of provided API.\n- Minimal core: high-order functions allows us to minimaze core by functions unification. For example, such functions as matrix-matrix addition, matrix-matrix element-wise multiplication, masking all are partial case of `map2` function.\n\n### Operations\n- **Matrix-Matrix**\n  - [x] CSR-CSR `map2`\n  - [x] CSR-CSR `map2AtLeastOne`\n  - [x] COO-COO `map2`\n  - [x] COO-COO `map2AtLeastOne`\n  - [x] CSR-CSR multiplication\n  - [x] CSR-CSR Kronecker product\n- **Vector-Matrix**\n  - [x] Dense-CSR multiplication\n  - [ ] Sparse-CSR multiplication\n- **Vector-Vector**\n  - [x] Dense-Dense `map2`\n  - [x] Dense-Dense `map2AtLeastOne`\n  - [x] Sparse-Sparse `map2`\n  - [x] Sparse-Sparse `map2AtLeastOne`\n  - [ ] ...\n- **Matrix**\n  - [x] `copy` \n  - [x] `map`\n  - [x] COO transpose\n  - [x] CSR transpose\n  - [x] CSC transpose\n  - [ ] ...\n- **Vector**\n  - [x] `zeroCreate` \n  - [x] `ofList`\n  - [x] `copy`\n  - [x] `reduce`\n  - [ ] ...  \n\n### Graph Analysis Algorithms\n- [ ] BFS\n- [ ] Parent BFS\n- [ ] Single Source Shortest Path\n- [ ] Triangles Counting\n- [ ] Local Clustering Coefficient\n- [ ] Community Detection using Label Propagation\n- [ ] Weakly Connected Components\n- [ ] PageRank\n\n### Evaluation\nMatrices from [SuiteSparse matrix collection](https://sparse.tamu.edu/) which we choose for evaluation.\n\u003ctable\u003e\n\u003cthead\u003e\n  \u003ctr\u003e\n    \u003cth\u003eMatrix\u003c/th\u003e\n    \u003cth\u003eSize\u003c/th\u003e\n    \u003cth\u003eNNZ\u003c/th\u003e\n    \u003cth\u003eSquared matrix NNZ\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ewing\u003c/td\u003e\n    \u003ctd\u003e62 032\u003c/td\u003e\n    \u003ctd\u003e243 088\u003c/td\u003e\n    \u003ctd\u003e714 200\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eluxembourg osm\u003c/td\u003e\n    \u003ctd\u003e114 599\u003c/td\u003e\n    \u003ctd\u003e119 666\u003c/td\u003e\n    \u003ctd\u003e393 261\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eamazon0312\u003c/td\u003e\n    \u003ctd\u003e400 727\u003c/td\u003e\n    \u003ctd\u003e3 200 440\u003c/td\u003e\n    \u003ctd\u003e14 390 544\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eamazon-2008\u003c/td\u003e\n    \u003ctd\u003e735 323\u003c/td\u003e\n    \u003ctd\u003e5 158 388\u003c/td\u003e\n    \u003ctd\u003e25 366 745\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eweb-Google\u003c/td\u003e\n    \u003ctd\u003e916 428\u003c/td\u003e\n    \u003ctd\u003e5 105 039\u003c/td\u003e\n    \u003ctd\u003e29 710 164\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ewebbase-1M\u003c/td\u003e\n    \u003ctd\u003e1 000 005\u003c/td\u003e\n    \u003ctd\u003e3 105 536\u003c/td\u003e\n    \u003ctd\u003e51 111 996\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ecit-Patents\u003c/td\u003e\n    \u003ctd\u003e3 774 768\u003c/td\u003e\n    \u003ctd\u003e16 518 948\u003c/td\u003e\n    \u003ctd\u003e469\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nElement-wise matrix-matrix evaluation results presented below. Time is measured in milliseconds. We perform our experiments on the PC with Ubuntu 20.04 installed and with the following hardware configuration: Intel Core i7–4790 CPU, 3.60GHz, 32GB DDR4 RAM with GeForce GTX 2070, 8GB GDDR6, 1.41GHz. \n\n\u003ctable\u003e\n\u003cthead\u003e\n  \u003ctr\u003e\n    \u003cth rowspan=\"3\"\u003eMatrix\u003c/th\u003e\n    \u003cth colspan=\"4\"\u003eElemint-wise addition\u003c/th\u003e\n    \u003cth colspan=\"2\"\u003eElemint-wise multiplication\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth colspan=\"2\"\u003eGraphBLAS-sharp\u003c/th\u003e\n    \u003cth rowspan=\"2\"\u003eSuiteSparse\u003c/th\u003e\n    \u003cth rowspan=\"2\"\u003eCUSP\u003c/th\u003e\n    \u003cth rowspan=\"2\"\u003eGraphBLAS-sharp\u003c/th\u003e\n    \u003cth rowspan=\"2\"\u003eSuiteSparse\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eNo AtLeastOne\u003c/th\u003e\n    \u003cth\u003eAtLeastOne\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ewing\u003c/td\u003e\n    \u003ctd\u003e4,3 ± 0,8\u003c/td\u003e\n    \u003ctd\u003e4,3 ± 0,6\u003c/td\u003e\n    \u003ctd\u003e2,7 ± 0,9\u003c/td\u003e\n    \u003ctd\u003e1,5 ± 0,0\u003c/td\u003e\n    \u003ctd\u003e3,7 ± 0,5\u003c/td\u003e\n    \u003ctd\u003e3,5 ± 0,4\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eluxembourg osm\u003c/td\u003e\n    \u003ctd\u003e4,9 ± 0,7\u003c/td\u003e\n    \u003ctd\u003e4,1 ± 0,5\u003c/td\u003e\n    \u003ctd\u003e3,0 ± 1,1\u003c/td\u003e\n    \u003ctd\u003e1,2 ± 0,1\u003c/td\u003e\n    \u003ctd\u003e3,8 ± 0,6\u003c/td\u003e\n    \u003ctd\u003e3,0 ± 0,6\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eamazon0312\u003c/td\u003e\n    \u003ctd\u003e22,3 ± 1,3\u003c/td\u003e\n    \u003ctd\u003e22,1 ± 1,3\u003c/td\u003e\n    \u003ctd\u003e33,4 ± 0,8\u003c/td\u003e\n    \u003ctd\u003e11,0 ± 1,4\u003c/td\u003e\n    \u003ctd\u003e18,7 ± 0,9\u003c/td\u003e\n    \u003ctd\u003e35,7 ± 1,4\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eamazon-2008\u003c/td\u003e\n    \u003ctd\u003e38,7 ± 0,8\u003c/td\u003e\n    \u003ctd\u003e39,0 ± 1,0\u003c/td\u003e\n    \u003ctd\u003e55,9 ± 1,0\u003c/td\u003e\n    \u003ctd\u003e19,1 ± 1,4\u003c/td\u003e\n    \u003ctd\u003e34,5 ± 1,0\u003c/td\u003e\n    \u003ctd\u003e58,9 ± 1,9\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eweb-Google\u003c/td\u003e\n    \u003ctd\u003e43,4 ± 0,8\u003c/td\u003e\n    \u003ctd\u003e43,4 ± 1,1\u003c/td\u003e\n    \u003ctd\u003e67,2 ± 7,5\u003c/td\u003e\n    \u003ctd\u003e21,3 ± 1,3\u003c/td\u003e\n    \u003ctd\u003e39,0 ± 1,2\u003c/td\u003e\n    \u003ctd\u003e66,2 ± 0,4\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ewebbase-1M\u003c/td\u003e\n    \u003ctd\u003e63,6 ± 1,1\u003c/td\u003e\n    \u003ctd\u003e63,7 ± 1,3\u003c/td\u003e\n    \u003ctd\u003e86,5 ± 2,0\u003c/td\u003e\n    \u003ctd\u003e24,3 ± 1,3\u003c/td\u003e\n    \u003ctd\u003e54,5 ± 0,7\u003c/td\u003e\n    \u003ctd\u003e37,6 ± 5,6\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ecit-Patents\u003c/td\u003e\n    \u003ctd\u003e26,9 ± 0,7\u003c/td\u003e\n    \u003ctd\u003e26,0 ± 0,7\u003c/td\u003e\n    \u003ctd\u003e183,4 ± 5,4\u003c/td\u003e\n    \u003ctd\u003e10,8 ± 0,6\u003c/td\u003e\n    \u003ctd\u003e24,3 ± 0,7\u003c/td\u003e\n    \u003ctd\u003e162,2 ± 1,7\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Contributing\nContributions, issues and feature requests are welcome.\nFeel free to check [issues](https://github.com/YaccConstructor/GraphBLAS-sharp/issues) page if you want to contribute.\n\n## Build\nMake sure the following **requirements** are installed on your system:\n- [dotnet SDK](https://dotnet.microsoft.com/en-us/download/dotnet/5.0) 5.0 or higher\n- OpenCL-compatible device and respective OpenCL driver\n\nTo build and run all tests:\n\n- on Windows\n```cmd\nbuild.cmd \n```\n\n- on Linux/macOS\n```shell\n./build.sh \n```\nTo find more options look at [MiniScaffold](https://github.com/TheAngryByrd/MiniScaffold). We use it in our project.\n\n### Release\nThe release process is automated: NuGet packages publishing process is triggered by tag pushing to any branch.\nTo release new version one should\n1. [Add release notes to CHANGELOG](https://github.com/TheAngryByrd/MiniScaffold/blob/master/Content/Library/README.md#releasing)\n2. Run ```./build.sh Release [version]``` (on local machine)\n\n\n## License\nThis project licensed under MIT License. License text can be found in the [license file](https://github.com/YaccConstructor/GraphBLAS-sharp/blob/master/LICENSE.md).\n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparselinearalgebra%2Fgraphblas-sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparselinearalgebra%2Fgraphblas-sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparselinearalgebra%2Fgraphblas-sharp/lists"}