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

SpGEMM - c_nz_idx in gustavsons kernel goes out of bounds #1047

Open
marjerie opened this issue Apr 19, 2023 · 0 comments
Open

SpGEMM - c_nz_idx in gustavsons kernel goes out of bounds #1047

marjerie opened this issue Apr 19, 2023 · 0 comments
Labels
🐛 bug Use to report bugs in the issues or fix bugs in a pull request.

Comments

@marjerie
Copy link
Contributor

Describe the bug
The calculation of c_nz_idx in SpGEMM (line 176) for the output C goes out of bounds. The dependence of c_nz_idx to the column of B is wrong as the estimated_nz_per_row can be less than the number of vertices which leads to the c_nz_idx going out of bounds for the allocated space per row.

To Reproduce
Add this assert(c_nz_idx < estimated_nzs); after line 176 in the gustavsons kernel in the file (https://github.com/gunrock/gunrock/blob/main/include/gunrock/algorithms/spgemm.hxx).
The assert fails for the dataset Chesapeake. The size of non-zero values for C is estimated_nzs as done in line 151. So the assertion has to pass.

Expected behavior
The expected behavior is that the c_nz_idx should not go above what was allocated per row.

Environment (please complete the following information):

  • Linux
  • Driver Version: 525.105.17
  • CUDA Version: 12.0
  • GCC version 11.3.0
@marjerie marjerie added the 🐛 bug Use to report bugs in the issues or fix bugs in a pull request. label Apr 19, 2023
@marjerie marjerie changed the title SpGEMM - c_nz_idx in gustavsons kernel goes out of bounds SpGEMM - c_nz_idx in gustavsons kernel goes out of bounds Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Use to report bugs in the issues or fix bugs in a pull request.
Projects
None yet
Development

No branches or pull requests

1 participant