You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked into what would entail adding BCSR support to legate.sparse. I'll hold off on putting the actual work into it until we have requests from users that actually want to use the BCSR format and what functions they would like to see implemented. Some notes I have on doing this:
The BCSR format is just CSR, where each CSR entry is a contiguous block of non-zeros, similar to a DSDD format in TACO.
As a result, a similar approach to what we've done for CSR/CSC should work out. An annoying thing about this is that the way DISTAL would represent a DSDD tensor is different enough from how we would want to do this effectively in a SciPy implementation that we won't be able to take DISTAL kernels directly, but they should provide a reasonable skeleton for implementation.
In general, the implementation strategy will need to do a few things for declaring partition alignment using legate sparse. 1) input and output dense tensors will have to be reshaped (using store reshapes) based on the blocksize to have alignments against the blocked pos array. 2) images (on both pos and crd) need to have an affine transform applied to them that scales the values by different components of the blocksize Shape. Since this can't be done right now using Legion, we'll have to approximate this by making temporary copies of the stores.
Format conversions are unfortunately not implemented in pure python, so we'll have to hand-code some of these format conversion routines.
cuSparse has pretty well-rounded support for BCSR matrices that we can exploit. It'll be unclear what to do for operations that cuSparse doesn't support, since the size of the blocks significantly affects the strategy for GPU execution (even for CPU-parallel execution).
An example dot implementation on a BSR matrix might look something like:
The tricky part here is handling the images onto these transformed stores, which we can't currently do natively in the image. One way of getting around this is to not transform the stores at all, but create temporary transformed version of the regions that take the correct image.
The text was updated successfully, but these errors were encountered:
I realized that another way to do this instead of the nested tensor / big block region is to use fields of size = to the block size. A downside of this is the inability to use legion reductions though
I looked into what would entail adding BCSR support to legate.sparse. I'll hold off on putting the actual work into it until we have requests from users that actually want to use the BCSR format and what functions they would like to see implemented. Some notes I have on doing this:
Shape
. Since this can't be done right now using Legion, we'll have to approximate this by making temporary copies of the stores.An example dot implementation on a BSR matrix might look something like:
The tricky part here is handling the images onto these transformed stores, which we can't currently do natively in the image. One way of getting around this is to not transform the stores at all, but create temporary transformed version of the regions that take the correct image.
The text was updated successfully, but these errors were encountered: