Skip to content

Commit

Permalink
Merge pull request #11378 from iyamazaki/tacho-fix
Browse files Browse the repository at this point in the history
Tacho : change lwork in symLU
  • Loading branch information
iyamazaki authored Dec 13, 2022
2 parents 4c2c773 + 9acc1b7 commit c964286
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ template <typename ArgUplo> struct Chol<ArgUplo, Algo::OnDevice> {
if (m > 0) {
int *devInfo = (int *)W.data();
value_type *workspace = W.data() + 1;
int lwork = (W.span() - 1) * sizeof(work_value_type);
int lwork = W.span() - 1;
r_val = Lapack<value_type>::potrf(handle, ArgUplo::cublas_param, m, A.data(), A.stride_1(), workspace, lwork,
devInfo);
}
Expand Down Expand Up @@ -107,7 +107,7 @@ template <typename ArgUplo> struct Chol<ArgUplo, Algo::OnDevice> {
if (W.span() == 0) {
int lwork;
r_val = cusolver_buffer_size(member, A, &lwork);
r_val = (lwork + sizeof(value_type_w)) / sizeof(value_type_w) + 1;
r_val = lwork + 1;
} else
r_val = cusolver_invoke(member, A, W);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ template <> struct LU<Algo::OnDevice> {
if (W.span() == 0) {
int lwork;
r_val = cusolver_buffer_size(member, A, &lwork);
r_val = (lwork + sizeof(value_type_w)) / sizeof(value_type_w) + 1;
r_val = lwork + 1;
} else
r_val = cusolver_invoke(member, A, P, W);
}
Expand Down

0 comments on commit c964286

Please sign in to comment.