{"id":28236423,"url":"https://github.com/passionlab/distributed_sddmm","last_synced_at":"2025-06-10T13:32:01.372Z","repository":{"id":49065198,"uuid":"345949716","full_name":"PASSIONLab/distributed_sddmm","owner":"PASSIONLab","description":"Distributed SDDMM Kernel","archived":false,"fork":false,"pushed_at":"2022-07-08T00:02:36.000Z","size":1862,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T00:14:37.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PASSIONLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-09T09:21:40.000Z","updated_at":"2024-06-30T13:39:29.000Z","dependencies_parsed_at":"2022-09-10T14:50:06.917Z","dependency_job_id":null,"html_url":"https://github.com/PASSIONLab/distributed_sddmm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PASSIONLab%2Fdistributed_sddmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PASSIONLab%2Fdistributed_sddmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PASSIONLab%2Fdistributed_sddmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PASSIONLab%2Fdistributed_sddmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PASSIONLab","download_url":"https://codeload.github.com/PASSIONLab/distributed_sddmm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PASSIONLab%2Fdistributed_sddmm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259085160,"owners_count":22803150,"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","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":[],"created_at":"2025-05-19T00:14:41.212Z","updated_at":"2025-06-10T13:32:01.363Z","avatar_url":"https://github.com/PASSIONLab.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Half-and-Half  (HnH)\n__Half-and-Half (HnH)__ is a C++ library for extremely \nlarge parallel distributed sparse-times-dense matrix multiplication (SpMM) \nand sampled-dense-dense matrix multiplication (SDDMM) on computing clusters. \nIt relies on MPI for inter-process communication and OpenMP for intra-node parallelism.\nHnH uses one-and-a-__half__ dimensional\n(1.5D) and two-and-a-__half__ dimensional (2.5D) sparse-times-dense algorithms\nto reduce communication bandwidth, especially when dense matrix inputs are tall-skinny. \nIt provides a simple, unified interface for 1.5D\ndense shifting, 1.5D sparse shifting, 2.5D dense shifting, and 2.5D sparse shifting\nSDDMM / SpMM algorithms that hides implementation details from users.\n\nWhen executing an SDDMM followed by an SpMM operation, HnH can save even more communication by\nusing one of two distinct strategies: replication reuse (every algorithm) or kernel\noverlap (only 1.5D dense shifting algorithms).\n\nHnH can use any replacement for its local SpMM and SDDMM kernels that you provide,\nallowing it to generalize beyond the standard definitions of SDDMM and SpMM.\n\n## Citation info\n\nThe algorithms implemented in this repository are described in the following publication\n\nVivek Bharadwaj, Aydin Buluç, James Demmel. Distributed-Memory Sparse Kernels for Machine Learning. In Proceedings of 36th IEEE International Parallel \u0026 Distributed Processing Symposium, 2022.\n\nPreprint available at https://arxiv.org/abs/2203.07673\n\n## How do I use it?\nHere are the steps:\n\n1. Load a sparse matrix.\n2. Select a local kernel implementation and an algorithm. \n3. Retrieve the input buffers adapted to the algorithm and fill them. \n4. Execute an SDDMM, SpMM, or both on the input buffers. \n\nHere's a demo: \n```c++\n\n// 1. Load a sparse matrix from the given filename \n//    (matrix format format) \nstring fname(argv[1]);\nSpmatLocal S;\nS.loadTuples(true, -1, -1, fname);\n\n// 2. Use the standard definition of SDDMM / SpMM with\n//    a 1.5D sparse shifting algorithm  \nStandardKernel local_ops;\nSparse15D_Sparse_Shift* d_ops =\n    new Sparse15D_Sparse_Shift(\u0026S,\n        atoi(argv[2]), \n        atoi(argv[3]), \n        \u0026local_ops);\n\n// 3. Retrieve and fill IO buffers \n\n// 4. Execute an SDDMM\nd_ops-\u003esddmmA(A, B, S, result);\n```\nThe result of the SDDMM computation is stored in ``result\".\n\n## Who is this for?\nHnH is useful when the main computation in your application is an SDDMM / SpMM.\nUse it when the input matrices in your problem exceed the memory capacity of a single\nnode, or you want to reduce runtime on a parallel cluster. \n\n## External Dependencies \nHnH relies on:\n- CMake \u003e= 3.14\n- GCC \u003e= 8.3.0: It has not been tested yet with the Intel C++ Compiler.\n- MPI\n- OpenMP\n- Intel MKL \u003e= 2018\n- CombBLAS: The Combinatorial BLAS, for sparse matrix IO and random sparse matrix generation. \n- Eigen: For local dense matrix algebra\n\nThe first five dependencies are your responsibility, and CMake should locate them\nautomatically. Run `. install_dependencies.sh` script to download Eigen and build\nCombBLAS. If you are running on Cori, run `. modules.sh` to load the modules with \nthe correct dependencies and set the programming environment correctly. \n\n## Included Dependencies\nHnH includes Niels Lohmann's JSON C++ library header to neatly print out statistics\nwhen benchmarking. \n\n## Building\nFollow these steps in the repository root:\n\n1. `mkdir build`\n2. `cd build`\n3. `cmake ..`\n4. `make -j4`\n\nLink your code to the resulting output library.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassionlab%2Fdistributed_sddmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassionlab%2Fdistributed_sddmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassionlab%2Fdistributed_sddmm/lists"}