Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: OneSparse – Open Source Accelerated Sparse Linear Algebra for Postgres (github.com/onesparse)
13 points by michelpp on Sept 30, 2024 | hide | past | favorite | 3 comments


Hello HN!

Six years ago I release a prototype integration of SuiteSparse as a Postgres extension, and it received quite a bit of attention here on HN. Since then I have gotten deeply involved in the GraphBLAS community, sitting on the C API Committee and working with many different implementors and language binding authors, and that experience has changed both the API and my depth of understanding. I picked pggraphblas back up again and have done a complete rewrite applying the lessons learned and most modern techniques to the code and to support the most up to date features of SuiteSparse like JIT compilation, automatic parallelization and GPU support.

Like the JSON/JSONB types did for unstructured data, OneSparse makes dense and sparse matrices and vectors fully native Postgres types. OneSparse supports optimized, parallel matrix multiplication and other operations like reduction, selection, assignment, extraction, elementwise union, and intersection. These methods can be used for both traditional numeric algebraic computing, or sparse graph analytics over adjacency and incidence matrices.

I often tell people that GraphBLAS is "Technology from the Future" as as the future of computing becomes more computation dense but information sparse, powerful language abstractions like Linear Algebra become even more useful in the hands of scientists, researchers, and programmers who want to express their ideas in high level ways but still be able to target many different architectures like CPUs and GPUs with little or no code changes.

We're an open source company and OneSparse is truely open source Postgres extension. We have a fun and exciting list of TODO features at the bottom of our README, so please reach out to us if you feel like contributing to this completely new paradigm for understanding your data and utilizing Linear Algebra!


congrats on shipping michel - it's very cool that you've wrapped this into a PG extension. The breadth-first search looks interesting. Do you have some more docs or a simple example with table data?

One request for the "todos" at the end would be a small docker container with onesparse pre-installed - it would help a lot for getting started

Also I may have missed this, but are there more docs yet, or just the readme for now?


I got this out a bit early to get some eyeballs on it and open it up to community contribution. I have a branch in progress converting the various Python examples and notebooks we have over to SQL. So stay tuned.

For docs the best reference to the algebra is the SuiteSparse User Guide, but that doesn't cover the SQL side of things. I'm working on an idea where I put markdown comments in the sql test files and simulate the Python doctest tool so I can render markdown documentation from the test files. If that works out they'll end up on github pages as the official SQL docs with links out to the SuiteSparse User Guide for the low level details.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: