Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce a versatile sparse tensor type to MatX (experimental) #821

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

aartbik
Copy link
Contributor

@aartbik aartbik commented Jan 14, 2025

This PR introduces the implementation of a single versatile sparse tensor type that uses a tensor format DSL (Domain Specific Language) to describe a vast space of storage formats. Although the tensor format can easily define many common storage formats (such as Dense, COO, CSR, CSC, BSR), it can also define many less common storage formats. In addition, the tensor format DSL can be extended to include even more storage formats in the future.

This first PR simply introduces all storage details for the single versatile sparse tensor type, together with some factory methods for constructing COO, CSR, and CSC sparse matrices from MatX buffers. Later PRs will introduce more general ways of constructing sparse tensors (e.g. from file) and actual operations like SpMV and SpMM using cuSPARSE.

@cliffburdick
Copy link
Collaborator

/build

Copy link
Collaborator

@cliffburdick cliffburdick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

We do need some unit tests and documentation to go along with it so people can start using it. I think the sparse unit tests should have its own directory inside of tests/ for now.

Copy link
Contributor Author

@aartbik aartbik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your excellent codereview, Cliff.
I learned a lot, and the code looks much better now!
Thanks!

@cliffburdick
Copy link
Collaborator

/build

@aartbik aartbik requested a review from cliffburdick January 16, 2025 00:39
@cliffburdick
Copy link
Collaborator

/build

This PR introduces the implementation of a single versatile sparse tensor type that uses a tensor format DSL (Domain Specific Language) to describe a vast space of storage formats. Although the tensor format can easily define many common storage formats (such as Dense, COO, CSR, CSC, BSR), it can also define many less common storage formats. In addition, the tensor format DSL can be extended to include even more storage formats in the future.

This first PR simply introduces all storage details for the single versatile sparse tensor type, together with some factory methods for constructing COO, CSR, and CSC sparse matrices from MatX buffers. Later PRs will introduce more general ways of constructing sparse tensors (e.g. from file) and actual operations like SpMV and SpMM using cuSPARSE.
@cliffburdick
Copy link
Collaborator

/build

@cliffburdick cliffburdick merged commit a394c29 into NVIDIA:main Jan 16, 2025
1 check passed
@cliffburdick cliffburdick deleted the bik branch January 16, 2025 22:18
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.

2 participants