Skip to content

Conversation

liruilong940607
Copy link
Collaborator

@liruilong940607 liruilong940607 commented Apr 11, 2023

I recently realize that the current way of using the packed_info to represent sparse samples along rays, is very similar to the standard CSR sparse matrix formula, but not entirely the same. And various toolboxes either already or on the way to support this formula with operations, including:

So it would be great to switch to the standard CSR formula in this repo as well, to benefit from the existing and future supports in the PyTorch community.

For example, the conversion between packed_info and ray_indices were required some CUDA programming, but with CSR formula it is already supported by torch_scatter.segment_csr and torch_scatter.gather_csr.

Also, hopefully it will be less difficult for users to get hands on using this repo, when it comes to understanding how batched data is packed. Following the CSR standard there would be tones of tutorial / docs users can refer to, and for users that are already familiar with CSR sparse matrix there will be zero learning curve.

However, this would inevitably leads to some API changes, which we want to minimize as we go.

This PR is to start a trial on the migration and see how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants