forked from taichi-dev/taichi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lang] Merge triplets in the same position when building GPU sparse m…
…atrix (taichi-dev#6605) Issue: taichi-dev#2906 ### Brief Summary When building GPU sparse matrix, cuSparse API requires three separated arrays: row index ptr, col index ptr, and values ptr. However, the sparse matrix builder only uses one ndarray to store all triplets, the memory layout is like: [row, col, value, row, col, value, ...]. In this pr, I retrieve all data from ndarray and merge all triplets in the same position of the sparse matrix. Then, all triplets are stored in three separate arrays. At last, these three arrays are used to build sparse matrix using cuSparse API.
- Loading branch information
Showing
9 changed files
with
181 additions
and
240 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.