SpGEMM - c_nz_idx
in gustavsons
kernel goes out of bounds
#1047
Labels
🐛 bug
Use to report bugs in the issues or fix bugs in a pull request.
Describe the bug
The calculation of
c_nz_idx
in SpGEMM (line 176) for the output C goes out of bounds. The dependence ofc_nz_idx
to the column of B is wrong as theestimated_nz_per_row
can be less than the number of vertices which leads to thec_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 thegustavsons
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):
The text was updated successfully, but these errors were encountered: