Skip to content

Commit 4953add

Browse files
authored
Merge pull request #445 from ntrost57/fix/bsrilu0
Auto-submit by Jenkins
2 parents d59166a + 8c1ec91 commit 4953add

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Documentation for rocSPARSE is available at
3030
### Resolved issues
3131
* Fixed an issue in `rocsparse_spgemm`, `rocsparse_[s|d|c|z]csrgemm`, and `rocsparse_[s|d|c|z]bsrgemm` where incorrect results could be produced when rocSPARSE was built with optimization level `O0`. This was caused by a bug in the hash tables that could allow keys to be inserted twice.
3232
* Fixed an issue in the routine `rocsparse_spgemm` when using `rocsparse_spgemm_stage_symbolic` and `rocsparse_spgemm_stage_numeric`, where the routine would crash when `alpha` and `beta` were passed as host pointers and where `beta != 0`.
33+
* Fixed an issue in `rocsparse_bsrilu0` where the algorithm was running out of bounds of the `bsr_val` array.
3334

3435
### Upcoming changes
3536

library/src/precond/bsrilu0_device.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ namespace rocsparse
172172

173173
// Load BSR block from row k into shared memory
174174
sdata1[threadIdx.y][threadIdx.x]
175-
= bsr_val[BSR_IND(k, threadIdx.x, threadIdx.y, dir)];
175+
= (threadIdx.x < block_dim && threadIdx.y < block_dim)
176+
? bsr_val[BSR_IND(k, threadIdx.x, threadIdx.y, dir)]
177+
: static_cast<T>(0);
176178

177179
// Make sure all writes to shared memory are visible
178180
__threadfence_block();

0 commit comments

Comments
 (0)