metagraph-dev / mlir-graphblas

MLIR tools and dialect for GraphBLAS
https://mlir-graphblas.readthedocs.io/en/latest/
Apache License 2.0
18 stars 6 forks source link

GraphBLAS dialect op equivalents of np.ones, np.eye, np.arange, etc.? #259

Open paul-tqh-nguyen opened 2 years ago

paul-tqh-nguyen commented 2 years ago

We might benefit from have GraphBLAS op equivalents of the following NumPy functions:

Motivation: GraphWave uses np.eye and np.arange. I mentioned np.ones since np.eye(3) == np.diag(np.ones(3)). The others just seemed useful. We'd easily be able to get inspiration for others from the NumPy API.

This relates to https://github.com/metagraph-dev/mlir-graphblas/discussions/261.

seibert commented 2 years ago

Paul and I chatted about having these all lower down to a generic sparse matrix creation operation which contains a block that receives coordinates and yields values.