Skip to content

Commit

Permalink
Fix coomv bug (#446) (#273)
Browse files Browse the repository at this point in the history
* fix coomv where under certain nnz sizes we were calculating the wrong number of loops

* updated changelog and version bump

Co-authored-by: jsandham <[email protected]>
Co-authored-by: Nico Trost <[email protected]>

Co-authored-by: jsandham <[email protected]>
Co-authored-by: Nico Trost <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2023
1 parent 72e3bd2 commit 57ff53b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Full documentation for rocSPARSE is available at [rocsparse.readthedocs.io](http
- Fixed bug in ellmv
- Optimized bsr2csr routine
- Fixed integer overflow bugs
- Fixes a bug in COO SpMV gridsize

## rocSPARSE 2.3.2 for ROCm 5.3.0
### Added
Expand Down
2 changes: 1 addition & 1 deletion library/src/level2/rocsparse_coomv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ rocsparse_status rocsparse_coomv_segmented_dispatch(rocsparse_handle ha

I minblocks = (nnz - 1) / COOMVN_DIM + 1;
I nblocks = maxblocks < minblocks ? maxblocks : minblocks;
I nloops = (nnz / COOMVN_DIM + 1) / nblocks + 1;
I nloops = (nnz - 1) / (COOMVN_DIM * nblocks) + 1;

// Buffer
char* ptr = reinterpret_cast<char*>(handle->buffer);
Expand Down
2 changes: 1 addition & 1 deletion library/src/level2/rocsparse_coomv_aos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ rocsparse_status rocsparse_coomv_aos_segmented_dispatch(rocsparse_handle

I minblocks = (nnz - 1) / COOMVN_DIM + 1;
I nblocks = maxblocks < minblocks ? maxblocks : minblocks;
I nloops = (nnz / COOMVN_DIM + 1) / nblocks + 1;
I nloops = (nnz - 1) / (COOMVN_DIM * nblocks) + 1;

// Buffer
char* ptr = reinterpret_cast<char*>(handle->buffer);
Expand Down

0 comments on commit 57ff53b

Please sign in to comment.