Skip to content

Commit

Permalink
slm calculation does not involve a matrix_size substraction
Browse files Browse the repository at this point in the history
  • Loading branch information
phu0ngng committed Mar 9, 2023
1 parent d24a473 commit 8ffdde1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dpcpp/solver/batch_cg_kernels.dp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ class KernelCaller {

size_type slm_size =
device.get_info<sycl::info::device::local_mem_size>();
const auto matrix_size = a.get_entry_storage();
// const auto matrix_size = a.get_entry_storage();
size_type shmem_per_blk =
slm_size - matrix_size - 3 * sizeof(ValueType) -
2 * sizeof(real_type); // reserve 5 for intermediate rho-s, norms,
// and alp
slm_size - 3 * sizeof(ValueType) -
2 * sizeof(
real_type); /* reserve 5 for intermediate rho-s, norms, and
* alpha don't need to subtract the matrix_size
*/
if (shmem_per_blk < 0) shmem_per_blk = 0;
const int shared_gap =
nrows; // TODO: check if it is neccessary to align
Expand Down

0 comments on commit 8ffdde1

Please sign in to comment.